IOView.xaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <UserControl x:Class="Aitex.Triton160.UI.Views.IOView"
  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. mc:Ignorable="d"
  7. d:DesignHeight="800" d:DesignWidth="1250" Background="#669ACC">
  8. <UserControl.Resources>
  9. <BorderGapMaskConverter x:Key="BorderGapMaskConverter"/>
  10. <Style TargetType="{x:Type GroupBox}">
  11. <Setter Property="BorderBrush" Value="#D5DFE5" />
  12. <Setter Property="BorderThickness" Value="2" />
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate TargetType="{x:Type GroupBox}">
  16. <Grid SnapsToDevicePixels="true">
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="6" />
  19. <ColumnDefinition Width="Auto" />
  20. <ColumnDefinition Width="*" />
  21. <ColumnDefinition Width="6" />
  22. </Grid.ColumnDefinitions>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="Auto" />
  25. <RowDefinition Height="Auto" />
  26. <RowDefinition Height="*" />
  27. <RowDefinition Height="6" />
  28. </Grid.RowDefinitions>
  29. <Border CornerRadius="4" Grid.Row="1" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="4" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="Transparent" Background="{TemplateBinding Background}" />
  30. <Border Name="Header" Padding="3,1,3,0" Grid.Row="0" Grid.RowSpan="2" Grid.Column="1">
  31. <ContentPresenter ContentSource="Header" RecognizesAccessKey="true" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  32. </Border>
  33. <ContentPresenter Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  34. <Border Grid.Row="1" Grid.RowSpan="3" Grid.ColumnSpan="4" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3">
  35. <Border.OpacityMask>
  36. <MultiBinding Converter="{StaticResource BorderGapMaskConverter}" ConverterParameter="7">
  37. <Binding ElementName="Header" Path="ActualWidth" />
  38. <Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
  39. <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" />
  40. </MultiBinding>
  41. </Border.OpacityMask>
  42. </Border>
  43. </Grid>
  44. </ControlTemplate>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. </UserControl.Resources>
  49. <ScrollViewer>
  50. <StackPanel Orientation="Vertical" >
  51. <GroupBox Header="DI" Padding="10" Margin="20">
  52. <WrapPanel x:Name="diPanel" Orientation="Horizontal"></WrapPanel>
  53. </GroupBox>
  54. <GroupBox Header="DO" Padding="10" Margin="20">
  55. <WrapPanel x:Name="doPanel" Orientation="Horizontal"></WrapPanel>
  56. </GroupBox>
  57. <GroupBox Header="AI" Padding="10" Margin="20">
  58. <WrapPanel x:Name="aiPanel" Orientation="Horizontal"></WrapPanel>
  59. </GroupBox>
  60. <GroupBox Header="AO" Padding="10" Margin="20">
  61. <WrapPanel x:Name="aoPanel" Orientation="Horizontal"></WrapPanel>
  62. </GroupBox>
  63. </StackPanel>
  64. </ScrollViewer>
  65. </UserControl>