f23608580f
- gestito posizionamento e dimensione finestra - aggiunta funzione SplitStrign per lua - aggiunta barra sopra in MainWindow - gestita finestra con riposizionamento, dimensioni, ecc - gestita esecuzione asincrona - aggiunta verifica esecuzione macchina stati
95 lines
3.7 KiB
XML
95 lines
3.7 KiB
XML
<Window x:Class="MainWindowV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Supervisor"
|
|
Title="MainWindow"
|
|
Style="{StaticResource MainWindow}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="32"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Image Grid.Column="0"
|
|
Width="22"
|
|
Height="22"
|
|
Margin="4"
|
|
Source="/Resources/Icon.png" />
|
|
<ContentControl Grid.Column="1"
|
|
Content="{Binding ContentMenu}"/>
|
|
<TextBlock Grid.Column="2"
|
|
Margin="4 0 0 0"
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Text="{Binding WindowTitle}">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsActive, RelativeSource={RelativeSource AncestorType=Window}}" Value="False">
|
|
<Setter Property="Foreground" Value="{DynamicResource WindowTitleBarInactiveText}" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
|
|
<Button Grid.Column="3"
|
|
Click="OnMinimizeButtonClick"
|
|
RenderOptions.EdgeMode="Aliased"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18,15 H 28"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
<Button Name="maximizeButton"
|
|
Grid.Column="4"
|
|
Click="OnMaximizeRestoreButtonClick"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18.5,10.5 H 27.5 V 19.5 H 18.5 Z"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
<Button Name="restoreButton"
|
|
Grid.Column="4"
|
|
Click="OnMaximizeRestoreButtonClick"
|
|
Style="{StaticResource TitleBarButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18.5,12.5 H 25.5 V 19.5 H 18.5 Z M 20.5,12.5 V 10.5 H 27.5 V 17.5 H 25.5"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
<Button Grid.Column="5"
|
|
Click="OnCloseButtonClick"
|
|
Style="{StaticResource TitleBarCloseButtonStyle}">
|
|
<Path Width="46"
|
|
Height="32"
|
|
Data="M 18,11 27,20 M 18,20 27,11"
|
|
Stroke="{Binding Path=Foreground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type Button}}}"
|
|
StrokeThickness="1" />
|
|
</Button>
|
|
</Grid>
|
|
<ContentControl Grid.Row="2"
|
|
Content="{Binding ContentMenu}"/>
|
|
<ContentControl Grid.Row="1"
|
|
Content="{Binding ContentPanel}"/>
|
|
</Grid>
|
|
</Window>
|