본문 바로가기

C#(CSharp)/WPF18

UI 쓰레드 (UI Thread) UI Thread에서 Invoke, BeginInvoke 차이를 알고 있어야 한다. Invoke : SyncronizeBeginInvoke : Asynchronize 1. Simple Way Application.Current.Dispatcher.BeginInvoke(new Action(() => { SaveAllNoteToXml(); /* Your code here */ })); 2.Ordinary Wayusing System;using System.Windows;using System.Threading.Tasks; namespace WpfApp{ /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Win.. 2015. 3. 21.
Hidden/Collapsed 차이 Hidden Hidden Hidden Collapsed Collapsed Collapsed So, Collapsed will not save the space, whereas Hidden will. 참고 URL : http://stackoverflow.com/questions/19652499/c-sharp-window-visibility-collapsed-and-hidden 2015. 3. 21.
여러 줄 TextBox 컨트롤 만들기 This TextBox will allow the user to enter multiple lines of text. When the RETURN key is pressed, or when typed text reaches the edge of the text box, a new line is automatically inserted. TextWrapping attribute to Wrap will cause entered text to wrap to a new line when the edge of the TextBox control is reached, automatically expanding the TextBox control to include room for a new line, if nece.. 2015. 3. 21.
Tray Icon running in WPF application WPF Nuget(Open Source)를 이용 1. Nuget 을 이용해서 라이브러리 설치Hardcodet WPF NotifyIcon 1.0.5 command in the Package Manager ConsolePM> Install-Package Hardcodet.NotifyIcon.Wpf 1.1 attach sample code.http://www.hardcodet.net/wpf-notifyicon [^] 2. Add Resource Dictionary using Hardcodet.Wpf.TaskbarNotification; namespace SWConsultingStickyNote{ /// /// Interaction logic for App.xaml /// public partial class .. 2015. 3. 17.