|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <UserControl
- x:Class="BPASmartClient.DosingSystem.View.ConveyerBeltManualView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
- <UserControl.Resources>
- <Style x:Key="radioButtonStyle" TargetType="RadioButton">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="RadioButton">
- <Grid Name="gr" Opacity="0.8">
- <ContentControl
- Margin="{TemplateBinding Margin}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Content="{TemplateBinding Content}"
- FontSize="{TemplateBinding FontSize}"
- Foreground="{TemplateBinding Foreground}" />
- <Image
- Name="image"
- Source="/BPASmartClient.CustomResource;component/Image/边框线.png"
- Stretch="Fill" />
-
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/边框线.png" />
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/透明背景.png" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="gr" Property="Opacity" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
-
- <UserControl.DataContext>
- <vm:ConveyerBeltManualViewModel />
- </UserControl.DataContext>
- <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding ConveyerBeltModels}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Margin="8">
- <Grid
- Name="cy"
- Grid.Row="0"
- Margin="5">
- <pry:ImageBorder
- Grid.RowSpan="2"
- Width="{Binding ElementName=cy, Path=ActualWidth}"
- Height="{Binding ElementName=cy, Path=ActualHeight}" />
-
- <StackPanel Background="Transparent">
- <Grid Height="40">
- <Image
- Margin="2,3,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Source="/BPASmartClient.CustomResource;component/Image/标签.png" />
- <TextBlock
- Margin="10,10,0,0"
- VerticalAlignment="Top"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding Name}" />
- <StackPanel
- Margin="0,0,20,0"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <TextBlock
- Margin="0,0,2,0"
- Style="{StaticResource TextBlockStyle}"
- Text="输送带速度:" />
- <TextBox
- Width="170"
- Height="35"
- HorizontalAlignment="Right"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding Speed, UpdateSourceTrigger=PropertyChanged}" />
-
- <TextBlock
- Margin="20,0,5,0"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#00c2f4"
- Text="输送带控制" />
-
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding ConveyerBeltWork}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
-
- </StackPanel>
-
- </Grid>
- <Grid Name="gr" Height="200">
- <pry:ConveyBelt2
- Grid.RowSpan="4"
- Margin="-12,0,10,0"
- BeltDashThickess="50"
- BeltHeight="{Binding ElementName=gr, Path=ActualHeight}"
- BeltWidth="{Binding ElementName=gr, Path=ActualWidth}"
- IsRun="{Binding ConveyerBeltWork}" />
- </Grid>
- </StackPanel>
- </Grid>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </UserControl>
|