http://www.wpf-tutorial.com/common-interface-controls/contextmenu/ context menu는 종종 팝업 메뉴로 언급되어집니다. WPF는 ContextMenu 컨트롤을 제공하며, ContextProperty를 통하여 이루어집니다.ContextProperty 는 모든 컨트롤을 제어합니다.12345678910 Colored by Color Scriptercs ContextMenu with Commands and icons 이전의 menu와 같이 icon과 command 등을 삽입할 수 있습니다.1234567891011 Colored by Color Scriptercs Invoke ContextMenu from Code-behind 자동적인 방법으로, Cont..
http://www.wpf-tutorial.com/common-interface-controls/menu-control/ WPF는 Menu 컨트롤을 생성함으로써 메뉴를 만들 수 있습니다. 또한, MenuItem elemtent를 추가하여 매우 간단하게 Item을 추가할 수 있습니다.1234567891011121314 Colored by Color Scriptercs Header에서 정의할 때 _(언더바)를 사용합니다. "_File"은 F를 단축키와 같이사용할 수 있게 합니다.[ALT]를 누르고 [F] 등을 누르면 해당 메뉴의 항목으로 이동합니다. Icons and checkboxes WPF의 MenuItem은 icon과 특정 기능을 키고 끌 수 있는 menuitem을 지원합니다.12345678910111..
http://www.wpf-tutorial.com/dialogs/the-savefiledialog/ SaveFileDialog Filter 이전의 OpneFileDialog와 유사하게 filter를 적용시킬 수 있습니다.Filter 속성을 사용하여, 저장 확장자명을 한정시킬 수 있습니다.123456 Save file Colored by Color Scriptercs1234567private void btnSaveFile_Click(object sender, RoutedEventArgs e) { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Filter = "Text file (*.txt)|*.txt|C# file (*.cs)|*..
윈도우 응용프로그램에서 파일 열기 혹은 저장을 할 때마다, 여러분은 거의 같은 dialog가 나타납니다.WPF에서 여러분은 Microsoft.Win32 namepsace에서 표준 DIALOG를 찾을 수 있습니다. Simple OpenFileDialog example 1234567 Open file Colored by Color Scriptercs 1234567891011using System.IO;using Microsoft.Win32; private void btnOpenFile_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); if(openFileDialog.ShowDialog()..
http://www.wpf-tutorial.com/dialogs/the-messagebox/ MessageBox 12345 public MainWindow() { InitializeComponent(); MessageBox.Show("Hello, world!", "My App",MessageBoxButton.OK); }Colored by Color ScriptercsMessageBox.Show(Content Text, Title, MessageBoxButton); MessageBox with extra buttons 12MessageBox.Show("This MessageBox has extra options.\n\nHello, world?", "My App", MessageBoxButton.YesNoC..
http://www.wpf-tutorial.com/commands/implementing-custom-commands/ 이전에는 WPF에 미리 정의되어진 command들의 사용에 대한 다양한 방법들을 보았습니다.추가적으로 command들을 사용자가 구현할 수 있습니다. 가장 쉬운 방법은 사용자의 command들을 포함하는 static class를 구현하는 것입니다.각각의 command는 static field로 class에 추가되어집니다. 12345678910111213141516171819202122232425262728293031 public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } privat..
1234567 New Colored by Color Scriptercs1234567891011121314 public MainWindow() { InitializeComponent(); } private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e) { MessageBox.Show("The New command was invoked"); } private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = true; }Colored by Color Scriptercs CommandBidings collection을..
http://www.wpf-tutorial.com/data-binding/the-stringformat-property/ covnerter의 멋있는 점은 모든 데이터 타입을 완벽히 다른 데이터 타입으로 변환할 수 있는 것입니다.StringFormat 속성은 데이터 타입의 변환을 하지 않고, 표시하는 방식만을 다르게 하는 것을 지원합니다. 123456789 Title="MainWindow" Height="200" Width="350" Name="wnd"> Colored by Color Scriptercs Formatting without extra text 사용자 정의 텍스트를 포함하지 않는 형식 문자를 지정한다면, XAML에서 정의할 때 추가적인 중괄호를 추가해야합니다. 1234Title="MainWin..
http://www.wpf-tutorial.com/data-binding/value-conversion-with-ivalueconverter/ When to use a value converterValue converter (IValueConverter)는 매유 종종 데이터 바인딩에 사용되어집니다. ex) Byte를 KB, MB, GB 등으로 표한하는 경우, bool 값 대신 yes 혹은 no 로 표시 Implementing a simple value converter WPF value converter는 IValueConverter 인터페이스 혹은 IMultiValueConverter 인터페이스를 구현해야합니다.두 인터페이스는 단지 Convert()와 ConvertBack() 두 가지의 메소드를 구현하..
- Total
- Today
- Yesterday
- UIView Animation
- MVVM
- Custom Cell
- 객체
- Grid
- WPF
- 문자열
- CollectionView
- dfs
- Cell Animation
- 데이터 바인딩
- 백준
- 코딩야학
- XAML
- listview
- BFS
- FEED
- DP
- 그래프
- 스택
- 생활코딩
- 백준온라인
- command
- C++
- Add TapGesture
- 타일링
- Fakebook
- BOJ
- CustomCollectionViewCell
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |