开发者

show database stored (date)values as sellected in calender controle.

开发者 https://www.devze.com 2023-04-06 09:47 出处:网络
I have some stored date开发者_StackOverflow values in DB. i want to show those dates as sellected in my calender control.i just need the code

I have some stored date开发者_StackOverflow values in DB. i want to show those dates as sellected in my calender control.i just need the code (C# 2008 windows application) pls help me.


XAML Code :

<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>

NOTE : You will have to bind the collection in the code-behind like following :

this.DataContext = data; // data will be the collection or list you are using.
0

精彩评论

暂无评论...
验证码 换一张
取 消