본문 바로가기

WPF13

WPF TextBox에 float 바인딩 해서 소수점이 입력되지 않는 문제 WPF를 이용해서 TextBox에 Float이나 Double 값을 입력 하려고 했는데 소스점이 입력되지 않는 문제가 확인되었다. 이것 저것 검색한 결과 아래와 같은 정보를 찾아서 수정을 진행했다. https://stackoverflow.com/questions/14600842/bind-textbox-to-float-value-unable-to-input-dot-comma/14600905#14600905 Bind textbox to float value. Unable to input dot / comma When I try to input a DOT or a COMMA in a textbox, for example 1.02 or 83,33 the textbox prevents me to input such.. 2021. 7. 9.
WPF 체크박스 글자 색 변경 체크박스의 글자는 아래와 같이 내용과 같은 방식으로 추가를 한다. 색상은 Attribute 중의 Foreground를 이용한다. 내용 선택 글자색은 흰색으로 되고 글자 내용은 '내용 선택'으로 처리가 된다. 2021. 6. 7.
WPF 동적으로 Margin 변경 버튼이나 Grid 등의 Margin을 동적으로 변경하는 방법 btn.Margin = new System.Windows.Thickness{ Left = 10 }; 또는 아래와 같이 btn.Margin = new System.Windows.Thickness{ Left = 10, Top = 0, Right = 10, Bottom = 0 }; https://docs.microsoft.com/ko-kr/dotnet/desktop/wpf/advanced/how-to-set-margins-of-elements-and-controls?view=netframeworkdesktop-4.8 2021. 6. 7.
Combobox SelectionChanged 호출시 SelectedItem 확인 방법 private void cb_SelectionChanged(object sender, SelectionChangedEventArgs e) { string name = (sender as ComboBox).SelectedItem.ToString(); 2021. 5. 10.
LIST