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

Style style = null;

try
{
    style = this.button.FindResource("RedForegroundStyleKey") as Style;
}
catch
{
}

if(style != null)
{
    this.button.Style = style;
}

※ 찾고자 하는 리소스가 존재하지 않는 경우 FindResource 메소드는 예외를 발생시킨다.

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

댓글을 달아 주세요