Files
OmagCUT/DirectCuts/ControlsMachineButtonUC.xaml
Dario Sassi b1b4fe5c42 OmagCUT :
- riordinato direttorio con cartelle
- sistemazioni varie per lucidature e svuotature.
2020-02-21 11:07:21 +00:00

67 lines
3.4 KiB
XML

<UserControl x:Class="ControlsMachineButtonUC"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
DataContext="Self"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:OmagCUT="clr-namespace:OmagCUT"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
mc:Ignorable="d"
d:DesignHeight="597.3" d:DesignWidth="256">
<Border Style="{DynamicResource OmagCut_Page2Border}">
<ItemsControl ItemsSource="{Binding ButtonList}">
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
<ToggleButton IsChecked="{Binding IsChecked}"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:NoStateButton}">
<Button Command="{Binding ExecuteCommand}"
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
<Button Command="{Binding ExecuteCommand}"
Background="{Binding Background}"
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
<ToggleButton IsChecked="{Binding IsChecked}"
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</DataTemplate>
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</DataTemplate>
</ItemsControl.Resources>
<!--<ItemsControl.ItemTemplate>
<DataTemplate>
<ToggleButton IsChecked="{Binding IsChecked}"
Style="{StaticResource OmagCut_GradientYellowIconToggleButton}">
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</ToggleButton>
</DataTemplate>
</ItemsControl.ItemTemplate>-->
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="3" Rows="7"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Border>
</UserControl>