Exemplo n.º 1
0
 public BaseUserControl(IBaseModel baseModel, bool applyTheme)
 {
     this.applyTheme = applyTheme;
     DataContext = baseModel;
     Model = baseModel;
     BaseWindow.AddStyleResouse(Resources);
 }
Exemplo n.º 2
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            // При изменении темы
            if (applyTheme)
            {
                StyleSettings.Change += (s, a) => { ApplyTheme(); };
                BaseWindow.AddStyleResouse(Resources);
                ApplyTheme();
            }
        }