FrameworkElement.ActualTheme 屬性

定義

取得元素目前使用的 UI 主題,其可能與 RequestedTheme不同。

public:
 property ElementTheme ActualTheme { ElementTheme get(); };
ElementTheme ActualTheme();
public ElementTheme ActualTheme { get; }
var elementTheme = frameworkElement.actualTheme;
Public ReadOnly Property ActualTheme As ElementTheme

屬性值

列舉的值,例如 Light

Windows 需求

裝置系列
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)

適用於