Analysis-Services/MetadataTranslator/Metadata Translator/UI/SettingsPanel.xaml
2021-02-24 17:34:03 -08:00

118 lines
6.9 KiB
XML

<UserControl x:Class="Metadata_Translator.SettingsPanel"
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:Metadata_Translator"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
IsVisibleChanged="Visibility_Changed" Background="#FFE7EBEC">
<Grid x:Name="grid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="32"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="{StaticResource DatasetConnection}" Margin="4,10,8,0" VerticalContentAlignment="Center"/>
<Label Grid.Row="1" Content="{StaticResource SubscriptionKey}" Margin="4,0,8,0"/>
<Label Grid.Row="2" Content="{StaticResource TranslatorEndpoint}" Margin="4,0,8,0"/>
<Label Grid.Row="3" Content="{StaticResource TranslatorLocation}" Margin="4,0,8,0"/>
<TextBox x:Name="AsServerInfo" Grid.Column="1" BorderThickness="0" Background="Transparent" IsReadOnly="True" Margin="4,10,8,0" VerticalContentAlignment="Center" Foreground="Gray"/>
<TextBox x:Name="SubscriptionKey" Grid.Row="1" Grid.Column="1" Margin="4,2,26,2">
<TextBox.Style>
<Style TargetType="TextBox" xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Style.Resources>
<VisualBrush x:Key="CueBrush" AlignmentX="Left" AlignmentY="Center" Stretch="None">
<VisualBrush.Visual>
<Grid>
<Rectangle Width="3000" Height="100" Fill="White"/>
<Label Content="{StaticResource SubscriptionKeyPrompt}" Foreground="Gray" FontStyle="Italic" VerticalAlignment="Center"/>
</Grid>
</VisualBrush.Visual>
</VisualBrush>
</Style.Resources>
<Style.Triggers>
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
<Setter Property="Background" Value="{StaticResource CueBrush}" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource CueBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<TextBox x:Name="TranslatorEndpoint" Grid.Row="2" Grid.Column="1" Margin="4,2,26,2">
<TextBox.Style>
<Style TargetType="TextBox" xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Style.Resources>
<VisualBrush x:Key="CueBrush" AlignmentX="Left" AlignmentY="Center" Stretch="None">
<VisualBrush.Visual>
<Grid>
<Rectangle Width="3000" Height="100" Fill="White"/>
<Label Content="{StaticResource TranslatorEndpointPrompt}" Foreground="Gray" FontStyle="Italic" VerticalAlignment="Center"/>
</Grid>
</VisualBrush.Visual>
</VisualBrush>
</Style.Resources>
<Style.Triggers>
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
<Setter Property="Background" Value="{StaticResource CueBrush}" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource CueBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<TextBox x:Name="TranslatorLocation" Grid.Row="3" Grid.Column="1" Margin="4,2,26,2">
<TextBox.Style>
<Style TargetType="TextBox" xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Style.Resources>
<VisualBrush x:Key="CueBrush" AlignmentX="Left" AlignmentY="Center" Stretch="None">
<VisualBrush.Visual>
<Grid>
<Rectangle Width="3000" Height="100" Fill="White"/>
<Label Content="{StaticResource TranslatorLocationPrompt}" Foreground="Gray" FontStyle="Italic" VerticalAlignment="Center"/>
</Grid>
</VisualBrush.Visual>
</VisualBrush>
</Style.Resources>
<Style.Triggers>
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
<Setter Property="Background" Value="{StaticResource CueBrush}" />
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource CueBrush}" />
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
<StackPanel Grid.Column="1" Grid.Row="4" Orientation="Horizontal" Margin="4,0">
<CheckBox x:Name="OverwriteTranslation" VerticalAlignment="Center"/>
<Label Content="{StaticResource OverwriteTranslation}" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="1" Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="OK" Margin="4" Width="48" Click="OKButton_Click"/>
<Button Content="Cancel" Margin="4" Width="48" Click="CancelButton_Click"/>
</StackPanel>
</Grid>
</UserControl>