diff options
author | Eric Maupin <me@ermau.com> | 2019-03-07 00:31:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 00:31:04 +0300 |
commit | 15742191d7400b0a0a0153d202a735d3f2955737 (patch) | |
tree | f55cf72b5f6cb7970fb9fc5caf19f2f4f9629f6a /Xamarin.PropertyEditing.Mac/Controls/RequestResource | |
parent | f2f3549c656b566a32ee52538298f06ce43190d3 (diff) | |
parent | 3eb26f865ffa2a776b170de0c30d0acb9a6911f8 (diff) |
Merge pull request #552 from xamarin/ermau-mac-fix-resources
[mac] Fix resource selection on non-brushes
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/RequestResource')
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourceView.cs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourceView.cs b/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourceView.cs index b329471..798342e 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourceView.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/RequestResource/RequestResourceView.cs @@ -75,14 +75,7 @@ namespace Xamarin.PropertyEditing.Mac var vmType = propertyViewModel.GetType (); var valuePropertyInfo = vmType.GetProperty ("Value"); var resourceValue = valuePropertyInfo.GetValue (propertyViewModel); - var resourceSelectorPropertyInfo = vmType.GetProperty ("ResourceSelector"); - var resourceSelector = resourceSelectorPropertyInfo.GetValue (propertyViewModel) as ResourceSelectorViewModel; - - if (resourceSelector != null) { - this.resourceSelectorPanel = new RequestResourcePanel (HostResources, resourceSelector, resourceValue); - } else { - this.resourceSelectorPanel = new RequestResourcePanel (HostResources, new ResourceSelectorViewModel (propertyViewModel.TargetPlatform.ResourceProvider, propertyViewModel.Editors.Select (ed => ed.Target), propertyViewModel.Property), resourceValue); - } + this.resourceSelectorPanel = new RequestResourcePanel (HostResources, new ResourceSelectorViewModel (propertyViewModel.TargetPlatform.ResourceProvider, propertyViewModel.Editors.Select (ed => ed.Target), propertyViewModel.Property), resourceValue); this.resourceSelectorPanel.ResourceSelected += (sender, e) => { propertyViewModel.Resource = this.resourceSelectorPanel.SelectedResource; }; |