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

■ Button 클래스의 SetResourceReference 메소드를 사용해 리소스를 설정하는 방법을 보여준다.

 

▶ 예제 코드 (C#)

using System.Windows.Controls;

...

Button button;

...

button.SetResourceReference(Button.StyleProperty, "RedForegroundStyleKey");

※ 찾고자 하는 리소스가 존재하지 않는 경우 리소스를 적용하지 않는다.

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