1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <UserControl x:Class="Aitex.UI.RecipeEditor.SmartCellEditor"
- 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:Aitex.UI.RecipeEditor"
- mc:Ignorable="d"
- xmlns:xceed="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
- d:DesignHeight="20" d:DesignWidth="20" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
-
- <UserControl.Resources>
- <local:VisibilityConverter x:Key="visConverter" />
- <local:TimeSpanConverter x:Key="timeSpanConverter" />
- <local:NumConverter x:Key="numConverter" />
- <local:BoolConverter x:Key="boolConverter" />
- <local:BoolToVisibilityConverter x:Key="boolToVisibilityConverter"/>
- </UserControl.Resources>
- <StackPanel>
-
- <!--TextBlock-->
- <TextBlock x:Name="textBlock"
- Background="{Binding Background}"
- Foreground="{Binding Foreground}"
- Text="{Binding Path=Display,Mode=OneWay}"
- ToolTip="{Binding ToolTip}"
- FontWeight="{Binding FontWeight}"
- Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=TextBlock}"/>
- <!--Editable ComboBox-->
- <ComboBox x:Name="editableComboBox" ItemsSource="{Binding RecipeVariableDefine.DropdownItemList}" IsEditable="True"
- DisplayMemberPath="Item2" Text="{Binding Value,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
- Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=EditableComboBox}" />
- <!--Readonly ComboBox-->
- <ComboBox x:Name="readonlyComboBox" ItemsSource="{Binding RecipeVariableDefine.DropdownItemList}" IsEditable="False"
- DisplayMemberPath="Item2" SelectedValuePath="Item1" SelectedValue="{Binding Path=Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
- Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=ReadonlyComboBox}" />
- <!--Text Input TextBox-->
- <TextBox HorizontalContentAlignment="Left" Text="{Binding Value}" Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=TextBox}" TextAlignment="Left" />
- <!--Number Input TextBox-->
- <!--<DockPanel LastChildFill="True" Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=DecimalUpDown}" >
- <CheckBox Margin="10,0,0,0" DockPanel.Dock="Right" Content="Jump" IsChecked="{Binding IsJump}" Visibility="{Binding Path=ShowsJumpControl, Converter={StaticResource boolToVisibilityConverter}}"/>-->
- <xceed:DecimalUpDown HorizontalAlignment="Stretch" FormatString="G" Value="{Binding Path=Value,Converter={StaticResource numConverter},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Increment="1" TextAlignment="Left"
- Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=DecimalUpDown}"/>
- <!--</DockPanel>-->
-
- <!--CheckBox-->
- <CheckBox x:Name="checkBox" Content="{Binding Tag}" IsChecked="{Binding Path=Value,Converter={StaticResource boolConverter},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=CheckBox}" />
- <!--TimePicker-->
- <xceed:DateTimeUpDown HorizontalContentAlignment="Left" Format="Custom" FormatString="HH:mm:ss" Value="{Binding Path=Value,Converter={StaticResource timeSpanConverter},Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=TimePicker}" CultureInfo="uk-UA" />
- <!--EndPoint-->
- <Button x:Name="endPoint" HorizontalAlignment="Stretch" Padding="0" Margin="0" VerticalAlignment="Stretch" Content="EndPoint" Command="{Binding EndPointCommand}" Visibility="{Binding Path=., Converter={StaticResource visConverter},ConverterParameter=EndPoint}" />
- </StackPanel>
- </UserControl>
|