123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <UserControl x:Class="VirgoRT.Backends.IOView"
- 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:VirgoRT.Backends"
- xmlns:control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
- mc:Ignorable="d"
- d:DesignHeight="700" d:DesignWidth="1000" Background="SkyBlue">
- <UserControl.Resources>
- <Style x:Key="tabNull" TargetType="TabControl"></Style>
- </UserControl.Resources>
- <TabControl >
- <TabControl.Resources>
- <Style TargetType="{x:Type TabItem}">
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Padding" Value="0" />
- <Setter Property="Margin" Value="5,0,5,0" />
- <Setter Property="HeaderTemplate">
- <Setter.Value>
- <DataTemplate>
- <Border x:Name="grid" CornerRadius="5,5,0,0" Background="Silver" Width="120" >
- <ContentPresenter Content="{TemplateBinding Content}" Margin="15,5,15,5" HorizontalAlignment="Center">
- <ContentPresenter.LayoutTransform>
- <RotateTransform Angle="0"/>
- </ContentPresenter.LayoutTransform>
- </ContentPresenter>
- </Border>
- <DataTemplate.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type TabItem}},Path=IsSelected}" Value="True">
- <Setter TargetName="grid" Property="Background">
- <Setter.Value>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#d0e5f7" Offset="0"/>
- <GradientStop Color="#48b0e2" Offset="1"/>
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </TabControl.Resources>
- <TabItem Header="PLC1">
- <control:DiItemEditor DataContext="{Binding IoList[0]}" ></control:DiItemEditor>
- </TabItem>
- <TabItem Header="PLC2">
- <control:DiItemEditor DataContext="{Binding IoList[1]}" ></control:DiItemEditor>
- </TabItem>
-
-
- </TabControl>
-
- </UserControl>
|