diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-12-13 18:50:24 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-12-13 18:50:24 +0200 |
| commit | 471daec51d0fc9437f8551d5d48c9fa2fb031871 (patch) | |
| tree | 1ecd78d48d761c18936b311d4e3d8eb8ebfb3cd1 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml | |
| parent | 2a51f05523c1397b77eca5e5188520919205638c (diff) | |
| download | Tango-471daec51d0fc9437f8551d5d48c9fa2fb031871.tar.gz Tango-471daec51d0fc9437f8551d5d48c9fa2fb031871.zip | |
Machine Studio, Dynamic Module Loading...
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml | 138 |
1 files changed, 98 insertions, 40 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index f8424b26d..ad366ce9a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -15,12 +15,18 @@ <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}"> <materialDesign:DrawerHost.LeftDrawerContent> <DockPanel MinWidth="212"> - <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" - DockPanel.Dock="Top" + <Grid DockPanel.Dock="Top"> + <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" HorizontalAlignment="Right" Margin="16" IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" /> + + <StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> + <materialDesign:PackIcon VerticalAlignment="Center" Kind="Account" Foreground="{StaticResource AccentColorBrush}" Width="32" Height="32"></materialDesign:PackIcon> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">User Name</TextBlock> + </StackPanel> + </Grid> <ListBox x:Name="DemoItemsListBox" Margin="0 16 0 16" SelectedIndex="0"> - <ListBoxItem>Item 1</ListBoxItem> + <Button Command="{Binding HomeCommand}" Style="{DynamicResource MaterialDesignFlatButton}">Home</Button> <ListBoxItem>Item 2</ListBoxItem> <ListBoxItem>Item 3</ListBoxItem> <ListBoxItem>Item 4</ListBoxItem> @@ -32,11 +38,11 @@ <materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2" Mode="PrimaryMid" DockPanel.Dock="Top"> <DockPanel> - <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="False" + <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}" x:Name="MenuToggleButton"/> <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False"> <StackPanel> - <Button Content="Hello World"/> + <Button Content="Home"/> <Button Content="Nice Popup"/> <Button Content="Can't Touch This" IsEnabled="False" /> <Separator/> @@ -52,44 +58,96 @@ <Grid> <Grid> - <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <Grid Grid.Row="1"> + <Grid.RowDefinitions> + <RowDefinition Height="150"/> + <RowDefinition Height="*"/> + </Grid.RowDefinitions> <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="Auto"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> + <StackPanel Margin="30 20" HorizontalAlignment="Left"> + <TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}">Welcome to Machine Studio</TextBlock> + <TextBlock HorizontalAlignment="Right" Margin="0 5 -130 0" FontStyle="Italic" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Foreground="{StaticResource AccentColorBrush}">Select Your Studio Module...</TextBlock> + </StackPanel> + </Grid> + <ItemsControl ItemsSource="{Binding Modules}" Grid.Row="2" Margin="10"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <WrapPanel IsItemsHost="True"></WrapPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + + <ItemsControl.ItemTemplate> + <DataTemplate> + <materialDesign:Card Width="300" Margin="10" Height="400"> + <Grid > + <Grid.RowDefinitions> + <RowDefinition Height="180" /> + <RowDefinition Height="*" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" /> + <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start This Module"> + <materialDesign:PackIcon Kind="Play" Width="30" Height="30" /> + </Button> + <StackPanel Grid.Row="1" Margin="8,24,8,0"> + <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}"></TextBlock> + <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}"></TextBlock> + </StackPanel> + <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal"> + <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}"> + <StackPanel> + <Button Content="More" /> + <Button Content="Options" /> + </StackPanel> + </materialDesign:PopupBox> + </StackPanel> + </Grid> + </materialDesign:Card> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Grid> - <Grid Grid.Row="1"> - <db:MainDBView></db:MainDBView> - </Grid> + <Grid Grid.Row="1" RenderTransformOrigin="0.5,0.5"> + <Grid.Style> + <Style TargetType="Grid"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleX="0" ScaleY="0"></ScaleTransform> + </Setter.Value> + </Setter> + <Setter Property="Opacity" Value="0"></Setter> - <!--<dragablz:TabablzControl BorderThickness="0" FontSize="14" ItemContainerStyle="{DynamicResource TabItemStyle}"> - <dragablz:TabablzControl.Resources> - <Style x:Key="TabItemStyle" TargetType="{x:Type dragablz:DragablzItem}" BasedOn="{StaticResource MaterialDesignDragableTabItemStyle}"> - <Setter Property="Height" Value="60" /> - <Setter Property="Padding" Value="24,0,24,0" /> - </Style> - </dragablz:TabablzControl.Resources> - <dragablz:TabablzControl.InterTabController> - <dragablz:InterTabController /> - </dragablz:TabablzControl.InterTabController> - <TabItem Header="ORGANIZATIONS"> - <local:OrganizationsView></local:OrganizationsView> - </TabItem> - <TabItem Header="MACHINES"> - <local:MachinesView></local:MachinesView> - </TabItem> - <TabItem Header="ADDRESSES"> - <local:AddressesView></local:AddressesView> - </TabItem> - <TabItem Header="DISPENSERS"> - <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Looks Quite Nice</TextBlock> - </TabItem> - <TabItem Header="MEDIA LIST"> - <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">Looks Quite Nice</TextBlock> - </TabItem> - </dragablz:TabablzControl>--> - </Grid> + <Style.Triggers> + <DataTrigger Binding="{Binding CurrentModule}" Value="{x:Null}"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0" Duration="00:00:0.2"></DoubleAnimation> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2"></DoubleAnimation> + <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.2"></DoubleAnimation> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2"></DoubleAnimation> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2"></DoubleAnimation> + <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.2"></DoubleAnimation> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + <ContentPresenter Content="{Binding CurrentModule.MainView}"></ContentPresenter> </Grid> </Grid> </Grid> |
