You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
7.5 KiB
101 lines
7.5 KiB
<local:BaseDialog x:Class="GummingCommon.MessageBoxServiceView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:GummingCommon"
|
|
Background="{DynamicResource DefaultWindowBackground}"
|
|
Title="" Height="260" Width="500" MaxHeight="600" MaxWidth="600" MinHeight="130" MinWidth="360" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
|
<Grid Background="Transparent">
|
|
<Border CornerRadius="3" BorderBrush="{DynamicResource DialogOuterBorder}" BorderThickness="0" Background="Transparent">
|
|
<Border CornerRadius="1" BorderThickness="0" Background="Transparent" Height="Auto" BorderBrush="{DynamicResource DialogInnerBorder}">
|
|
<Grid Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="36"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="auto"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" CornerRadius="2" Background="Transparent" >
|
|
<DockPanel>
|
|
<Label Content="{Binding WindowTitle}" Margin="4,3,0,0" HorizontalAlignment="Left" ></Label>
|
|
<Button Margin="0,5,5,5" Grid.Column="1" HorizontalAlignment="Right" Command="{Binding CancelCommand}" Focusable="False">
|
|
<Button.Template >
|
|
<ControlTemplate TargetType="{x:Type Button}" >
|
|
<Border Grid.Column="1" Grid.Row="2" Width="20" Height="20" CornerRadius="12">
|
|
<Border.Background>
|
|
<ImageBrush ImageSource="/Gumming;component/Resource/Close.png" Stretch="Fill">
|
|
</ImageBrush>
|
|
</Border.Background>
|
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" ></ContentPresenter>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
|
<Setter Property="Cursor" Value="Hand"></Setter>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
</DockPanel>
|
|
</Border>
|
|
<Grid Grid.Row="1" Margin="7">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid VerticalAlignment="Top" Margin="0,5,0,0">
|
|
<Image Height="26" Source="/Gumming;component/Resource/check.png" Stretch="Fill" Width="26" x:Name="spWarning" Visibility="{Binding spWarningVisibility}" />
|
|
<Image Height="26" Source="/Gumming;component/Resource/error.png" Stretch="Fill" Width="26" x:Name="spError" Visibility="{Binding spErrorVisibility}" />
|
|
<Image Height="26" Source="/Gumming;component/Resource/information.png" Stretch="Fill" Width="26" x:Name="spFinish" Visibility="{Binding spInforVisibility}" />
|
|
</Grid>
|
|
|
|
<Grid Grid.Column="1" Margin="5,0,0,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
<RowDefinition Height="auto"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Border x:Name="TextBoxBorder" BorderThickness="1">
|
|
<ScrollViewer x:Name="TextBoxScrollViewer" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
<TextBox Text="{Binding Message}" Name="txtMessage" FontWeight="Bold"
|
|
FontSize="12" VerticalScrollBarVisibility="Disabled" VerticalContentAlignment="Top"
|
|
TextWrapping="Wrap" BorderThickness="0" HorizontalScrollBarVisibility="Disabled" IsReadOnly="True"
|
|
Background="White" Foreground="{DynamicResource TextBrush}">
|
|
</TextBox>
|
|
</ScrollViewer>
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="BorderBrush" Value="Transparent"></Setter>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ElementName=TextBoxScrollViewer, Path=ComputedVerticalScrollBarVisibility}" Value="Visible">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Border}"></Setter>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Margin="7,0,10,7" >
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="85"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="85"></ColumnDefinition>
|
|
<ColumnDefinition Width="3"></ColumnDefinition>
|
|
<ColumnDefinition Width="85"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
<Button Width="85" Height="26" Grid.Column="0" Style="{DynamicResource CommonIconButton}" Visibility="{Binding btLeftVisibility}" Command="{Binding LeftButtonCommand}" IsDefault="{Binding LeftButtonIsDefault}">
|
|
<AccessText Text="{Binding btLeftContent}"></AccessText>
|
|
</Button>
|
|
<Button Width="85" Height="26" Grid.Column="2" Style="{DynamicResource CommonIconButton}" Visibility="{Binding btCenterVisibility}" Command="{Binding CenterButtonCommand}" IsDefault="{Binding CenterButtonIsDefault}">
|
|
<AccessText Text="{Binding btCenterContent}"></AccessText>
|
|
</Button>
|
|
<Button Width="85" Height="26" Grid.Column="4" Style="{DynamicResource CommonIconButton}" Visibility="{Binding btRightVisibility}" Command="{Binding RightButtonCommand}" IsDefault="{Binding RightButtonIsDefault}">
|
|
<AccessText Text="{Binding btRightContent}"></AccessText>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
</local:BaseDialog>
|