123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <UserControl x:Class="NEIntelligentControl2.Views.BoostStation.DataTag"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:NEIntelligentControl2.Views.BoostStation"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded" Width="70" Height="17.24">
- <UserControl.Resources>
- <Style x:Key="TextBlockMain" TargetType="TextBlock">
- <Setter Property="MinWidth" Value="70"/>
- <Setter Property="HorizontalAlignment" Value="Right"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Foreground" Value="#FF31B9FB"/>
- <Setter Property="Background" Value="Transparent"/>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsEditModel}" Value="False">
- <Setter Property="Visibility" Value="Visible"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsEditModel}" Value="True">
- <Setter Property="Visibility" Value="Collapsed"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="TextBoxMain" TargetType="TextBox">
- <Setter Property="MinWidth" Value="70"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Stretch"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="HorizontalContentAlignment" Value="Right"/>
- <Setter Property="Foreground" Value="#FF31B9FB"/>
- <Setter Property="Background" Value="#66FFFFFF"/>
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsEditModel}" Value="False">
- <Setter Property="Visibility" Value="Collapsed"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsEditModel}" Value="True">
- <Setter Property="Visibility" Value="Visible"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="GridMain" TargetType="Grid">
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsSelected}" Value="True">
- <Setter Property="Effect">
- <Setter.Value>
- <DropShadowEffect ShadowDepth="0" BlurRadius="9" Color="WhiteSmoke"/>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </UserControl.Resources>
- <Viewbox>
- <Grid Style="{DynamicResource GridMain}">
- <TextBox Style="{DynamicResource TextBoxMain}" Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Info}" PreviewMouseLeftButtonDown="UserControl_MouseLeftButtonDown" MouseEnter="TextBox_MouseEnter"/>
- <TextBlock Style="{DynamicResource TextBlockMain}" Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Info}"/>
- </Grid>
- </Viewbox>
- </UserControl>
|