init
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<Window x:Class="DTS.Common.Dialogs.NotificationWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
Title="{Binding Title}" Icon="{Binding ImageUri, ElementName=notificationWindow}" WindowStyle="ToolWindow" ResizeMode="NoResize"
|
||||
SizeToContent="WidthAndHeight" MinWidth="300" MaxWidth="500" MinHeight="150" MaxHeight="500"
|
||||
x:Name="notificationWindow">
|
||||
|
||||
<Window.Resources>
|
||||
<Style x:Key="ReadOnlyTextBox" TargetType="TextBox">
|
||||
<Setter Property="IsReadOnly" Value="True" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
<Setter Property="Height" Value="Auto"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Margin" Value="5"/>
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="BorderBrush" Value="White"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="IsTabStop" Value="False"/>
|
||||
<Setter Property="TextAlignment" Value="Left"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
|
||||
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
|
||||
</Style>
|
||||
<Style x:Key="LinkButton" TargetType="Button">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<TextBlock TextDecorations="Underline">
|
||||
<ContentPresenter />
|
||||
</TextBlock>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Foreground" Value="Red" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid x:Name="LayoutRoot" Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="48"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Row="0" Grid.Column="0" Source="{Binding ImageUri, ElementName=notificationWindow}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5,5,0,5"/>
|
||||
|
||||
<ContentControl Grid.Row="0" Grid.Column="1" ContentTemplate="{Binding NotificationTemplate, ElementName=notificationWindow}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,10,10,5">
|
||||
<TextBox Text="{Binding Content.Message, Mode=OneWay}" Style="{StaticResource ReadOnlyTextBox}"/>
|
||||
</ContentControl>
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5,5,10,5">
|
||||
<Button Style="{StaticResource LinkButton}" Content="Copy to clipboard" Margin="0,5,20,0" HorizontalAlignment="Center" Click="CoppyToClibord_Click"/>
|
||||
<Button x:Name="OKButton" Content="OK" Width="70" Height="25" Cursor="Hand" HorizontalAlignment="Right">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:CallMethodAction TargetObject="{Binding ElementName=notificationWindow}" MethodName="Close"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user