Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to create custom picker control in c# Windows 8.1

Posted on 2015-01-21
4
Medium Priority
?
218 Views
Last Modified: 2015-01-26
I want to create a picker (for Desktop and phone if possible), that has 6 selections (rather then three like the DatePicker). Can this be done? I am fairly new to C#. Does it have to be made from scratch, or can something be copied and modified? I see examples of modifying existing pickers, but not adding to, or creating a new\larger version. Can the User Control template be used to do this?  Is there is an example of creating a whole new picker control that is not a variation of the date\time\color selection controls.   I am thinking that because I can find nothing other than a date\time\color picker, that this cannot be done.  Should I be considering scrolling combo box's?
0
Comment
Question by:eelou
  • 2
  • 2
4 Comments
 
LVL 30

Expert Comment

by:anarki_jimbel
ID: 40563055
I'd say you need a what is called "composite" custom control.  
And in your case, I believe, you need to write it from a scratch.
Try to follow steps in MSDN guidelines:

https://msdn.microsoft.com/en-us/library/vstudio/6hws6h2t(v=vs.100).aspx

https://msdn.microsoft.com/en-us/library/vstudio/5t70dw29(v=vs.100).aspx
0
 

Author Comment

by:eelou
ID: 40565596
That's a bit much for a newbie.  Looks like I will put combobox's next to each other.
0
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 2000 total points
ID: 40565712
Yes, I agree: writing custom controls might be a bit challenging exercise, but it depends on a specific task...

Have a look at this example:
https://msdn.microsoft.com/en-us/library/vstudio/a6h7e207(v=vs.100).aspx

Or try goggling other tutorials and examples.
0
 

Author Comment

by:eelou
ID: 40571118
This might be the way to go, and eventually I might try it.  For now, I am closing this question, as no one else has come up with anything else.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why Windows 8 and 10 don't seem to accept your GPO-based software deployment while Windows 7 does? Read on.
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question