첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
0.01MB

▶ MainApplication.xaml

<Application x:Class="TestProject.MainApplication"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="MainWindow.xaml"
    Activated="Application_Activated"
    Deactivated="Application_Deactivated">
</Application>

 

728x90

 

▶ MainApplication.xaml.cs

using System;
using System.Windows;

namespace TestProject
{
    /// <summary>
    /// 메인 애플리케이션
    /// </summary>
    public partial class MainApplication : Application
    {
        //////////////////////////////////////////////////////////////////////////////////////////////////// Method
        ////////////////////////////////////////////////////////////////////////////////////////// Private

        #region 애플리케이션 활성화시 처리하기 - Application_Activated(sender, e)

        /// <summary>
        /// 애플리케이션 활성화시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void Application_Activated(object sender, EventArgs e)
        {
            MainWindow window = MainWindow as MainWindow;

            window.Content = "Application activated.";
        }

        #endregion
        #region 애플리케이션 비활성화시 처리하기 - Application_Deactivated(sender, e)

        /// <summary>
        /// 애플리케이션 비활성화시 처리하기
        /// </summary>
        /// <param name="sender">이벤트 발생자</param>
        /// <param name="e">이벤트 인자</param>
        private void Application_Deactivated(object sender, EventArgs e)
        {
            MainWindow window = MainWindow as MainWindow;

            window.Content = "Application deactivated.";
        }

        #endregion
    }
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요