aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml
blob: 9b583a117fa9a0bbf699340e0ab217e2bfc1736c (plain)
1
2
3
4
5
6
7
8
9pre { 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
<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"
             mc:Ignorable="d" 
             d:DesignHeight="60" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:MessageNotificationItem, IsDesignTimeCreatable=False}" MinHeight="60" Height="60" MaxHeight="150">

    <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>
                </Style.Triggers>
            </Style>
        </ContentControl.Style>
        <DockPanel>
            <touch:TouchIcon Margin="15" DockPanel.Dock="Left" MaxHeight="50">
                <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="Alert"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding MessageType}" Value="Error">
                                <Setter Property="Icon" Value="AlertOctagon"></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"></TextBlock>

                <TextBlock Margin="0 20 0 0" Text="{Binding ExpandedMessage}" TextWrapping="Wrap" Visibility="{Binding IsExpanded,Converter={StaticResource BooleanToVisibilityConverter}}"></TextBlock>
            </StackPanel>
        </DockPanel>
    </ContentControl>
</UserControl>