WPF Toolkit calendar control in a MVVM solution, how to highlight days? - wpf

From this article http://msdn.microsoft.com/en-us/magazine/dd882520.aspx I wanted to create a list of selected days like he did. Except my list is not static and putting it in the converter seems smelly. Has anyone done something similar with the WPF toolkit calendar control? Or are we trying to use this control for something more than what it is intended?

Use a MultiValueConverter which takes a DateTime and a list of special days.

Related

How to display Date as MMM-DD dateFormat in WPF DatePicker

I have WPF DatePicker In My UserControl and I want to display date as MMM-DD format.
I am using MVVM Pattern.
Any One faced this issue.
There us a lot of topic about that whit more or less hacking of the control but may be you could try the DateTimePicker from the WPF Toolkit which has 2 properties 'Format' and 'FormatString'
Like it's describe in this another post.
Set Format=Custom
And FormatString="youre custom format" like "dd::MMM::yyyy hh-mm-ss" or what ever you need

How to set Silverlight 5 CurrentCulture & CurrentUICulture separately on DatePicker & TimePicker Control?

I have set two different cultures to the thread as:
Thread.CurrentThread.CurrentCulture = "fi-FI"
Thread.CurrentThread.CurrentUICulture = "en-Us"
But the calender text is shown in Finnish culture.
I need to keep the Text(Translations) based on CurrentUICulture and Text Format based on CurrentCulture.
Can you please suggest how can it be done for it?
That is not possible. The Calendar control only reacts to the CurrentCulture value. CurrentUICulture is used by the ResourceManager to load up different strings, images etc. used in the UI, but that is not where the day/month names are stored. They are part of the .NET framework itself. To get the functionality you want you will have to write your own implementation of the DatePicker and/or TimePicker controls. Perhaps you could download the code for the Silverlight Toolkit and use that as a base for your own implementation. What you are looking for is basically a way of overriding the names of months and days manually. Maybe it is even possible to extend the controls and add that functionality on top, but I doubt it.

WPF Combobox with auto-complete/auto-filter?

I am eager to find some solid (free, Open Source, or tutorial/example) code to make a WPF Combobox do autocomlete/autofilter as the user types. But everything I've tried so far has had some sort of problem...
A Reusable WPF Autocomplete TextBox came close, but I can't get it to work with more than one filter (more info here).
WPF autocomplete textbox/combobox doesn't work for me because it inherits from UserControl, and thus doesn't support the DataTemplates I need (for showing/selecting the value of one property for an object with multiple properties).
Automatically Filtering a ComboBox in WPF didn't work because it doesn't seem to ever find the EditableTextBox portion of the inherited ComboBox code (via (TextBox)base.GetTemplateChild("PART_EditableTextBox") which seems to always returns null).
Building a Filtered ComboBox for WPF just gets stuck in a refresh loop then overflows the stack after I type just a few letters.
Other things I've considered:
I know that Windows Forms' Combobox control has AutoCompleteMode and I could embed it in WPF, but I can't imagine it would play very well with my WPF data bindings.
Perhaps it is too complex and I need to simplify, maybe by building one-dimensional (single-property) ObservableCollections for the ComboBoxen... However, the challenge of applying multiple filters (one set by another control's value, and one from what the user is typing) to multiple controls using different views of the same DataSet would require a ridiculous amount of processing power to destroy and rebuild the list every time the user types a character!
So... I'm at wit's end. Any suggestions?
If your Combobox has some data source attached to it ,
just make
1-IsTextSearchEnabled = true.
2-IsEditable = true.
you are good to go
Try this one:
http://blogs.windowsclient.net/dragonz/archive/2010/02/23/autocomplete-textbox-control-for-wpf.aspx

WPF "Booking chart"

Greetings,
Currently I am in process of developing an application for booking (etc. rooms). The most painful thing in front of me: "The booking chart". It should looks similarly to the following thing:
http://img195.imageshack.us/img195/4807/99573694.gif
Any suggestion how can I build the "skeleton" of the booking chart? should i use grid etc? I would like to navigate through the days and additionally passed number of items and current datetime range
Looking at your example it looks like a job for DataGrid (http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29117 if you're on WPF 3.5, it's part of WPF 4).
I would implement the navigation functionality by using LINQ to filter your data set to the range you're interested in. The navigation controls would have to be provided by you separate from the DataGrid.
Hope that helps...
This looks similar to the Scheduling tool Billy Hollis shows in dnr tv number 115 which is a listbox on its side.
http://www.dnrtv.com/default.aspx?showNum=115
Mike

DateTimePicker Control in WPF

I am searching for a DateTimePicker control which can be used as a textbox so user can enter date/time data at will (ie; type in the string "11/09/2008 12:30:00") or can select date/time from a drop down list that contains a calendar/time box (what i meant is that this control can provide both options as mentioned). If you have found such a flexible control (and free too) please give me the needed information to obtain it.
There's the DatePicker and Calendar controls from the WPF team, but I don't believe they handle times (as in your example) - just dates. Worth a look though.
Have a look at this WPF Date Picker question.
Cheers
Telerik has a decent DateTimePicker control but it's not free.
Old question, but for anyone interested... Extended WPF Toolkit™ Community Edition is free (also has a premium option) and contains a DateTimePicker which I have found to be very useful in WPF!
I am not sure whether you don't want to use JQuery or not aware of it. But here is this free/open source date time picker from JQuery which does exactly what you are looking for, plus lot more.

Resources