views:

37

answers:

2

I am using wpf framework 3.5 for this I had to use winworms -> datetimepicker. I need to do Binding on the Text

<wfi:WindowsFormsHost >
     <wf:DateTimePicker Format="Short" Text="{Binding date, Converter={StaticResource conkey}}" x:Name="p_datePicker" />
</wfi:WindowsFormsHost>

EDIT: Answer: The need to use WPF toolKit DatePicker and do not forget to connect the reffrenses

A: 

You can't..

WinForms controls do not have any DependencyProperties so Bindings are out!

Get and set it by hand in the code behind!

Arcturus
i'm edit my post
simply denis
I see you are using a DataGrid. Try to find a WPF DatePicker. WPF 4.0 has one out of the box, and you can find some DatePickers on various toolkits: http://blogs.msdn.com/b/llobo/archive/2009/11/23/new-wpf-features-datepicker-calendar-vsm-datagrid.aspx
Arcturus
A: 

As Arcturus explained, you can't use bindings on Windows Forms controls. Why don't you use the WPF Toolkit DatePicker instead ? It has a SelectedDate property that you can bind

Thomas Levesque
because datapicker not working in 3.5
simply denis
What does "not working" mean?
Wonko the Sane
DatePicker works fine in 3.5, I use it in the application I develop at work.
Thomas Levesque
I'm dumb = (Thank you merely had to include the refferns
simply denis