티스토리 뷰
01. 풀스크린일 때 LostFocus가 되어도 전체화면을 유지 옵션
Application.Current.Host.Content.FullScreenOptions = System.Windows.Interop.FullScreenOptions.StaysFullScreenWhenUnfocused;
02. OOB 상태에서 업데이트 확인
if (App.Current.IsRunningOutOfBrowser)
{
App.Current.CheckAndDownloadUpdateCompleted += new CheckAndDownloadUpdateCompletedEventHandler(OnCheckAndDownloadUpdateCompleted);
App.Current.CheckAndDownloadUpdateAsync();
}
void OnCheckAndDownloadUpdateCompleted(object sender, CheckAndDownloadUpdateCompletedEventArgs e)
{
if (e.Error == null && e.UpdateAvailable)
{
MessageBox.Show("Application updated, please restart to apply changes.");
}
}
03. Thread Cross Error 발생시
Deployment.Current.Dispatcher.BeginInvoke(() => {});
04. DispatcherTimer
System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();
myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 1, 000); // 100 Milliseconds
myDispatcherTimer.Tick += (ss, ee) =>
{
if (this.Progress + 60 >= this.Total)
{
this.Progress = this.Total;
myDispatcherTimer.Stop();
}
else
this.Progress += 60;
};
myDispatcherTimer.Start();
05. 명시적 바인딩, Explicit
var binding = picker.GetBindingExpression(DateTimePicker.SelectedDateTimeProperty);
binding.UpdateSource();
06. Behavior, Trigger 만들기
Silverlight and WPF Behaviours and Triggers - Understanding, Exploring And Developing Interactivity using C#, Visual Studio and Blend
http://www.codeproject.com/Articles/57664/Silverlight-and-WPF-Behaviours-and-Triggers-Unders
07. 정규식 - 이메일
if (this.EmailId.Contains('@') == true)
{
string emailPattern = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(emailPattern);
System.Text.RegularExpressions.Match m = regex.Match(this.EmailId);
if (m.Success == false)
{
//이메일 주소 오류
return;
}
}
8. 실버라이트5에서 async, await, Task 사용하기
Nuget으로 설치
Async Targeting Pack for Visual Studio 2012
http://www.microsoft.com/en-us/download/details.aspx?id=29576
'Previous Platforms' 카테고리의 다른 글
Windows 8 개발자 컨퍼런스 동영상 (0) | 2012.05.08 |
---|---|
Rx, Linq Tips (0) | 2012.05.04 |
using Parameter when start up Silverlight (0) | 2012.04.26 |
Korea Bus Information 2.0 - Windows 8 CP - Build 1.0.0.16 (2) | 2012.04.11 |
File 선택과 추가 정보 가져 오기 - Windows 8 CP (0) | 2012.04.03 |
- Total
- Today
- Yesterday
- Visual Studio 2022
- Behavior
- Microsoft
- UWP
- Always Encrypted
- ef core
- uno platform
- WPF
- kiosk
- C#
- windows 11
- Bot Framework
- #uwp
- ComboBox
- IOT
- Build 2016
- .net
- #Windows Template Studio
- visual studio 2019
- Windows 10
- LINQ
- PRISM
- #prism
- uno-platform
- dotNETconf
- #MVVM
- Cross-platform
- MVVM
- .net 5.0
- XAML
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |