aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
blob: fbe45d36d939fae0e923e5cde48b7b39f4a881a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<controls:View x:Class="Tango.MachineStudio.UI.Views.MainView"
             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:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
             xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:managers="clr-namespace:Tango.MachineStudio.UI.Managers"
             xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1270" Background="White" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}">
    <Grid>
        <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
            <materialDesign:DrawerHost.LeftDrawerContent>
                <DockPanel MinWidth="212">
                    <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" 
                                    DockPanel.Dock="Top"
                                    HorizontalAlignment="Right" Margin="16"
                                    IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" />
                    <ListBox x:Name="DemoItemsListBox" Margin="0 16 0 16" SelectedIndex="0">
                        <ListBoxItem>Item 1</ListBoxItem>
                        <ListBoxItem>Item 2</ListBoxItem>
                        <ListBoxItem>Item 3</ListBoxItem>
                        <ListBoxItem>Item 4</ListBoxItem>
                        <ListBoxItem>Item 5</ListBoxItem>
                    </ListBox>
                </DockPanel>
            </materialDesign:DrawerHost.LeftDrawerContent>
            <DockPanel>
                <materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"
                                            Mode="PrimaryMid" DockPanel.Dock="Top">
                    <DockPanel>
                        <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="False"
                                        x:Name="MenuToggleButton"/>
                        <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
                            <StackPanel>
                                <Button Content="Hello World"/>
                                <Button Content="Nice Popup"/>
                                <Button Content="Can't Touch This" IsEnabled="False" />
                                <Separator/>
                                <Button Content="Goodbye"/>
                            </StackPanel>
                        </materialDesign:PopupBox>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="60" HorizontalAlignment="Center">
                            <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant"></Image>
                            <TextBlock Text="Machine Studio" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36"/>
                        </StackPanel>
                    </DockPanel>
                </materialDesign:ColorZone>

                <Grid>
                    <Grid>
                        <Grid>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="1*"/>
                                </Grid.RowDefinitions>

                                <Grid>
                                    <Menu IsMainMenu="True">
                                        <MenuItem Header="DataBase" ItemsSource="{x:Static managers:ViewsManager.DbViews}" DisplayMemberPath="Header">
                                            <MenuItem.ItemContainerStyle>
                                                <Style TargetType="MenuItem" BasedOn="{StaticResource {x:Type MenuItem}}">
                                                    <Setter Property="Command" Value="{Binding AddCommand}"></Setter>
                                                </Style>
                                            </MenuItem.ItemContainerStyle>
                                        </MenuItem>
                                        <MenuItem Header="Edit"></MenuItem>
                                    </Menu>
                                </Grid>

                                <dockablz:Layout Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" FloatingItemsSource="{x:Static managers:ViewsManager.DisplayedViews}" FloatingItemDisplayMemberPath="View" FloatingItemHeaderMemberPath="Header">

                                </dockablz:Layout>

                                <!--<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>
                        </Grid>
                    </Grid>
                </Grid>
            </DockPanel>
        </materialDesign:DrawerHost>
    </Grid>
</controls:View>