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:
Diffstat (limited to 'Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs')
-rw-r--r--Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
index 0d5727a..eb5751a 100644
--- a/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
+++ b/Xamarin.PropertyEditing.Windows.Standalone/MainWindow.xaml.cs
@@ -17,6 +17,7 @@ namespace Xamarin.PropertyEditing.Windows.Standalone
InitializeComponent ();
this.panel.TargetPlatform = new TargetPlatform {
SupportsCustomExpressions = true,
+ SupportsMaterialDesign = true,
GroupedTypes = new Dictionary<Type, string> {
{ typeof(CommonBrush), "Brush" }
}
@@ -36,6 +37,7 @@ namespace Xamarin.PropertyEditing.Windows.Standalone
if (mockedControl is MockedSampleControlButton mockedButton) {
IObjectEditor editor = await this.panel.EditorProvider.GetObjectEditorAsync (inspectedObject);
await mockedButton.SetBrushInitialValueAsync (editor, new CommonSolidBrush (20, 120, 220, 240, "sRGB"));
+ await mockedButton.SetMaterialDesignBrushInitialValueAsync (editor, new CommonSolidBrush (0x65, 0x1F, 0xFF, 200));
await mockedButton.SetReadOnlyBrushInitialValueAsync (editor, new CommonSolidBrush (240, 220, 15, 190));
}
}
@@ -48,8 +50,7 @@ namespace Xamarin.PropertyEditing.Windows.Standalone
private void Theme_Click (object sender, RoutedEventArgs e)
{
- var rb = e.Source as RadioButton;
- if (rb != null) {
+ if (e.Source is RadioButton rb) {
switch (rb.Content.ToString()) {
case "Dark Theme":
PropertyEditorPanel.ThemeManager.Theme = PropertyEditing.Themes.PropertyEditorTheme.Dark;