aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
blob: ef21ebc8588e7d8e33ded06a576a866070f3573c (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
<UserControl x:Class="Tango.PPC.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:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
			 xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels"
			 xmlns:global="clr-namespace:Tango.PPC.UI"
             xmlns:local="clr-namespace:Tango.PPC.UI.Views"
             xmlns:notifications="clr-namespace:Tango.PPC.UI.Notifications"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:components="clr-namespace:Tango.Touch.Components;assembly=Tango.Touch"
             xmlns:localConverters="clr-namespace:Tango.PPC.UI.Converters"
             mc:Ignorable="d" 
             d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">

    <UserControl.Resources>
        <localConverters:NotificationItemConverter x:Key="NotificationItemConverter" />
    </UserControl.Resources>

    <Grid>
        <touch:TouchPanel 
            HasMessageBox="{Binding NotificationProvider.HasMessageBox}" 
            CurrentMessageBox="{Binding NotificationProvider.CurrentMessageBox}" 
            HasNotifications="{Binding NotificationProvider.HasNotificationItems}" 
            Notifications="{Binding NotificationProvider.NotificationItems}"
            ItemExpandedPropertyPath="IsExpanded"
            HasDialog="{Binding NotificationProvider.HasDialog}"
            CurrentDialog="{Binding NotificationProvider.CurrentDialog}">
            <touch:TouchPanel.NotificationTemplate>
                <DataTemplate>
                    <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False">
                        <DockPanel>
                            <touch:TouchIconButton DockPanel.Dock="Right" Background="Transparent" Padding="20" Style="{StaticResource TangoRoundTouchIconButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="60" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Icon="Close" Foreground="White" />
                            <ContentControl Content="{Binding Converter={StaticResource NotificationItemConverter}}"/>
                        </DockPanel>
                    </touch:TouchButton>
                </DataTemplate>
            </touch:TouchPanel.NotificationTemplate>

            <controls:NavigationControl TransitionAlwaysFades="True" KeepElementsAttached="True" TransitionType="Zoom" x:Name="NavigationControl" x:FieldModifier="public">
                <local:LoadingView></local:LoadingView>
                <local:LoginView></local:LoginView>
                <local:LayoutView></local:LayoutView>
                <local:ExternalBridgeView></local:ExternalBridgeView>
            </controls:NavigationControl>
        </touch:TouchPanel>
    </Grid>
</UserControl>