diff options
Diffstat (limited to 'Xamarin.PropertyEditing.Windows')
5 files changed, 23 insertions, 3 deletions
diff --git a/Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml.cs b/Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml.cs index 0f6aa6a..cfc5fef 100644 --- a/Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml.cs +++ b/Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml.cs @@ -11,9 +11,9 @@ namespace Xamarin.PropertyEditing.Windows { public CreateResourceWindow (IEnumerable<ResourceDictionary> merged, IResourceProvider provider, IEnumerable<object> targets, IPropertyInfo property) { + InitializeComponent (); Resources.MergedDictionaries.AddItems (merged); DataContext = new CreateResourceViewModel (provider, targets, property); - InitializeComponent (); SetupResourceKey (); } @@ -40,7 +40,7 @@ namespace Xamarin.PropertyEditing.Windows var window = new CreateResourceWindow (owner.Resources.MergedDictionaries, provider, targets, property) { Owner = ownerWindow }; - window.Resources.MergedDictionaries.AddItems (owner.Resources.MergedDictionaries); + bool? result = window.ShowDialog(); var vm = (CreateResourceViewModel)window.DataContext; diff --git a/Xamarin.PropertyEditing.Windows/Themes/DialogResources.xaml b/Xamarin.PropertyEditing.Windows/Themes/DialogResources.xaml new file mode 100644 index 0000000..d88f58d --- /dev/null +++ b/Xamarin.PropertyEditing.Windows/Themes/DialogResources.xaml @@ -0,0 +1,13 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Xamarin.PropertyEditing.Windows"> + <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" /> + + <Style TargetType="CheckBox"> + <Setter Property="Foreground" Value="{DynamicResource DialogForegroundBrush}" /> + </Style> + + <Style TargetType="Expander"> + <Setter Property="Foreground" Value="{DynamicResource DialogForegroundBrush}" /> + </Style> +</ResourceDictionary>
\ No newline at end of file diff --git a/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml b/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml index 541d65d..867df42 100644 --- a/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml +++ b/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml @@ -9,6 +9,9 @@ MinWidth="300" MinHeight="400" Width="500" Height="600" ShowMinimize="False" ShowMaximize="False" Background="{DynamicResource DialogBackgroundBrush}" Foreground="{DynamicResource DialogForegroundBrush}" Title="{x:Static prop:Resources.SelectObjectTitle}"> + <Window.Resources> + <ResourceDictionary Source="Themes/DialogResources.xaml" /> + </Window.Resources> <Grid Margin="12"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> diff --git a/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml.cs b/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml.cs index c61cc2e..de96e47 100644 --- a/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml.cs +++ b/Xamarin.PropertyEditing.Windows/TypeSelectorWindow.xaml.cs @@ -10,9 +10,9 @@ namespace Xamarin.PropertyEditing.Windows { internal TypeSelectorWindow (IEnumerable<ResourceDictionary> mergedResources, AsyncValue<IReadOnlyDictionary<IAssemblyInfo, ILookup<string, ITypeInfo>>> assignableTypes) { - Resources.MergedDictionaries.AddItems (mergedResources); DataContext = new TypeSelectorViewModel (assignableTypes); InitializeComponent (); + Resources.MergedDictionaries.AddItems (mergedResources); } internal static ITypeInfo RequestType (FrameworkElement owner, AsyncValue<IReadOnlyDictionary<IAssemblyInfo, ILookup<string, ITypeInfo>>> assignableTypes) diff --git a/Xamarin.PropertyEditing.Windows/Xamarin.PropertyEditing.Windows.csproj b/Xamarin.PropertyEditing.Windows/Xamarin.PropertyEditing.Windows.csproj index 50467f8..1a0a2b4 100644 --- a/Xamarin.PropertyEditing.Windows/Xamarin.PropertyEditing.Windows.csproj +++ b/Xamarin.PropertyEditing.Windows/Xamarin.PropertyEditing.Windows.csproj @@ -147,6 +147,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Themes\DialogResources.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Themes\Resources.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> |