Showing posts with label datetime. Show all posts
Showing posts with label datetime. Show all posts

February 22, 2009

DatePicker 컨트롤 이용해보기

DatePicker Control 을이용을 하기 위해선 다음과 같은 준비 과정이 필요합니다.

 

 

1. 참초 추가를 해야합니다.

System.Windows.Controls

 

2. xaml 에 코드를 추가해야합니다.

xmlns:my="clr-namespace:System.Windows.Controls;

assembly=System.Windows.Controls"

 

 

다음으로 화면에서 날짜를 클릭했을때 값을 얻어오는 방법을 알아 보겠습니다.

비하인드 코드에 다음과 같이 작성해주시면 됩니다.

여기서의 핵심은 DateTime 으로의 케스팅 해주는것이지요^^ㅎ