显示在日历控制中选择的数据库存储(日期)值。
答
XAML代码:
<DatePicker Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="100,50,0,10" Name="dateText" VerticalAlignment="Top" Width="120" >
<DatePicker.SelectedDate>
<Binding Path="Date" />
</DatePicker.SelectedDate>
</DatePicker>
注意:您必须将集合绑定的代码隐藏像以下:
this.DataContext = data; // data will be the collection or list you are using.
请帮助我们来帮助你,并采取看看[ faq] – ccellar
或更好的,这个:http://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx –