DataLabel.xaml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <UserControl x:Class="NEIntelligentControl2.Views.BoostStation.DataLabel"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:NEIntelligentControl2.Views.BoostStation"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800" Background="#01000000" MouseLeftButtonDown="UserControl_MouseLeftButtonDown" Loaded="UserControl_Loaded">
  9. <UserControl.Resources>
  10. <Style x:Key="TextBlockMain" TargetType="TextBlock">
  11. <Setter Property="MinWidth" Value="50"/>
  12. <Setter Property="Foreground" Value="WhiteSmoke"/>
  13. <Setter Property="FontSize" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Proportion}"/>
  14. <Style.Triggers>
  15. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsEditModel}" Value="False">
  16. <Setter Property="Background" Value="Transparent"/>
  17. </DataTrigger>
  18. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsEditModel}" Value="True">
  19. <Setter Property="Background" Value="#66FFFFFF"/>
  20. </DataTrigger>
  21. </Style.Triggers>
  22. </Style>
  23. <Style x:Key="GridMain" TargetType="Grid">
  24. <Setter Property="VerticalAlignment" Value="Center"/>
  25. <Setter Property="HorizontalAlignment" Value="Center"/>
  26. <Setter Property="MinWidth" Value="50"/>
  27. <Style.Triggers>
  28. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsSelected}" Value="True">
  29. <Setter Property="Effect">
  30. <Setter.Value>
  31. <DropShadowEffect ShadowDepth="0" BlurRadius="9" Color="WhiteSmoke"/>
  32. </Setter.Value>
  33. </Setter>
  34. </DataTrigger>
  35. </Style.Triggers>
  36. </Style>
  37. </UserControl.Resources>
  38. <Grid x:Name="_GMain" Style="{DynamicResource GridMain}">
  39. <TextBlock x:Name="_TBMain" Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Info}" Style="{DynamicResource TextBlockMain}"/>
  40. </Grid>
  41. </UserControl>