All rounded Tabitem and button template
This commit is contained in:
@@ -11,6 +11,83 @@
|
|||||||
MinWidth="800"
|
MinWidth="800"
|
||||||
MinHeight="480"
|
MinHeight="480"
|
||||||
WindowState="Maximized" >
|
WindowState="Maximized" >
|
||||||
|
|
||||||
|
<Window.Resources>
|
||||||
|
<!-- Style for Rounded Buttons -->
|
||||||
|
<Style TargetType="Button">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border
|
||||||
|
x:Name="Border"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="15"
|
||||||
|
|
||||||
|
Padding="5"
|
||||||
|
Margin="5">
|
||||||
|
<ContentPresenter
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<!-- Trigger for MouseOver -->
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="LightGray" />
|
||||||
|
</Trigger>
|
||||||
|
<!-- Trigger for Pressed -->
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="Gray" />
|
||||||
|
<Setter TargetName="Border" Property="BorderBrush" Value="DarkGray" />
|
||||||
|
</Trigger>
|
||||||
|
<!-- Trigger for Disabled -->
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter TargetName="Border" Property="Opacity" Value="0.5" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<!-- Style for TabItem with Rounded Top Corners -->
|
||||||
|
<Style TargetType="TabItem">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="TabItem">
|
||||||
|
<Border
|
||||||
|
x:Name="Border"
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="1 1 1 0"
|
||||||
|
CornerRadius="10,10,0,0"
|
||||||
|
|
||||||
|
Padding="8"
|
||||||
|
Margin="2 2 0 0">
|
||||||
|
<ContentPresenter
|
||||||
|
ContentSource="Header"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<!-- Trigger for Selected -->
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="LightBlue" />
|
||||||
|
<Setter TargetName="Border" Property="BorderBrush" Value="DarkBlue" />
|
||||||
|
</Trigger>
|
||||||
|
<!-- Trigger for MouseOver -->
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="LightGray" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<StatusBar DockPanel.Dock="Bottom" Height="30">
|
<StatusBar DockPanel.Dock="Bottom" Height="30">
|
||||||
@@ -27,17 +104,17 @@
|
|||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</StatusBar.ItemsPanel>
|
</StatusBar.ItemsPanel>
|
||||||
<StatusBarItem Grid.Column="0" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
<StatusBarItem Grid.Column="0" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
||||||
<TextBlock x:Name="firealarmstatusbar" Text="Fire Alarm Status" />
|
<TextBlock x:Name="firealarmstatusbar" Text="Fire Alarm Status" Margin="5 0"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
|
|
||||||
<StatusBarItem Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
<StatusBarItem Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
||||||
<TextBlock x:Name="modbusstatusbar" Text="Modbus Status" />
|
<TextBlock x:Name="modbusstatusbar" Text="Modbus Status" Margin="5 0"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
<StatusBarItem Grid.Column="2" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
<StatusBarItem Grid.Column="2" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
||||||
<TextBlock x:Name="vxstatusbar" Text="VX-3000 Status" />
|
<TextBlock x:Name="vxstatusbar" Text="VX-3000 Status" Margin="5 0"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
<StatusBarItem Grid.Column="3" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
<StatusBarItem Grid.Column="3" HorizontalContentAlignment="Center" BorderBrush="Black" BorderThickness="1">
|
||||||
<TextBlock x:Name="datetimebar" Text="Date and Time" />
|
<TextBlock x:Name="datetimebar" Text="Date and Time" Margin="5 0"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
<TabControl>
|
<TabControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user