Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nmetulev committed Aug 19, 2015
2 parents f56c0ad + a1013cb commit fcf9f95
Show file tree
Hide file tree
Showing 469 changed files with 22,823 additions and 491 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

<Grid Background="{StaticResource EggshellBrush}">

<VisualStateManager.VisualStateGroups>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="WindowStates">


<VisualState x:Name="NarrowState">
<VisualState.StateTriggers>
Expand Down
Binary file not shown.
Binary file not shown.
199 changes: 199 additions & 0 deletions Presentation/02. XAML Controls/Demos/AppUIBasics/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
<!--
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
-->
<Application
x:Class="AppUIBasics.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:AppUIBasics"
xmlns:common="using:AppUIBasics.Common"
xmlns:localData="using:AppUIBasics.Data"
RequestedTheme="Dark">

<Application.Resources>

<ResourceDictionary>
<!-- Application-specific resources -->
<common:BooleanNegationConverter x:Key="negationConverter" />
<common:ValueToStringConverter x:Key="valueToStringConverter" />
<common:ColorStringConverter x:Key="colorStringConverter"/>
<common:DoubleToIntConverter x:Key="doubleIntConverter" />
<common:ValueToFontFamilyConverter x:Key="valueToFontFamilyConverter" />
<common:ComboBoxItemToStringConverter x:Key="comboBoxItemToStringConverter" />
<common:BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
<common:NullableBooleanToBooleanConverter x:Key="nullableBooleanToBooleanConverter" />
<common:StringToBrushConverter x:Key="stringToBrushConverter" />

<x:String x:Key="AppName">XAML controls and layout</x:String>

<Style x:Key="RichTextBlockCodeStyle" BasedOn="{StaticResource BaseRichTextBlockStyle}" TargetType="RichTextBlock">
<Setter Property="FontWeight" Value="SemiLight"/>
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="FontSize" Value="11"/>
<Setter Property="Foreground" Value="DarkBlue"/>
<Setter Property="Margin" Value="10"/>
</Style>

<Style x:Key="CPCodeStyle" TargetType="ContentPresenter">
<Setter Property="FontWeight" Value="SemiLight"/>
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="FontSize" Value="11"/>
<Setter Property="Foreground" Value="DarkBlue"/>
<Setter Property="Margin" Value="10"/>
</Style>

<Style x:Key="OutputTextBlockStyle" BasedOn="{StaticResource BodyTextBlockStyle}" TargetType="TextBlock">
<Setter Property="Margin" Value="8,8,0,0"/>
</Style>

<Style x:Key="CodeBorderStyle" TargetType="Border">
<Setter Property="Background" Value="LightGray"/>
<Setter Property="BorderBrush" Value="White"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Margin" Value="0,10,0,0"/>
</Style>

<Style x:Key="ControlPageScrollStyle" TargetType="ScrollViewer">
<Setter Property="VerticalScrollMode" Value="Auto"/>
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ZoomMode" Value="Disabled"/>
</Style>

<ControlTemplate x:Key="BackButtonTemplate" TargetType="Button">
<Grid x:Name="RootGrid">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlHighlightBaseLowBrush}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlHighlightBaseMediumLowBrush}" />
</VisualState.Setters>
<Storyboard>
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid" />
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<ContentPresenter x:Name="ContentPresenter"
Content="{TemplateBinding Content}"
ContentTransitions="{TemplateBinding ContentTransitions}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw"/>
</Grid>
</ControlTemplate>

<Style x:Key="BackButtonStyle" TargetType="Button">
<Setter Property="Template" Value="{StaticResource BackButtonTemplate}" />
</Style>

<ControlTemplate x:Key="SplitViewTogglePaneButtonTemplate" TargetType="Button">
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" />
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightBaseMediumHighBrush}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Pressed">
<VisualState.Setters>
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlBackgroundBaseMediumLowBrush}" />
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightBaseMediumBrush}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlForegroundBaseLowBrush}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>

<ContentPresenter
x:Name="ContentPresenter"
Padding="{TemplateBinding Padding}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}" />
</Grid>
</ControlTemplate>

<Style x:Key="SplitViewTogglePaneButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="UseSystemFocusVisuals" Value="True" />

<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
<Setter Property="Content" Value="&#xE700;" />
<Setter Property="Height" Value="48" />
<Setter Property="Width" Value="48" />

<Setter Property="FontWeight" Value="Normal" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Template" Value="{StaticResource SplitViewTogglePaneButtonTemplate}" />
</Style>

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<SolidColorBrush x:Key="BackButtonForegroundBrush" Color="White" />
<SolidColorBrush x:Key="ControlPageBackgroundBrush" Color="Black" />
<SolidColorBrush x:Key="ChromeHighBrush" Color="#FF1F1F1F" />
<SolidColorBrush x:Key="BackgroundBrush" Color="#FF000000" />
<SolidColorBrush x:Key="PageHeaderBackgroundBrush" Color="#44FFFFFF" />
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="BackButtonForegroundBrush" Color="Black" />
<SolidColorBrush x:Key="ControlPageBackgroundBrush" Color="White" />
<SolidColorBrush x:Key="ChromeHighBrush" Color="#FFF9F9F9" />
<SolidColorBrush x:Key="BackgroundBrush" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="PageHeaderBackgroundBrush" Color="#44000000" />
</ResourceDictionary>

<ResourceDictionary x:Key="HighContrast">
<SolidColorBrush x:Key="BackButtonForegroundBrush" Color="Black" />
<SolidColorBrush x:Key="ControlPageBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
<SolidColorBrush x:Key="ChromeHighBrush" Color="{ThemeResource SystemColorWindowColor}" />
<SolidColorBrush x:Key="BackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
<SolidColorBrush x:Key="PageHeaderBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

</ResourceDictionary>

</Application.Resources>
</Application>
Loading

0 comments on commit fcf9f95

Please sign in to comment.