■ DropShadowEffect 클래스 : 텍스트 그림자 효과 적용하기

------------------------------------------------------------------------------------------------------------------------


TestProject.zip


MainWindow.xaml.cs

 

 

using System.Windows;

using System.Windows.Media;

using System.Windows.Media.Effects;

 

namespace TestProject

{

    /// <summary>

    /// 메인 윈도우

    /// </summary>

    public partial class MainWindow : Window

    {

        //////////////////////////////////////////////////////////////////////////////////////////////////// Constructor

        ////////////////////////////////////////////////////////////////////////////////////////// Public

 

        #region 생성자 - MainWindow()

 

        /// <summary>

        /// 생성자

        /// </summary>

        public MainWindow()

        {

            InitializeComponent();

 

            DropShadowEffect shadow = new DropShadowEffect();

 

            shadow.Color     = Color.FromRgb(128, 128, 128);

            shadow.Direction = 270;

 

            this.textBlock.Effect = shadow;

        }

 

        #endregion

    }

}

 

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG