aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/Themes/Generic.xaml
blob: 6c016ae846c39e98113092805785701947a6a4e2 (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
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:Tango.Scripting.IDE.Controls"
    xmlns:local="clr-namespace:Tango.Scripting.IDE">

    <Style TargetType="{x:Type controls:SolutionItemControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:SolutionItemControl}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <StackPanel Orientation="Horizontal" Background="Transparent">
                            <Image VerticalAlignment="Center" Width="16" Height="16" Source="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SolutionItem.Image}" />
                            <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=SolutionItem.Name}"></TextBlock>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type controls:TabConrolClose}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:TabConrolClose}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
ckground-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<UserControl x:Class="Tango.PPC.Technician.Views.LoggingView"
             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:local="clr-namespace:Tango.PPC.Technician.Views"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:vm="clr-namespace:Tango.PPC.Technician.ViewModels"
             xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
             xmlns:converters="clr-namespace:Tango.PPC.Technician.Converters"
             xmlns:global="clr-namespace:Tango.PPC.Technician"
             mc:Ignorable="d" 
             d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LoggingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoggingViewVM}">

    <UserControl.Resources>
        <converters:LogItemMessageToOneLineConverter x:Key="LogItemMessageToOneLineConverter" />
    </UserControl.Resources>

    <Grid Background="{StaticResource TangoMidBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>

        <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
            <Border.Effect>
                <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
            </Border.Effect>
            <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Logging</TextBlock>
        </Border>

        <Grid Grid.Row="1">

            <DockPanel>
                <DockPanel DockPanel.Dock="Top">
                    <StackPanel Orientation="Horizontal">
                        <touch:TouchNavigationLinks Margin="20" FontSize="{StaticResource TangoNavigationLinksFontSize}">
                            <sys:String>Application</sys:String>
                            <sys:String>Embedded</sys:String>
                        </touch:TouchNavigationLinks>

                        <StackPanel Orientation="Horizontal" Margin="20 3 0 0">
                            <touch:TouchToggleIconButton Icon="Pause" Width="32" Height="32" Padding="7" CheckedIcon="Play" IsChecked="{Binding IsPaused}"></touch:TouchToggleIconButton>
                            <touch:TouchIconButton Margin="10 0 0 0" Icon="TrashAltRegular" Foreground="{StaticResource TangoDarkForegroundBrush}" Width="32" Height="32" Padding="7" Command="{Binding ClearCommand}"></touch:TouchIconButton>

                            <StackPanel Orientation="Horizontal" Margin="20 0 0 0">
                                <touch:TouchIcon Icon="Magnify" Foreground="{StaticResource TangoGrayBrush}" Width="16" Height="16" />
                                <touch:TouchTextBox Width="200" VerticalAlignment="Center" Margin="5 -10 0 0" Text="{Binding Filter,Delay=1000}"></touch:TouchTextBox>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                    <touch:TouchDatePicker Visibility="Collapsed" SelectedDate="12/15/2018" Height="40" />
                </DockPanel>

                <Grid Margin="20">
                    <touch:TouchSimpleDataGrid AutoGenerateColumns="False" SelectionMode="Single" SelectionUnit="FullRow" BorderThickness="1" BorderBrush="{StaticResource TangoDarkForegroundBrush}" HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" CanUserSortColumns="False" IsReadOnly="True" ItemsSource="{Binding ApplicationLogsViewSource}" SelectedItem="{Binding SelectedLog}" VerticalGridLinesBrush="{x:Null}" HorizontalGridLinesBrush="{StaticResource TangoGrayBrush}" RowHeight="50" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled">
                        <DataGrid.Resources>
                            <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="{x:Type DataGridColumnHeader}">
                                <Setter Property="Background" Value="{StaticResource TangoDarkForegroundBrush}" />
                                <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}" />
                                <Setter Property="Padding" Value="5"></Setter>
                            </Style>
                        </DataGrid.Resources>
                        <DataGrid.RowStyle>
                            <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
                                <Style.Triggers>
                                    <Trigger Property="IsSelected" Value="True">
                                        <Setter Property="Background" Value="Transparent"></Setter>
                                        <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" />
                                    </Trigger>
                                    <Trigger Property="IsFocused" Value="True">
                                        <Setter Property="Background" Value="Transparent"></Setter>
                                        <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </DataGrid.RowStyle>
                        <DataGrid.CellStyle>
                            <Style TargetType="{x:Type DataGridCell}">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="{x:Type DataGridCell}">
                                            <Grid Background="{TemplateBinding Background}">
                                                <ContentPresenter VerticalAlignment="Center" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                                <Style.Triggers>
                                    <Trigger Property="IsSelected" Value="True">
                                        <Setter Property="Background" Value="Transparent"></Setter>
                                        <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </DataGrid.CellStyle>
                        <DataGrid.Columns>
                            <DataGridTemplateColumn Header="" Width="50">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <touch:TouchIcon Width="16">
                                            <touch:TouchIcon.Style>
                                                <Style TargetType="touch:TouchIcon">
                                                    <Setter Property="Icon" Value="InformationOutline"></Setter>
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding Category}" Value="Warning">
                                                            <Setter Property="Icon" Value="ExclamationTriangleSolid"></Setter>
                                                            <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding Category}" Value="Error">
                                                            <Setter Property="Icon" Value="Alert"></Setter>
                                                            <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding Category}" Value="Critical">
                                                            <Setter Property="Icon" Value="Alert"></Setter>
                                                            <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </touch:TouchIcon.Style>
                                        </touch:TouchIcon>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                            <DataGridTextColumn Header="Time" Width="120" Binding="{Binding TimeStamp,Converter={StaticResource DateTimeUTCToStringConverter},Mode=OneWay,ConverterParameter='hh\\:mm\\:ss.ff'}" />
                            <DataGridTemplateColumn Header="Message" Width="1*">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Message,Converter={StaticResource LogItemMessageToOneLineConverter},ConverterParameter='70',Mode=OneWay}"/>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>
                        </DataGrid.Columns>
                    </touch:TouchSimpleDataGrid>
                </Grid>
            </DockPanel>

        </Grid>
    </Grid>
</UserControl>