fixed conflicts
This commit is contained in:
commit
3946c032bf
@ -13,5 +13,39 @@ namespace Magazyn
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
public void ChangeTheme(int index)
|
||||
{
|
||||
Resources.MergedDictionaries.Clear();
|
||||
Uri[] uris = new Uri[4];
|
||||
|
||||
uris[1] = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml");
|
||||
|
||||
switch (index % 3) {
|
||||
case 0:
|
||||
uris[0] = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml");
|
||||
uris[2] = new Uri("pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml");
|
||||
uris[3] = new Uri("pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Cyan.xaml");
|
||||
break;
|
||||
|
||||
case 1:
|
||||
uris[0] = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml");
|
||||
uris[2] = new Uri("pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Lime.xaml");
|
||||
uris[3] = new Uri("pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Green.xaml");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
uris[0] = new Uri("pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml");
|
||||
uris[2] = new Uri("pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepOrange.xaml");
|
||||
uris[3] = new Uri("pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Orange.xaml");
|
||||
break;
|
||||
}
|
||||
|
||||
Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = uris[0] });
|
||||
Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = uris[1] });
|
||||
Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = uris[2] });
|
||||
Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = uris[3] });
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,9 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="App.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\add.png" />
|
||||
|
Loading…
Reference in New Issue
Block a user