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/CreateResourceWindow.xaml')
-rw-r--r--Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml81
1 files changed, 81 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml b/Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml
new file mode 100644
index 0000000..d12a118
--- /dev/null
+++ b/Xamarin.PropertyEditing.Windows/CreateResourceWindow.xaml
@@ -0,0 +1,81 @@
+<local:WindowEx x:Class="Xamarin.PropertyEditing.Windows.CreateResourceWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:local="clr-namespace:Xamarin.PropertyEditing.Windows"
+ xmlns:prop="clr-namespace:Xamarin.PropertyEditing.Properties;assembly=Xamarin.PropertyEditing"
+ mc:Ignorable="d" x:ClassModifier="internal"
+ Background="{DynamicResource DialogBackgroundBrush}" Foreground="{DynamicResource DialogForegroundBrush}"
+ Height="270" Width="500" ResizeMode="NoResize" ShowMaximize="False" ShowIcon="False" ShowMinimize="False"
+ WindowStartupLocation="CenterOwner">
+ <local:WindowEx.Title>
+ <Binding StringFormat="{x:Static prop:Resources.CreateResourceTitle}" Path="Property.TypeName" Mode="OneTime" />
+ </local:WindowEx.Title>
+ <local:WindowEx.Resources>
+ <Style TargetType="RadioButton">
+ <Setter Property="Margin" Value="24,4,0,0" />
+ <Setter Property="Foreground" Value="{DynamicResource DialogForegroundBrush}" />
+ <Setter Property="FocusVisualStyle" Value="{DynamicResource GenericVisualFocusStyle}" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ <Style.Triggers>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Foreground" Value="#FFA2A4A5" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </local:WindowEx.Resources>
+ <Grid Margin="12">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <GroupBox Grid.Row="0" Header="{x:Static prop:Resources.ResourceNameLabel}" Margin="0,4,0,0" BorderThickness="0">
+ <StackPanel>
+ <RadioButton HorizontalContentAlignment="Stretch" IsChecked="{Binding IsKeyed,Mode=TwoWay}">
+ <local:TextBoxEx x:Name="resourceKey" Text="{Binding ResourceKey,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource ValidationTextBox}" />
+ </RadioButton>
+ <RadioButton IsEnabled="{Binding CanApplyToAll,Mode=OneTime}" IsChecked="{Binding IsAppliedToAll,Mode=TwoWay}">Apply to all</RadioButton>
+ </StackPanel>
+ </GroupBox>
+
+ <GroupBox Grid.Row="1" Header="{x:Static prop:Resources.DefineIn}" Margin="0,4,0,0" BorderThickness="0">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="27" />
+ <RowDefinition Height="27" />
+ <RowDefinition Height="27" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <RadioButton Grid.Column="0" Grid.Row="0" Content="{x:Static prop:Resources.Application}" IsChecked="{Binding DefineInApplication,Mode=TwoWay}" />
+ <RadioButton Grid.Column="0" Grid.Row="1" Content="{x:Static prop:Resources.ThisDocument}" IsEnabled="{Binding HasDocumentSources}" IsChecked="{Binding DefineInDocument,Mode=TwoWay}" />
+ <RadioButton Grid.Column="0" Grid.Row="2" Content="{x:Static prop:Resources.ResourceDictionary}" IsEnabled="{Binding HasApplicationSources}" IsChecked="{Binding DefineInApplicationSource,Mode=TwoWay}" />
+
+ <ComboBox Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Width="160" Margin="25,4,25,0" IsEnabled="{Binding DefineInDocument}" ItemsSource="{Binding DocumentSources}" SelectedItem="{Binding SelectedDocumentSource,Mode=TwoWay}" DisplayMemberPath="Name" />
+ <ComboBox Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" Width="160" Margin="25,4,25,0" IsEnabled="{Binding DefineInApplicationSource}" ItemsSource="{Binding ApplicationSources}" SelectedItem="{Binding SelectedApplicationSource,Mode=TwoWay}" DisplayMemberPath="Name" />
+ </Grid>
+ </GroupBox>
+
+ <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,4,0,0">
+ <Button Name="ok" MinHeight="23" MinWidth="75" Content="{x:Static prop:Resources.OK}" IsDefault="True" Command="{Binding CreateResourceCommand,Mode=OneTime}" Click="OnOkClicked" />
+ <Button MinHeight="23" MinWidth="75" Margin="4,0,0,0" Content="{x:Static prop:Resources.Cancel}" IsCancel="True" Click="OnCancelClicked" />
+ </StackPanel>
+
+ <Border Background="{DynamicResource DialogBackgroundBrush}" Grid.Row="0" Grid.RowSpan="2">
+ <Border.Visibility>
+ <Binding Path="HasFatalError">
+ <Binding.Converter>
+ <BooleanToVisibilityConverter />
+ </Binding.Converter>
+ </Binding>
+ </Border.Visibility>
+ <TextBlock Text="{Binding FatalError}" HorizontalAlignment="Center" VerticalAlignment="Center" />
+ </Border>
+ </Grid>
+</local:WindowEx>