|
1 | | -<Application |
2 | | - x:Class="Microsoft.Toolkit.Uwp.SampleApp.App" |
3 | | - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | | - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | | - xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp" |
6 | | - xmlns:controls="using:Microsoft.Toolkit.Uwp.SampleApp.Controls" |
7 | | - RequestedTheme="Light"> |
8 | | - |
9 | | - <Application.Resources> |
10 | | - |
11 | | - <!-- Colors --> |
12 | | - <Color x:Key="Grey-01">#FF333333</Color> |
13 | | - <Color x:Key="Grey-02">#FF444444</Color> |
14 | | - <Color x:Key="Grey-03">#FF555555</Color> |
15 | | - <Color x:Key="Grey-04">#FFDDDDDD</Color> |
16 | | - <Color x:Key="Grey-05">#FFF0F0F0</Color> |
17 | | - <Color x:Key="White">#FFFFFFFF</Color> |
| 1 | +<Application x:Class="Microsoft.Toolkit.Uwp.SampleApp.App" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:controls="using:Microsoft.Toolkit.Uwp.SampleApp.Controls" |
| 5 | + xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp" |
| 6 | + RequestedTheme="Light"> |
18 | 7 |
|
19 | | - <Color x:Key="Blue-01">#FF0078D7</Color> |
| 8 | + <Application.Resources> |
20 | 9 |
|
21 | | - <!-- Brushes --> |
22 | | - <SolidColorBrush x:Key="Brush-Grey-01" Color="{StaticResource Grey-01}"/> |
23 | | - <SolidColorBrush x:Key="Brush-Grey-02" Color="{StaticResource Grey-02}"/> |
24 | | - <SolidColorBrush x:Key="Brush-Grey-03" Color="{StaticResource Grey-03}"/> |
25 | | - <SolidColorBrush x:Key="Brush-Grey-04" Color="{StaticResource Grey-04}"/> |
26 | | - <SolidColorBrush x:Key="Brush-Grey-05" Color="{StaticResource Grey-05}"/> |
27 | | - <SolidColorBrush x:Key="Brush-White" Color="{StaticResource White}"/> |
| 10 | + <!-- Colors --> |
| 11 | + <Color x:Key="Grey-01">#FF333333</Color> |
| 12 | + <Color x:Key="Grey-02">#FF444444</Color> |
| 13 | + <Color x:Key="Grey-03">#FF555555</Color> |
| 14 | + <Color x:Key="Grey-04">#FFDDDDDD</Color> |
| 15 | + <Color x:Key="Grey-05">#FFF0F0F0</Color> |
| 16 | + <Color x:Key="White">#FFFFFFFF</Color> |
28 | 17 |
|
29 | | - <SolidColorBrush x:Key="Brush-Blue-01" Color="{StaticResource Blue-01}"/> |
| 18 | + <Color x:Key="Blue-01">#FF0078D7</Color> |
30 | 19 |
|
31 | | - <!-- Styles --> |
| 20 | + <!-- Brushes --> |
| 21 | + <SolidColorBrush x:Key="Brush-Grey-01" |
| 22 | + Color="{StaticResource Grey-01}" /> |
| 23 | + <SolidColorBrush x:Key="Brush-Grey-02" |
| 24 | + Color="{StaticResource Grey-02}" /> |
| 25 | + <SolidColorBrush x:Key="Brush-Grey-03" |
| 26 | + Color="{StaticResource Grey-03}" /> |
| 27 | + <SolidColorBrush x:Key="Brush-Grey-04" |
| 28 | + Color="{StaticResource Grey-04}" /> |
| 29 | + <SolidColorBrush x:Key="Brush-Grey-05" |
| 30 | + Color="{StaticResource Grey-05}" /> |
| 31 | + <SolidColorBrush x:Key="Brush-White" |
| 32 | + Color="{StaticResource White}" /> |
32 | 33 |
|
33 | | - <Style TargetType="TextBlock"> |
34 | | - <Setter Property="Foreground" Value="{StaticResource Brush-Grey-01}"/> |
35 | | - </Style> |
| 34 | + <SolidColorBrush x:Key="Brush-Blue-01" |
| 35 | + Color="{StaticResource Blue-01}" /> |
36 | 36 |
|
37 | | - <Style TargetType="Button"> |
38 | | - <Setter Property="Foreground" Value="{StaticResource Brush-Grey-01}"/> |
39 | | - </Style> |
40 | | - |
41 | | - |
42 | | - <Style TargetType="controls:CodeRenderer"> |
43 | | - <Setter Property="Template"> |
44 | | - <Setter.Value> |
45 | | - <ControlTemplate TargetType="controls:CodeRenderer"> |
46 | | - <Grid> |
47 | | - <ProgressRing Name="progress" Width="100" Height="100" Foreground="{TemplateBinding Foreground}" |
48 | | - IsActive="True" VerticalAlignment="Center" HorizontalAlignment="Center"/> |
49 | | - <WebView Name="webView" Visibility="Collapsed"/> |
50 | | - </Grid> |
51 | | - </ControlTemplate> |
52 | | - </Setter.Value> |
53 | | - </Setter> |
54 | | - </Style> |
| 37 | + <!-- Styles --> |
55 | 38 |
|
56 | | - <Style x:Key="TooltipFlyoutPresenterStyle" TargetType="FlyoutPresenter"> |
57 | | - <Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
58 | | - <Setter Property="VerticalContentAlignment" Value="Stretch"/> |
59 | | - <Setter Property="IsTabStop" Value="False"/> |
60 | | - <Setter Property="Background" Value="{ThemeResource SystemControlBackgroundChromeMediumLowBrush}"/> |
61 | | - <Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundChromeHighBrush}"/> |
62 | | - <Setter Property="BorderThickness" Value="{ThemeResource FlyoutBorderThemeThickness}"/> |
63 | | - <Setter Property="Padding" Value="0"/> |
64 | | - <Setter Property="MinWidth" Value="{ThemeResource FlyoutThemeMinWidth}"/> |
65 | | - <Setter Property="MaxWidth" Value="{ThemeResource FlyoutThemeMaxHeight}"/> |
66 | | - <Setter Property="MinHeight" Value="{ThemeResource FlyoutThemeMinHeight}"/> |
67 | | - <Setter Property="MaxHeight" Value="{ThemeResource FlyoutThemeMaxHeight}"/> |
68 | | - <Setter Property="ScrollViewer.ZoomMode" Value="Disabled"/> |
69 | | - <Setter Property="Template"> |
70 | | - <Setter.Value> |
71 | | - <ControlTemplate TargetType="FlyoutPresenter"> |
72 | | - <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="5"> |
73 | | - <ScrollViewer x:Name="ScrollViewer" AutomationProperties.AccessibilityView="Raw" HorizontalScrollMode="Disabled" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" VerticalScrollMode="Auto" ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}"> |
74 | | - <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> |
75 | | - </ScrollViewer> |
76 | | - </Border> |
77 | | - </ControlTemplate> |
78 | | - </Setter.Value> |
79 | | - </Setter> |
80 | | - </Style> |
81 | | - <DataTemplate x:Key="PivotHeaderTemplate"> |
| 39 | + <Style TargetType="TextBlock"> |
| 40 | + <Setter Property="Foreground" Value="{StaticResource Brush-Grey-01}" /> |
| 41 | + </Style> |
| 42 | + |
| 43 | + <Style TargetType="Button"> |
| 44 | + <Setter Property="Foreground" Value="{StaticResource Brush-Grey-01}" /> |
| 45 | + </Style> |
| 46 | + |
| 47 | + |
| 48 | + <Style TargetType="controls:CodeRenderer"> |
| 49 | + <Setter Property="Template"> |
| 50 | + <Setter.Value> |
| 51 | + <ControlTemplate TargetType="controls:CodeRenderer"> |
82 | 52 | <Grid> |
83 | | - <TextBlock Text="{Binding}" FontSize="14"/> |
| 53 | + <Grid.RowDefinitions> |
| 54 | + <RowDefinition /> |
| 55 | + <RowDefinition Height="Auto" /> |
| 56 | + </Grid.RowDefinitions> |
| 57 | + <Grid x:Name="Container" |
| 58 | + Grid.RowSpan="2" |
| 59 | + Opacity="0" /> |
| 60 | + <ProgressRing Name="progress" |
| 61 | + Grid.Row="0" |
| 62 | + Width="100" |
| 63 | + Height="100" |
| 64 | + HorizontalAlignment="Center" |
| 65 | + VerticalAlignment="Center" |
| 66 | + Foreground="{TemplateBinding Foreground}" |
| 67 | + IsActive="True" /> |
| 68 | + <WebView Name="webView" |
| 69 | + Grid.Row="0" |
| 70 | + Visibility="Collapsed" /> |
| 71 | + <Button x:Name="PrintButton" |
| 72 | + Grid.Row="1" |
| 73 | + Margin="5" |
| 74 | + HorizontalAlignment="Center" |
| 75 | + Content="Print" /> |
84 | 76 | </Grid> |
85 | | - </DataTemplate> |
86 | | - </Application.Resources> |
| 77 | + </ControlTemplate> |
| 78 | + </Setter.Value> |
| 79 | + </Setter> |
| 80 | + </Style> |
| 81 | + |
| 82 | + <Style x:Key="TooltipFlyoutPresenterStyle" |
| 83 | + TargetType="FlyoutPresenter"> |
| 84 | + <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
| 85 | + <Setter Property="VerticalContentAlignment" Value="Stretch" /> |
| 86 | + <Setter Property="IsTabStop" Value="False" /> |
| 87 | + <Setter Property="Background" Value="{ThemeResource SystemControlBackgroundChromeMediumLowBrush}" /> |
| 88 | + <Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundChromeHighBrush}" /> |
| 89 | + <Setter Property="BorderThickness" Value="{ThemeResource FlyoutBorderThemeThickness}" /> |
| 90 | + <Setter Property="Padding" Value="0" /> |
| 91 | + <Setter Property="MinWidth" Value="{ThemeResource FlyoutThemeMinWidth}" /> |
| 92 | + <Setter Property="MaxWidth" Value="{ThemeResource FlyoutThemeMaxHeight}" /> |
| 93 | + <Setter Property="MinHeight" Value="{ThemeResource FlyoutThemeMinHeight}" /> |
| 94 | + <Setter Property="MaxHeight" Value="{ThemeResource FlyoutThemeMaxHeight}" /> |
| 95 | + <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" /> |
| 96 | + <Setter Property="Template"> |
| 97 | + <Setter.Value> |
| 98 | + <ControlTemplate TargetType="FlyoutPresenter"> |
| 99 | + <Border Margin="5" |
| 100 | + Background="{TemplateBinding Background}" |
| 101 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 102 | + BorderThickness="{TemplateBinding BorderThickness}"> |
| 103 | + <ScrollViewer x:Name="ScrollViewer" |
| 104 | + AutomationProperties.AccessibilityView="Raw" |
| 105 | + HorizontalScrollBarVisibility="Disabled" |
| 106 | + HorizontalScrollMode="Disabled" |
| 107 | + VerticalScrollBarVisibility="Auto" |
| 108 | + VerticalScrollMode="Auto" |
| 109 | + ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}"> |
| 110 | + <ContentPresenter Margin="{TemplateBinding Padding}" |
| 111 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 112 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 113 | + Content="{TemplateBinding Content}" |
| 114 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 115 | + ContentTransitions="{TemplateBinding ContentTransitions}" /> |
| 116 | + </ScrollViewer> |
| 117 | + </Border> |
| 118 | + </ControlTemplate> |
| 119 | + </Setter.Value> |
| 120 | + </Setter> |
| 121 | + </Style> |
| 122 | + <DataTemplate x:Key="PivotHeaderTemplate"> |
| 123 | + <Grid> |
| 124 | + <TextBlock FontSize="14" |
| 125 | + Text="{Binding}" /> |
| 126 | + </Grid> |
| 127 | + </DataTemplate> |
| 128 | + </Application.Resources> |
87 | 129 |
|
88 | 130 | </Application> |
0 commit comments