72 lines
2.7 KiB
XML
72 lines
2.7 KiB
XML
<UserControl
|
||
x:Class="WpfApp1.DialogFrame"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:local="clr-namespace:WpfApp1"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
d:DesignHeight="450"
|
||
d:DesignWidth="800"
|
||
Background="#34000000"
|
||
KeyDown="DialogFrame_OnKeyDown"
|
||
mc:Ignorable="d">
|
||
<Border
|
||
x:Name="DialogBorder"
|
||
Margin="60"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Background="White"
|
||
BorderBrush="Black"
|
||
BorderThickness="1"
|
||
MouseMove="Border_OnMouseMove">
|
||
<Border.RenderTransform>
|
||
<TranslateTransform x:Name="BorderTransform" />
|
||
</Border.RenderTransform>
|
||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition />
|
||
</Grid.RowDefinitions>
|
||
<Grid
|
||
Grid.Row="0"
|
||
Height="32"
|
||
Background="WhiteSmoke"
|
||
MouseDown="Border_OnMouseDown"
|
||
MouseUp="Border_OnMouseUp">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="Auto" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock
|
||
x:Name="TitleBlock"
|
||
Grid.Column="0"
|
||
Margin="10,0,0,0"
|
||
VerticalAlignment="Center"
|
||
FontSize="14" />
|
||
<Button
|
||
Grid.Column="1"
|
||
Padding="20,2"
|
||
HorizontalAlignment="Right"
|
||
VerticalContentAlignment="Center"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
Click="CloseDialog_OnClick"
|
||
FontFamily="Segoe UI Symbol"
|
||
FontSize="12">
|
||
╳
|
||
</Button>
|
||
</Grid>
|
||
<ScrollViewer
|
||
Grid.Row="1"
|
||
HorizontalScrollBarVisibility="Auto"
|
||
VerticalScrollBarVisibility="Auto">
|
||
<StackPanel Margin="10" Orientation="Vertical">
|
||
<TextBlock x:Name="MessageBlock" />
|
||
<Button x:Name="NewDialog" Click="NewDialog_OnClick">New dialog</Button>
|
||
<TextBlock x:Name="MouseStatus" FontSize="10" />
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
</Grid>
|
||
</Border>
|
||
</UserControl>
|