コード例 #1
0
        private static VisualTheme GetBasicWindowVisualTheme(IWin32Window w = null)
        {
            var theme = new VisualTheme(BasicClassListValue);

            if (w != null)
            {
                theme.GetType().GetField("hTheme", BindingFlags.Instance | BindingFlags.NonPublic)
                ?.SetValue(theme, LoadBasicThemeData(w));
            }
            return(theme);
        }
コード例 #2
0
 public static UxTheme.SafeThemeHandle GetTheme(this VisualTheme th)
 {
     return(th.GetType().GetField("hTheme", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(th) as UxTheme.SafeThemeHandle);
 }