diff options
author | Eric Maupin <ermaup@microsoft.com> | 2018-04-30 23:20:01 +0300 |
---|---|---|
committer | Eric Maupin <ermaup@microsoft.com> | 2018-05-01 01:00:32 +0300 |
commit | b7c1f820dfd56e6cefeb10a45ca5b04fe87b32b0 (patch) | |
tree | b90daef7edbf905476799d1ec922d1fdd5ef8145 | |
parent | 70c58f024cfb570d761105480126673db631ee5f (diff) |
[Win] Center collection editor window
-rw-r--r-- | Xamarin.PropertyEditing.Windows/CollectionEditor.cs | 3 | ||||
-rw-r--r-- | Xamarin.PropertyEditing.Windows/CollectionEditorWindow.xaml | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Xamarin.PropertyEditing.Windows/CollectionEditor.cs b/Xamarin.PropertyEditing.Windows/CollectionEditor.cs index 41f7c01..3e37216 100644 --- a/Xamarin.PropertyEditing.Windows/CollectionEditor.cs +++ b/Xamarin.PropertyEditing.Windows/CollectionEditor.cs @@ -24,7 +24,8 @@ namespace Xamarin.PropertyEditing.Windows button.Click += (sender, args) => { var window = new CollectionEditorWindow (topLevel.Resources.MergedDictionaries) { - DataContext = DataContext + DataContext = DataContext, + Owner = Window.GetWindow (topLevel) }; window.ShowDialog (); diff --git a/Xamarin.PropertyEditing.Windows/CollectionEditorWindow.xaml b/Xamarin.PropertyEditing.Windows/CollectionEditorWindow.xaml index 8eb70b9..1b4fccb 100644 --- a/Xamarin.PropertyEditing.Windows/CollectionEditorWindow.xaml +++ b/Xamarin.PropertyEditing.Windows/CollectionEditorWindow.xaml @@ -6,8 +6,9 @@ xmlns:local="clr-namespace:Xamarin.PropertyEditing.Windows" xmlns:prop="clr-namespace:Xamarin.PropertyEditing.Properties;assembly=Xamarin.PropertyEditing" mc:Ignorable="d" Background="{DynamicResource DialogBackgroundBrush}" Foreground="{DynamicResource DialogForegroundBrush}" - MinHeight="300" Height="500" MinWidth="500" Width="700" ShowIcon="False" ShowMaximize="False" ShowMinimize="False" + MinHeight="300" Height="500" MinWidth="500" Width="700" ShowIcon="False" ShowMaximize="False" ShowMinimize="False" WindowStartupLocation="CenterOwner" Title="{Binding Property.Name, StringFormat={x:Static prop:Resources.CollectionEditorTitle},Mode=OneTime}"> + <Grid Margin="12"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> |