Browse Source

revert controlcatalog changes.

Dan Walmsley 5 years ago
parent
commit
1fcc1b8778
2 changed files with 24 additions and 24 deletions
  1. 23 23
      samples/ControlCatalog/MainView.xaml.cs
  2. 1 1
      samples/ControlCatalog/MainWindow.xaml

+ 23 - 23
samples/ControlCatalog/MainView.xaml.cs

@@ -32,30 +32,30 @@ namespace ControlCatalog
 
             }
 
-            //var light = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
-            //{
-            //    Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default")
-            //};
-            //var dark = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
-            //{
-            //    Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Default")
-            //};
+            var light = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
+            {
+                Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default")
+            };
+            var dark = new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
+            {
+                Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Default")
+            };
 
-            
-            //var themes = this.Find<ComboBox>("Themes");
-            //themes.SelectionChanged += (sender, e) =>
-            //{
-            //    switch (themes.SelectedIndex)
-            //    {
-            //        case 0:
-            //            Styles[0] = light;
-            //            break;
-            //        case 1:
-            //            Styles[0] = dark;
-            //            break;
-            //    }
-            //};
-            //Styles.Add(light);
+
+            var themes = this.Find<ComboBox>("Themes");
+            themes.SelectionChanged += (sender, e) =>
+            {
+                switch (themes.SelectedIndex)
+                {
+                    case 0:
+                        Styles[0] = light;
+                        break;
+                    case 1:
+                        Styles[0] = dark;
+                        break;
+                }
+            };
+            Styles.Add(light);
 
             var decorations = this.Find<ComboBox>("Decorations");
             decorations.SelectionChanged += (sender, e) =>

+ 1 - 1
samples/ControlCatalog/MainWindow.xaml

@@ -7,7 +7,7 @@
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:vm="clr-namespace:ControlCatalog.ViewModels"
         xmlns:v="clr-namespace:ControlCatalog.Views"
-        x:Class="ControlCatalog.MainWindow" WindowState="{Binding WindowState, Mode=TwoWay}">
+        x:Class="ControlCatalog.MainWindow" WindowState="{Binding WindowState, Mode=TwoWay}" Background="Transparent">
   <NativeMenu.Menu>
     <NativeMenu>
       <NativeMenuItem Header="File">