2
0
Files
controlmymonitormanagement/ControlMyMonitorManagement/Style/MonCtrlStyle.xaml

34 lines
1.8 KiB
Plaintext
Raw Normal View History

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2022-05-23 00:58:58 +08:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CMM.Management.Control">
<Style TargetType="{x:Type local:MonCtrl}">
<Setter Property="Margin" Value="10"/>
2022-05-23 00:58:58 +08:00
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:MonCtrl}">
<Border Background="#44000000" CornerRadius="8" Padding="15">
<StackPanel Orientation="Vertical">
<!-- Monitor Name Header -->
<TextBlock Text="{Binding Mon.MonitorName, Mode=OneWay,
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:MonCtrl}}}"
FontSize="16"
FontWeight="Bold"
Foreground="White"
Margin="0,0,0,10"/>
<TextBlock Text="{Binding Mon.SerialNumber, Mode=OneWay,
RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:MonCtrl}}}"
FontSize="11"
Foreground="#AAAAAA"
Margin="0,0,0,15"/>
<!-- Dynamic controls container -->
<StackPanel x:Name="sp" Orientation="Vertical"/>
</StackPanel>
</Border>
2022-05-23 00:58:58 +08:00
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>