728x90
반응형
728x170
using Windows.ApplicationModel;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
...
private TextBox textBox;
...
Application.Current.Suspending += Application_Suspending;
...
private async void Application_Suspending(object sender, SuspendingEventArgs e)
{
SuspendingDeferral suspendingDeferral = e.SuspendingOperation.GetDeferral();
await PathIO.WriteTextAsync("ms-appdata:///local/sample.txt", this.textBox.Text);
suspendingDeferral.Complete();
}
728x90
반응형
그리드형(광고전용)
'C# > UWP' 카테고리의 다른 글
[C#/UWP] Page 클래스 사용하기 (0) | 2019.01.22 |
---|---|
[C#/UWP] ApplicationView 클래스 : PreferredLaunchViewSize 정적 속성과 TryResizeView 메소드를 사용해 메인 윈도우 크기 설정하기 (0) | 2019.01.22 |
[C#/UWP] local XML 접두사 사용하기 (0) | 2019.01.22 |
[C#/UWP] x:Class 속성 사용하기 (0) | 2019.01.21 |
[C#/UWP] 웹 카메라 사용하기 (0) | 2017.05.09 |
[C#/UWP] PathIO 클래스 : WriteTextAsync 정적 메소드를 사용해 텍스트 파일 쓰기 (0) | 2016.06.01 |
[C#/UWP] PathIO 클래스 : ReadTextAsync 정적 메소드를 사용해 텍스트 파일 읽기 (0) | 2016.06.01 |
[C#/UWP] ms-appdata 접두사 사용하기 (0) | 2016.06.01 |
[C#/UWP] FileIO 클래스 : ReadBufferAsync 정적 메소드를 사용해 텍스트 파일 읽기 (0) | 2016.06.01 |
[C#/UWP] FileIO 클래스 : WriteBufferAsync 정적 메소드를 사용해 텍스트 파일 쓰기 (0) | 2016.06.01 |
댓글을 달아 주세요