콘텐츠로 이동

ControlExtensions.WithTheme<T> method

이 콘텐츠는 아직 번역되지 않았습니다.

Registers a theme callback.

public static T WithTheme<T>(this T element, Action<Theme, T> apply, bool invokeImmediately = true)
where T : FrameworkElement
parameter description
T Element type.
element Target element.
apply Callback invoked with the current theme and the element whenever the theme changes.
invokeImmediately Whether to invoke the callback immediately with the current theme as well.

The element for chaining.