본문 바로가기

WPF8

WPF MVVM Window Close Action 처리 WPF MVVM으로 Window View와 Model 분리가 되어 있을 때 OK, Cancel 버튼을 눌러 Window를 닫는 방법이다. 간단하게 Close Action을 이용해서 닫을 수도 있는데 DialogResult를 받아서 처리를 할 때는 아래와 같이 처리해서 사용을 했다. https://learn.microsoft.com/en-us/dotnet/api/system.action-1?view=net-7.0 Action Delegate (System) Encapsulates a method that has a single parameter and does not return a value. learn.microsoft.com 다른 방법도 많을 것이다. 아래 예제는 System에서 제공하는 delega.. 2023. 6. 15.
Telerik RadRibbonView Example (리본바 메뉴 예제) Telerik을 리본바 메뉴 윈도우를 만들어 보았다. 홈페이지의 Getting Started를 보면 쉽게 만들수 있지만 나처럼 WPF, Telerik 초보자를 위해서 만드는 과정을 정리해 본다. 잊으면 나중에 다시 볼 수 있도록~ https://docs.telerik.com/devtools/wpf/controls/radribbonview/gettingstarted WPF RibbonView | Getting Started | Telerik UI for WPF This tutorial will walk you through the creation of a sample application that contains RadRibbonView. In order to use the RadRibbonView con.. 2022. 1. 19.
WPF 툴바 만들기 1. 툴바 Document https://docs.telerik.com/devtools/wpf/controls/radtoolbar/getting-started WPF ToolBar | Getting Started | Telerik UI for WPF docs.telerik.com 2. Toolbar에 이미지를 넣기 샘플 코드 3. Resouces Image 화면에 표시하기 위해서 icon 이미지의 속성의 빌드 작업에 'Resouece'가 있어야 화면에 표시가 된다. 맨 처음에는 '없음'으로 되어져 있다. 2021. 12. 26.
Hierarchical RadGridView Example https://docs.telerik.com/devtools/wpf/controls/radgridview/hierarchical-gridview/basic-hierarchies WPF DataGrid | Basic Hierarchies | Telerik UI for WPF Controls / RadGridView / Hierarchical GridView RadGridView allows you to display hierarchical data in the form of nested grid views. To do so you have to define a table definition for each subset of data you want to display. Such a definition ca.. 2021. 9. 2.
RadTreeListView Example https://docs.telerik.com/devtools/wpf/controls/radtreelistview/radtreeliestview-getting-started#radtreelistview-vs-radgridview WPF TreeListView | Getting Started | Telerik UI for WPF This article will guide you through the process of creating a sample application with RadTreeListView. You should use the RadTreeListView control to display hierarchical data in a tabular format. In order to achieve.. 2021. 9. 2.
WPF MVVM TextBox KeyDown Event WPF로 MVVM 패턴을 이용해서 TextBox의 KeyDown 이벤트를 확인해서 검색이나 다른 기능을 실행 시키기 위해서 처리하는 방법을 검색해서 만들어 보았다. 프로젝트에 Notifier.cs와 DelegateCommnad.cs를 추가한다. ViewModel.cs를 만들어 DataContext에 연결한다. MainWindow.xaml에는 TextBox 하나를 추가했다. http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc=" MainWindow.xaml.cs에서 DataContext 연결을 한다. public partial c.. 2021. 7. 20.
Combobox SelectionChanged 호출시 SelectedItem 확인 방법 private void cb_SelectionChanged(object sender, SelectionChangedEventArgs e) { string name = (sender as ComboBox).SelectedItem.ToString(); 2021. 5. 10.
WPF 문자열 포맷 정리 (String Format) 참조 문서: https://msdn.microsoft.com/ko-kr/library/dwhawy9k(v=vs.110).aspx https://msdn.microsoft.com/ko-kr/library/0c899ak8(v=vs.110).aspx 하도 잊어 버려서 MSDN 내용을 이곳에 저장했다. 매번 할 때마다 잊어버린다. ㅠㅠ ///////////////////////////////////////////////////////////////////////////////////// 표준 숫자 형식 문자열 표준 숫자 서식 문자열은 일반 숫자 형식의 서식을 지정하는 데 사용됩니다. 표준 숫자 서식 문자열은 Axx 형식을 취합니다. 여기서A는 서식 지정자라는 단일 영문자입니다. 공백을 포함하여 영문자가 두 개 .. 2017. 2. 10.
LIST