aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
blob: e79696a55288a1323a877e674f5012b083460884 (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
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.N
<UserControl x:Class="Tango.PPC.Common.Notifications.NotificationItems.MessageNotificationItemView"
             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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:local="clr-namespace:Tango.PPC.Common.Notifications.NotificationItems"
             xmlns:common="clr-namespace:Tango.PPC.Common.Converters"
             mc:Ignorable="d" 
             x:Name="MessageNotificationItemControl"
             d:DesignHeight="60" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:MessageNotificationItem, IsDesignTimeCreatable=False}" MinHeight="90" Height="90" MaxHeight="150" Background="White">

    <UserControl.Resources>
        <common:HeightToOpacityConverter x:Key="heightToOpacityConverter" />
    </UserControl.Resources>
    <Grid>
        <Border BorderThickness="0 0 0 2">
            <Border.Style>
                <Style TargetType="Border">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding MessageType}" Value="Info">
                            <Setter Property="Background">
                                <Setter.Value>
                                    <SolidColorBrush Color="{StaticResource TangoPrimaryAccentColor}" Opacity="0.2"></SolidColorBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="BorderBrush" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding MessageType}" Value="Success">
                            <Setter Property="Background">
                                <Setter.Value>
                                    <SolidColorBrush Color="{StaticResource TangoSuccessColor}" Opacity="0.2"></SolidColorBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="BorderBrush" Value="{StaticResource TangoSuccessBrush}"></Setter>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding MessageType}" Value="Warning">
                            <Setter Property="Background">
                                <Setter.Value>
                                    <SolidColorBrush Color="{StaticResource TangoWarningColor}" Opacity="0.2"></SolidColorBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="BorderBrush" Value="{StaticResource TangoWarningBrush}"></Setter>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding MessageType}" Value="Error">
                            <Setter Property="Background">
                                <Setter.Value>
                                    <SolidColorBrush Color="{StaticResource TangoErrorColor}" Opacity="0.2"></SolidColorBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="BorderBrush" Value="{StaticResource TangoErrorBrush}"></Setter>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding MessageType}" Value="Critical">
                            <Sette
</Setter.Value> </Setter> <Setter Property="BorderBrush" Value="{StaticResource TangoErrorBrush}"></Setter> </DataTrigger> </Style.Triggers> </Style> </Border.Style> </Border> <ContentControl> <ContentControl.Style> <Style TargetType="ContentControl"> <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding MessageType}" Value="Info"> <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Success"> <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Warning"> <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Error"> <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Critical"> <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> </DataTrigger> </Style.Triggers> </Style> </ContentControl.Style> <DockPanel> <touch:TouchIcon Margin="15" DockPanel.Dock="Left" MaxHeight="40"> <touch:TouchIcon.Style> <Style TargetType="touch:TouchIcon"> <Setter Property="Icon" Value="Information"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding MessageType}" Value="Info"> <Setter Property="Icon" Value="Information"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Success"> <Setter Property="Icon" Value="Check"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Warning"> <Setter Property="Icon" Value="AlertCircleOutline"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Error"> <Setter Property="Icon" Value="AlertCircleOutline"></Setter> </DataTrigger> <DataTrigger Binding="{Binding MessageType}" Value="Critical"> <Setter Property="Icon" Value="Alert"></Setter> </DataTrigger> </Style.Triggers> </Style> </touch:TouchIcon.Style> </touch:TouchIcon> <StackPanel Margin="10 0 0 0" VerticalAlignment="Center"> <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center" ></TextBlock> <Canvas Margin="0 5 0 0"> <TextBlock Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" TextWrapping="Wrap" VerticalAlignment="Center"> <TextBlock.Opacity> <MultiBinding Converter="{StaticResource heightToOpacityConverter}"> <Binding Path="ActualHeight" ElementName="MessageNotificationItemControl" /> <Binding Path="MinHeight" ElementName="MessageNotificationItemControl" /> <Binding Path="MaxHeight" ElementName="MessageNotificationItemControl" /> </MultiBinding> </TextBlock.Opacity> </TextBlock> </Canvas> </StackPanel> </DockPanel> </ContentControl> </Grid> </UserControl>