Analysis-Services/MetadataTranslator/Metadata Translator/UI/ConnectionStringInput.xaml

52 lines
2.8 KiB
Plaintext
Raw Normal View History

<UserControl x:Class="Metadata_Translator.ConnectionStringInput"
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">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="{StaticResource DatasetConnection}" Margin="4,0"/>
<TextBox x:Name="ConnectionString" Grid.Row="0" Grid.Column="1" VerticalContentAlignment="Center">
<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 DatasetConnectionPrompt}" 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="1" 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>