반응형

WPF16

ListBox의 CheckBox가져오기 1. Xaml의 ListBox의 디자인 소스코드 2. Cs파일의 소스코드 //ListBox의 ListBoxItem요소의 루프 foreach (var item in lstFileType.Items) { //ListBoxItem취득 ListBoxItem listBoxItem = (ListBoxItem)lstFileType.ItemContainerGenerator.ContainerFromItem(item); //CheckBox컨트롤취득 CheckBox checkBox = FindVisualChild(listBoxItem); //CheckBox컨트롤이 정상적으로 취득된경우에만 체크처리 if (checkBox != null) checkBox.IsChecked = true; } WPF 2021. 8. 20.
DataGrid의 ComboBox바인딩 샘플 MVC를 기반으로 바인딩을 구성합니다. 1.Model클래스 - DataGrid용 모델클래스(CountryInformation)와 ComboBox(CommonType)용 Model클래스를 생성 - 생성한 클래스를 이용한 실제 바인딩이 이용할 메서드(GetCountryNameList, GetCountryInformationList)를 생성 using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Thre.. WPF 2021. 4. 10.
WPF 천단위 숫자입력 TextBox UserControl작성 1.샘플이미지 2.디자인 소스코드 3. 프로그램 소스코드 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System... WPF 2021. 2. 27.
WPF 년월선택 UserControl작성 1.샘플이미지 2.디자인 소스코드 3. 프로그램 소스코드 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; usin.. WPF 2021. 2. 27.
반응형