New DateTimePicker for WPF? - c#

Are there newer, and better DateTimePicker out there that can resemble more of Window's default DateTimePicker for WPF C#?
Yes, I know this is not a new question.
There are WPF Toolkits and SO. But these are fairly dated (latest update I found were from the 09) and I am not able to find any newer sources. There is this Avalon Library but, no offense, it's buggy, ugly and difficult to implement (for me perhaps), also difficult to click the textboxes etc.
Are there newer, open source or commercial DateTimePicker? Do people host their DateTimePicker Form Control in WPF?

Note that what you are showing is most likely not a single control but a combination of controls. In there I see a month calendar control, a time picker and a custom control showing an analogic clock.
bout WPF controls there are tons of libraries and suites out there with anything you need including datetime and time pickers, for example Telerik, Infragistic, DevExpress etc...

The clock in the image is not part of the time control. It is just a clock.
You could have a look at the commercial controls of Telerik

Related

Hijri and Gregorian Calender in WPF?

I need to use the control System.Windows.Controls.Calendar to display the Hijri Dates and to display the Gregorian dates as well in the same window.
I have tried thread Culture, but the result was all of the calenders were changed, and the change was only on the header of the Calender Control, i.e. the dates written on the grid of numbers are still the same.
I have tried to use a custom user control, an open source project programmed by somebody, but I have found too many problems and these project were hard to customize, so I need to use the native controls, with the native way of dealing with controls..
According to MSDN the System.Windows.Controls.Calendar does only support the Gregorian calendar - so basically doing what you want is impossible using the built-in control...
You will need to build such a control yourself or buy some control pack with Hijri support...
For some information on dealing with Hijri dates in .NET see MSDN.
EDIT:
The only calendar controls supporting Hijri I could find are here and here and here.
The "bigger" vendors in the .NET control world (like Telerik, DevExpress...) do NOT support hijri... they all have some "issue tracking" saying that they will look into adding support but these issues are open for years without any progress so far :-(

show timeslice with timeline in c#

I want to implement sjf (Scheduling) with c# and I need timeline for show how it workes. For example in this timeslice that process do its job. I want to show it graphically.
How I can do that?
Something like this :
i can implement, i just dont know how to show it graphically like that.it is windows form app in c#
To graphically display a schedule as you describe, using WinForms / C#, consider using a Gannt chart control.
Don't try building the control yourself, there are good off-the-shelf controls that are robust, low priced, well supported and have loads of sample code.
Telerik for example: http://www.telerik.com/products/winforms/chart.aspx
I mentioned Telerik as I've used their WinForms, WPF and ASP.Net controls before, they have plenty of different snippets of sample code, so it's easy to test out and they are well maintained with regular updates. Get a trial copy, see how it works for you and then go from there.
There are many others sources of Gannt controls, see previous StackOverflow topic: Gantt Chart Controls on Windows Forms

DateTimePicker for WPF 4.0

According to this post, there's a separate DatePicker control in .net 4. I've tried it, and I don't see a good way to also let it select the time of the day.
Is there an easy way to transform DatePicker into DateTimePicker by editing XAML template? If not, what is the best way to get a DateTimePicker for WPF 4.0?
Extended WPF Toolkit sports a nice DateTimePicker with time of day.
There is also an article over on CP where someone created a control that works like the Winforms one... A WPF DateTimePicker That Works Like the One in Winforms
There isn't one without making it yourself or using a 3rd party control. However there is one within winforms if you want a quick fix that doesn't support data binding...
xmlns:window="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
<window:WindowsFormsHost >
<wf:DateTimePicker Format="Time" ></wf:DateTimePicker>
</window:WindowsFormsHost>
Just a time picker, but could easily be paired with a datepicker. You also need a reference to WindowsFormsIntegration and System.Windows.Forms.
Try the DateTimePicker in the extended WPF toolkit.
If you do want an DateTimePicker without external controls and also for commercial use, I've improved an existing one and share it here:
https://gist.github.com/Apflkuacha/406e755c8b42a70b7ab138e6b985bcdf
It will look like this, a field which shows the selected date&time and a popup window to select the date and time:

how to show events link in .net calendar control?

I want to develop a calendar that could show events link on it. The events will have datetime field used to locate date on calendar and it also have a link field to make hyperlink on calendar. If don't use 3rd party software, how to develop such a calendar? Any suggestion is appreciated.
If you're interested in 3rd party commercial ASP.NET controls where the work is already done for you, check out these solutions (in no particular order):
ComponentOne Scheduler
Infragistics WebSchedule
Telerik Scheduler
ComponentArt Scheduler
DevExpress ASPxScheduler
If none of those are suitable or if you're really looking for something free or open source, check out the answers to the question What is a good (cheap/free) calendar/schedule control for ASP.NET?

How do I disable some dates on a DateTimePicker control?

I was wondering is it possible to disable selected dates in a DateTimePicker, so that user cannot select them. i know its possible in web forms but in windows forms im unable to do this.how can i achieve this.
The ease with which you can do this will depend on the dates you want to restrict. For instance, if you all you want to do is specify a range of valid dates to pick, then you can use the MinDate and MaxDate properties to set the bounds. If however, you want to cherry pick certain days within a range (for instance, no weekends), there is no built in method for doing this.
You could either find a third party control with this functionality, or you could try to hack it a bit by adding an event handler to the ValueChanged event, and forcing the current date time to the last value (which you'd have to cache) if they user picked something that was illegal according to your business logic... but this is a less than ideal way to do it.
Developer Express controls are usually very flexible and judging from this support article you can achieve what you want to do with their DateEdit control.
The control collection can be obtained from the following location: Over 60 Free Controls from DevExpress. (the free offer is no longer available)
Don't forget to read the EULA.

Categories

Resources