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:
authorLarry Ewing <lewing@xamarin.com>2018-05-18 21:36:49 +0300
committerLarry Ewing <lewing@microsoft.com>2018-07-16 22:05:49 +0300
commit7e23b42f670e9436981c5eea6aca557f8e922510 (patch)
tree22e719aed6d510e8321e206699c463ac66d038c8 /Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
parent69ae70f60d82b44db6db126eaeb93e8eec5bf035 (diff)
Make BrushEditorControl subclass the improved generic PropertyEditorControl
This fixes some missing initialization logic that was causing a crash in the PropertyButton popup.
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs12
1 files changed, 1 insertions, 11 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
index 03cc76a..19e68da 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/BrushEditorControl.cs
@@ -35,7 +35,7 @@ namespace Xamarin.PropertyEditing.Mac
}
}
- internal class BrushEditorControl : PropertyEditorControl
+ internal class BrushEditorControl : PropertyEditorControl<BrushPropertyViewModel>
{
public BrushEditorControl ()
{
@@ -68,10 +68,6 @@ namespace Xamarin.PropertyEditing.Mac
UpdateTheme ();
}
- internal new BrushPropertyViewModel ViewModel {
- get => (BrushPropertyViewModel)base.ViewModel;
- set => base.ViewModel = value;
- }
readonly ColorPopUpButton popUpButton;
//readonly BrushTabViewController colorEditor;
@@ -124,7 +120,6 @@ namespace Xamarin.PropertyEditing.Mac
protected override void UpdateValue ()
{
- SetEnabled ();
this.brushTabViewController.ViewModel = ViewModel;
this.popUpButton.Popover = (ViewModel?.Property.CanWrite ?? false) ? popover : null;
@@ -142,10 +137,5 @@ namespace Xamarin.PropertyEditing.Mac
}
}
}
-
- protected override void OnViewModelChanged (PropertyViewModel oldModel)
- {
- UpdateValue ();
- }
}
}