Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Louis <savagesoftware@gmail.com>2018-02-08 14:18:07 +0300
committerDominique Louis <savagesoftware@gmail.com>2018-02-08 21:48:19 +0300
commit1b9d187b8d8fdb4e86e2cbf6b3ecac33708635ad (patch)
treed685def38f0a0387d95602c271b9dbbf0e5da5c7 /Xamarin.PropertyEditing.Windows.Standalone
parent3dbf0d4d527fd36b65d435caf66b58251a9e704f (diff)
Support None theme.
Diffstat (limited to 'Xamarin.PropertyEditing.Windows.Standalone')
-rw-r--r--Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml11
-rw-r--r--Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs12
2 files changed, 16 insertions, 7 deletions
diff --git a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml
index 4671d60..9d38b3d 100644
--- a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml
+++ b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml
@@ -1,4 +1,4 @@
-<Window x:Class="Xamarin.PropertyEditing.Windows.Standalone.MainWindow"
+<Window x:Class="Xamarin.PropertyEditing.Windows.Standalone.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -20,9 +20,12 @@
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
- <RadioButton Grid.Row="0" Grid.Column="0" Click="Theme_Click" IsChecked="True">Dark Theme</RadioButton>
- <RadioButton Grid.Row="0" Grid.Column="1" Click="Theme_Click">Light Theme</RadioButton>
- <local:MockedSampleControlButton Grid.Row="1" Grid.Column="0" Click="Button_Click">Mocked Sample 1</local:MockedSampleControlButton>
+ <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal">
+ <RadioButton GroupName="theme" Padding="5, 0, 20, 0" Click="Theme_Click" IsChecked="True">Dark Theme</RadioButton>
+ <RadioButton GroupName="theme" Padding="5, 0, 20, 0" Click="Theme_Click">Light Theme</RadioButton>
+ <RadioButton GroupName="theme" Padding="5, 0, 20, 0" Click="Theme_Click">No Theme</RadioButton>
+ </StackPanel>
+ <local:MockedSampleControlButton Grid.Row="1" Grid.Column="0" Click="Button_Click">Mocked Sample 1</local:MockedSampleControlButton>
<local:MockedSampleControlButton Grid.Row="2" Grid.Column="0" Click="Button_Click">Mocked Sample 2</local:MockedSampleControlButton>
<local:MockedWpfButton Grid.Row="3" Grid.Column="0" Click="Button_Click">Mocked WPF button</local:MockedWpfButton>
<Button Grid.Row="4" Grid.Column="0" Click="Button_Click">Actual WPF button</Button>
diff --git a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
index 00224af..0d5727a 100644
--- a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
+++ b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
@@ -50,10 +50,16 @@ namespace Xamarin.PropertyEditing.Windows.Standalone
{
var rb = e.Source as RadioButton;
if (rb != null) {
- if (rb.Content.ToString ().Equals ("Dark Theme")) {
- PropertyEditorPanel.ThemeManager.Theme = PropertyEditing.Themes.PropertyEditorTheme.Dark;
- } else {
+ switch (rb.Content.ToString()) {
+ case "Dark Theme":
+ PropertyEditorPanel.ThemeManager.Theme = PropertyEditing.Themes.PropertyEditorTheme.Dark;
+ break;
+ case "Light Theme":
PropertyEditorPanel.ThemeManager.Theme = PropertyEditing.Themes.PropertyEditorTheme.Light;
+ break;
+ default:
+ PropertyEditorPanel.ThemeManager.Theme = PropertyEditing.Themes.PropertyEditorTheme.None;
+ break;
}
}
}