51 lines
3.3 KiB
Plaintext
51 lines
3.3 KiB
Plaintext
|
|
<Window x:Class="ChatController.OwnChatMessageBox"
|
||
|
|
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:converter="clr-namespace:ChatController.Converter"
|
||
|
|
mc:Ignorable="d" ResizeMode="NoResize" Title="{Binding Path=Title, UpdateSourceTrigger=PropertyChanged}"
|
||
|
|
d:DesignHeight="450" d:DesignWidth="400" WindowStartupLocation="CenterOwner"
|
||
|
|
Height="150" Width="400" >
|
||
|
|
<Window.Resources>
|
||
|
|
<converter:OwnChatNullVisibilityConverter x:Key="NullVisibilityConverter" />
|
||
|
|
|
||
|
|
<Style x:Key="OrangeButtonStyle" TargetType="{x:Type Button}">
|
||
|
|
<Setter Property="BorderBrush" Value="#FF5A00" />
|
||
|
|
<Setter Property="Background" Value="#FF5A00" />
|
||
|
|
<Setter Property="Foreground" Value="White"></Setter>
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
||
|
|
<Border x:Name="Border" Background="#FF5A00" CornerRadius="5" Padding="5,2">
|
||
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||
|
|
</Border>
|
||
|
|
<ControlTemplate.Triggers>
|
||
|
|
<Trigger Property="IsMouseOver" Value="True">
|
||
|
|
<Setter Property="Background" Value="#FF988F" TargetName="Border" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="IsPressed" Value="True">
|
||
|
|
<Setter Property="Background" Value="#FF7654" TargetName="Border" />
|
||
|
|
</Trigger>
|
||
|
|
<Trigger Property="IsEnabled" Value="False">
|
||
|
|
<Setter Property="Background" Value="LightGray" TargetName="Border" />
|
||
|
|
</Trigger>
|
||
|
|
</ControlTemplate.Triggers>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
</Window.Resources>
|
||
|
|
<Grid Margin="5" HorizontalAlignment="Center">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<TextBlock Grid.Row="0" Text="{Binding Path=MessageBoxText, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Margin="5" TextWrapping="Wrap"/>
|
||
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Stretch">
|
||
|
|
<Button Margin="5" FontSize="14" Content="{Binding Path=PositiveButtonText, UpdateSourceTrigger=PropertyChanged}" Width="150" Style="{StaticResource OrangeButtonStyle}" Height="30" Click="PositiveButton_OnClick" Visibility="{Binding Path=PositiveButtonText, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource NullVisibilityConverter}}" />
|
||
|
|
<Button Margin="5" FontSize="14" Content="{Binding Path=CloseButtonText, UpdateSourceTrigger=PropertyChanged}" Width="150" Style="{StaticResource OrangeButtonStyle}" Click="CloseButton_OnClick" />
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Window>
|