Browse Source

revert controlcatalog changes.

pull/4008/head
Dan Walmsley 6 years ago
parent
commit
1fcc1b8778
  1. 46
      samples/ControlCatalog/MainView.xaml.cs
  2. 2
      samples/ControlCatalog/MainWindow.xaml

46
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) =>

2
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">

Loading…
Cancel
Save