diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-08 19:22:42 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-08 19:22:42 +0200 |
| commit | 6103db0f792e396583929c08117e07fb6b9aa389 (patch) | |
| tree | b7606b44cce5c3b224ddba8ac6491aff48438b50 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml | |
| parent | a1432b11d087a4b2f4530504e18434225b36bf48 (diff) | |
| download | Tango-6103db0f792e396583929c08117e07fb6b9aa389.tar.gz Tango-6103db0f792e396583929c08117e07fb6b9aa389.zip | |
Working on MachineTechView...
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml | 94 |
1 files changed, 89 insertions, 5 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml index 256a4a385..371caf5d7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml @@ -5,8 +5,11 @@ xmlns:vm="clr-namespace:Tango.MachineStudio.Technician.ViewModels" xmlns:global="clr-namespace:Tango.MachineStudio.Technician" xmlns:editors="clr-namespace:Tango.Editors;assembly=Tango.Editors" + xmlns:techItems="clr-namespace:Tango.MachineStudio.Technician.TechItems" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:templates="clr-namespace:Tango.MachineStudio.Technician.PropertiesTemplates" + xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Tango.MachineStudio.Technician.Views" @@ -37,7 +40,34 @@ </Menu> <Grid Grid.Row="1"> - + <StackPanel Orientation="Horizontal" Margin="20 0 0 0"> + <ListBox ItemContainerStyle="{StaticResource basicListBoxItem}" ItemsSource="{Binding AvailableTechItems}" SelectedItem="{Binding SelectedTechItem,Mode=TwoWay}" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"> + <ListBox.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal"></StackPanel> + </ItemsPanelTemplate> + </ListBox.ItemsPanel> + <ListBox.ItemTemplate> + <DataTemplate DataType="{x:Type techItems:TechItem}"> + <Border Cursor="Hand" ToolTip="{Binding Description}" Width="70" Padding="10" Margin="5" Height="70" BorderThickness="1" CornerRadius="100"> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Background" Value="Transparent"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource AccentColorBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem},Path=IsSelected}" Value="True"> + <Setter Property="Background" Value="#F9F9F9"></Setter> + <Setter Property="BorderBrush" Value="#FF7575"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Border.Style> + <Image Source="{Binding Image}" RenderOptions.BitmapScalingMode="Fant"></Image> + </Border> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + </StackPanel> </Grid> </Grid> @@ -49,12 +79,15 @@ <Grid> <editors:ElementsEditor + x:Name="editor" Elements="{Binding Elements}" ElementCreation="ElementsEditor_ElementCreation" Margin="0 0 5 0" RulerHeight="32" + EditorWidth="1920" + EditorHeight="1080" FontSize="10" - Background="White" + Background="#F1F1F1" EditorBackground="White" RulerBackground="White" Foreground="{StaticResource AccentColorBrush}" @@ -65,9 +98,60 @@ </Grid> <Grid Grid.Column="1"> - <GroupBox Header="PROPERTIES"> - - </GroupBox> + <StackPanel> + <TextBlock Margin="0 -30 0 0" DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement.Data}" Text="{Binding Description}" FontSize="16" FontWeight="Bold" FontStyle="Italic"></TextBlock> + <GroupBox Header="BOUNDS" Padding="5"> + <StackPanel> + <!--Position--> + <UniformGrid Columns="2" Margin="0 5 0 0"> + <StackPanel Margin="0 0 5 0"> + <TextBlock>Left</TextBlock> + <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Left}"></mahapps:NumericUpDown> + </StackPanel> + <StackPanel Margin="5 0 0 0"> + <TextBlock>Top</TextBlock> + <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="0" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Top}"></mahapps:NumericUpDown> + </StackPanel> + </UniformGrid> + + <!--Size--> + <UniformGrid Columns="2" Margin="0 20 0 0"> + <StackPanel Margin="0 0 5 0"> + <TextBlock>Width</TextBlock> + <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorWidth}" Value="{Binding ElementName=editor,Path=SelectedElement.Width}"></mahapps:NumericUpDown> + </StackPanel> + <StackPanel Margin="5 0 0 0"> + <TextBlock>Height</TextBlock> + <mahapps:NumericUpDown HasDecimals="False" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="10" Maximum="{Binding ElementName=editor,Path=EditorHeight}" Value="{Binding ElementName=editor,Path=SelectedElement.Height}"></mahapps:NumericUpDown> + </StackPanel> + </UniformGrid> + + <!--<Angle--> + <Grid Margin="0 20 0 0"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="22*"></ColumnDefinition> + <ColumnDefinition Width="20*"></ColumnDefinition> + </Grid.ColumnDefinitions> + <TextBlock VerticalAlignment="Center" Margin="0 0 10 0" HorizontalAlignment="Left">Angle</TextBlock> + <mahapps:NumericUpDown Grid.Column="1" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Maximum="360" Minimum="-360" HasDecimals="False" Margin="0 5 0 0" Value="{Binding ElementName=editor,Path=SelectedElement.Angle}"></mahapps:NumericUpDown> + </Grid> + </StackPanel> + </GroupBox> + + + <GroupBox Header="PROPERTIES" Margin="0 10 0 0"> + <ContentControl DataContext="{Binding ElementName=editor,Path=SelectedElement.HostedElement}" Content="{Binding ElementName=editor,Path=SelectedElement.HostedElement}"> + <ContentControl.Resources> + <DataTemplate DataType="{x:Type items:MonitorItem}"> + <templates:MonitorTemplate/> + </DataTemplate> + <DataTemplate DataType="{x:Type items:SingleGraphItem}"> + <templates:SingleGraphTemplate/> + </DataTemplate> + </ContentControl.Resources> + </ContentControl> + </GroupBox> + </StackPanel> </Grid> </Grid> </Grid> |
