Skip to content

Commit

Permalink
Windows 10 future version - September 2018 Update 2
Browse files Browse the repository at this point in the history
  • Loading branch information
oldnewthing committed Sep 20, 2018
1 parent 5379e10 commit df6373e
Show file tree
Hide file tree
Showing 26 changed files with 650 additions and 642 deletions.
37 changes: 25 additions & 12 deletions Samples/XamlUIBasics/cs/AppUIBasics/AppUIBasics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<AssemblyName>AppUIBasics</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.17713.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17713.0</TargetPlatformMinVersion>
<TargetPlatformVersion>10.0.17758.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -147,7 +147,9 @@
<Content Include="Assets\CoffeeCup.png" />
<Content Include="Assets\ColorPicker.png" />
<Content Include="Assets\CommandBarFlyout.png" />
<Content Include="Assets\CompactSizing.png" />
<Content Include="Assets\ConnectedAnimations.png" />
<Content Include="Assets\Contacts.txt" />
<Content Include="Assets\DefaultIcon.png" />
<Content Include="Assets\DropdownButton.png" />
<Content Include="Assets\EasingFunctions.png" />
Expand Down Expand Up @@ -184,7 +186,6 @@
<Content Include="Assets\Sun-100-Black.png" />
<Content Include="Assets\Sun.32.scale-100-White.png" />
<Content Include="Assets\Swipe.png" />
<Content Include="Assets\theme_editor2.gif" />
<Content Include="Assets\Tiles\LargeTile.scale-100.png" />
<Content Include="Assets\Tiles\LargeTile.scale-125.png" />
<Content Include="Assets\Tiles\LargeTile.scale-150.png" />
Expand Down Expand Up @@ -501,9 +502,6 @@
<Compile Include="ControlPages\StackPanelPage.xaml.cs">
<DependentUpon>StackPanelPage.xaml</DependentUpon>
</Compile>
<Compile Include="ControlPages\StandardSizingPage.xaml.cs">
<DependentUpon>StandardSizingPage.xaml</DependentUpon>
</Compile>
<Compile Include="ControlPages\SwipePage.xaml.cs">
<DependentUpon>SwipePage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -568,6 +566,9 @@
<DependentUpon>PageHeader.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SamplePages\SampleCompactSizingPage.xaml.cs">
<DependentUpon>SampleCompactSizingPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\SamplePage1.xaml.cs">
<DependentUpon>SamplePage1.xaml</DependentUpon>
</Compile>
Expand All @@ -583,6 +584,9 @@
<Compile Include="SamplePages\SampleSettingsPage.xaml.cs">
<DependentUpon>SampleSettingsPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\SampleStandardSizingPage.xaml.cs">
<DependentUpon>SampleStandardSizingPage.xaml</DependentUpon>
</Compile>
<Compile Include="SearchResultsPage.xaml.cs">
<DependentUpon>SearchResultsPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -680,6 +684,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ControlPages\CompactDictionary.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ControlPages\CompactSizingPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -708,10 +716,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="ControlPages\StandardSizingPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ControlExample.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -1032,6 +1036,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\SampleCompactSizingPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\SamplePage1.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand All @@ -1052,6 +1060,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\SampleStandardSizingPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SearchResultsPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -1073,12 +1085,13 @@
<Version>6.2.0-Preview1-26502-02</Version>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml">
<Version>2.0.180717002-prerelease</Version>
<Version>2.0.180916002-prerelease</Version>
</PackageReference>
<PackageReference Include="Microsoft.Xaml.Behaviors.Uwp.Managed">
<Version>2.0.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
Expand All @@ -1090,4 +1103,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<Grid>
<StackPanel>
<Image Source="ms-appx:///Assets/theme_editor2.gif" HorizontalAlignment="Center"/>
<TextBlock Margin="0,20,0,0" Text="Coming soon..."/>
<TextBlock Margin="0,20,0,0" Text="The ColorPaletteResources API allows you to easily access global values that adjust the theme colors of your controls. This API can also be scoped to a container or control within a page." TextWrapping="WrapWholeWords"/>
<TextBlock Margin="0,20,0,0" Text="To learn more about this API and to see what it can do, checkout the Fluent XAML Theme Editor!" TextWrapping="WrapWholeWords"/>
<Button IsEnabled="False" Content="Launch Editor" Margin="0,10,0,0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
</muxcontrols:CommandBarFlyout>
</Page.Resources>
<StackPanel>
<local:ControlExample HeaderText="CommandBarFlyout for commands on an in-app object" XamlSource="CommandBarFlyout/CommandBarFlyoutSample1_xaml.txt" CSharpSource="CommandBarFlyout/CommandBarFlyoutSample1_cs.txt">
<local:ControlExample HeaderText="CommandBarFlyout for commands on an in-app object" XamlSource="CommandBarFlyout/CommandBarFlyoutSample1_xaml.txt"
CSharpSource="CommandBarFlyout/CommandBarFlyoutSample1_cs.txt">
<StackPanel>
<TextBlock Text="Click or right click the image to open a CommandBarFlyout" />
<Border x:Name="myImageBorder" BorderBrush="Transparent" BorderThickness="2">
<Image x:Name="Image1" Width="200" Height="200" Source="/Assets/rainier.jpg" PointerPressed="Image_PointerPressed" PointerReleased="Image_PointerReleased" ContextFlyout="{x:Bind CommandBarFlyout1}"/>
<Border x:Name="myImageBorder" BorderBrush="Transparent" VerticalAlignment="Center" HorizontalAlignment="Center" BorderThickness="2">
<Image x:Name="Image1" Height="300" Source="/Assets/rainier.jpg" PointerPressed="Image_PointerPressed"
PointerReleased="Image_PointerReleased" ContextFlyout="{x:Bind CommandBarFlyout1}"/>
</Border>
<TextBlock x:Name="SelectedOptionText" Text="" />
</StackPanel>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Windows.UI;
using Windows.Foundation.Metadata;
using Windows.UI;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Input;
Expand All @@ -14,7 +15,7 @@ public CommandBarFlyoutPage()
{
this.InitializeComponent();
}

public void OnClosed(object sender, object args)
{
myImageBorder.BorderBrush = new SolidColorBrush(Colors.Transparent);
Expand All @@ -31,12 +32,20 @@ public void Image_PointerReleased(object sender, PointerRoutedEventArgs args)

if (wasLeftPointerPressed)
{
FlyoutShowOptions myOption = new FlyoutShowOptions();
myOption.ShowMode = FlyoutShowMode.Transient;
myOption.Placement = FlyoutPlacementMode.RightEdgeAlignedTop;
CommandBarFlyout1.ShowAt(Image1, myOption);
if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
{
FlyoutShowOptions myOption = new FlyoutShowOptions();
myOption.ShowMode = FlyoutShowMode.Transient;
myOption.Placement = FlyoutPlacementMode.RightEdgeAlignedTop;
CommandBarFlyout1.ShowAt(Image1, myOption);
}
else
{
CommandBarFlyout1.ShowAt(Image1);
}
wasLeftPointerPressed = false;
}
args.Handled = true;
}

private void OnElementClicked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:AppUIBasics.ControlPages">

<Thickness x:Key="TextControlPlaceholderThemePadding">12,5,10,5</Thickness>
<x:Double x:Key="TextControlThemeMinHeight">23</x:Double>

<Style TargetType="TextBox">
<Setter Property="Padding" Value="8,1,6,1" />
<Setter Property="MinHeight" Value="23" />
<Setter Property="MaxHeight" Value="48" />
</Style>

<!--Password Box-->
<Style TargetType="PasswordBox">
<Setter Property="Padding" Value="8,1,6,1" />
<Setter Property="MinHeight" Value="23" />
<Setter Property="MaxHeight" Value="48" />
</Style>

<!--ComboBox-->
<Style TargetType="ComboBox">
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Padding" Value="12,0,0,0" />
<Setter Property="MinHeight" Value="24" />
<Setter Property="MaxHeight" Value="48" />
</Style>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//*********************************************************
-->

<Page
<Page
x:Class="AppUIBasics.ControlPages.CompactSizingPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand All @@ -20,57 +20,28 @@
x:Name="compactPage"
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" x:Name="CompactGrid">
<local:ControlExample x:Name="Example1" HeaderText="Compact Sizing for controls">
<StackPanel x:Name="CompactPanel">
<TextBlock x:Name="HeaderBlock" Text="Standard Size" FontSize="18"/>
<TextBox Header="First Name:" x:Name="txtfirstName" />
<TextBox Header="Last Name:" x:Name="txtLastName" />
<PasswordBox Header="Password:" />
<PasswordBox Header="Confrim Password:" />
<DatePicker Header="Date Of Birth" />
</StackPanel>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<local:ControlExample x:Name="Example1" HeaderText="Compact Sizing for controls" Loaded="Example1_Loaded">
<Frame x:Name="ContentFrame" />

<local:ControlExample.Options>
<StackPanel>
<TextBlock Text="Fluent Standard and Compact Sizing" />
<RadioButton Content="Standard" Tag="StandardSize" GroupName="ControlSize" Checked="Standard_Checked" IsChecked="True" />
<RadioButton Content="Compact" Tag="CompactSize" GroupName="ControlSize" Checked="Compact_Checked" />
</StackPanel>
</local:ControlExample.Options>

<local:ControlExample.Xaml>
<StackPanel>
<TextBlock Text="Applying Compact Size: App Level" FontSize="20" Margin="0,12,12,12"/>
<RichTextBlock Style="{StaticResource XamlCodeRichTextBlockStyle}">
<Paragraph>&lt;Application.Resources&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;ResourceDictionary/&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries&gt;</Paragraph>
<Paragraph TextIndent="36">&lt;ResourceDictionary Source="CompactSize.xaml"&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries/&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;/ResourceDictionary&gt;</Paragraph>
<Paragraph>&lt;/Application.Resources&gt;</Paragraph>
</RichTextBlock>
<TextBlock Text="Applying Compact Size: Page Level" FontSize="20" Margin="0,12,12,12" />
<RichTextBlock Style="{StaticResource XamlCodeRichTextBlockStyle}">
<Paragraph>&lt;Page.Resources&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;ResourceDictionary/&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries&gt;</Paragraph>
<Paragraph TextIndent="36">&lt;ResourceDictionary Source="CompactSize.xaml"&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries/&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;/ResourceDictionary&gt;</Paragraph>
<Paragraph>&lt;/Page.Resources&gt;</Paragraph>
</RichTextBlock>
<TextBlock Text="Applying Compact Size: Element Level" FontSize="20" Margin="0,12,12,12" />
<RichTextBlock Style="{StaticResource XamlCodeRichTextBlockStyle}">
<Paragraph>&lt;Grid.Resources&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;ResourceDictionary/&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries&gt;</Paragraph>
<Paragraph TextIndent="36">&lt;ResourceDictionary Source="CompactSize.xaml"&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries/&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;/ResourceDictionary&gt;</Paragraph>
<Paragraph>&lt;/Grid.Resources&gt;</Paragraph>
</RichTextBlock>
</StackPanel>
<RichTextBlock Style="{StaticResource XamlCodeRichTextBlockStyle}">
<Paragraph>&lt;Application.Resources&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;ResourceDictionary/&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries&gt;</Paragraph>
<Paragraph TextIndent="36">&lt;ResourceDictionary Source="CompactSize.xaml"&gt;</Paragraph>
<Paragraph TextIndent="24">&lt;ResourceDictionary.MergedDictionaries/&gt;</Paragraph>
<Paragraph TextIndent="12">&lt;/ResourceDictionary&gt;</Paragraph>
<Paragraph>&lt;/Application.Resources&gt;</Paragraph>
</RichTextBlock>
</local:ControlExample.Xaml>
</local:ControlExample>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,31 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
using Windows.UI.Xaml.Media.Animation;
using AppUIBasics.SamplePages;

namespace AppUIBasics.ControlPages
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class CompactSizingPage : Page
{

ResourceDictionary compact = new ResourceDictionary();
Uri source = new Uri("ms-appx:///ControlPages/CompactSizing.xaml");

public CompactSizingPage()
{
this.InitializeComponent();

}

private void Standard_Checked(object sender, RoutedEventArgs e)
private void Example1_Loaded(object sender, RoutedEventArgs e)
{
//compact.Source = source;
//CompactGrid.Resources.MergedDictionaries.Remove(compact);

ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo());
}

private void Standard_Checked(object sender, RoutedEventArgs e)
{
ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo());
}

private void Compact_Checked(object sender, RoutedEventArgs e)
{
//compact.Source = source;
//CompactGrid.Resources.MergedDictionaries.Insert(0, compact);

Frame.Navigate(typeof(StandardSizingPage));
{
ContentFrame.Navigate(typeof(SampleCompactSizingPage), null, new SuppressNavigationTransitionInfo());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel Margin="0,12,0,0">
<RichTextBlock TextWrapping="WrapWholeWords">
<Paragraph>The contents of a
<Bold>DataGrid</Bold> control can be generated simply by using the
<Bold>ItemsSource</Bold> property to bind to a collection of any type.
</Paragraph>
<Paragraph Margin="0,8,0,0">The built-in column types include a text column, a check box column, and a template column for hosting custom content. The built-in row type includes a drop-down details section that you can use to display additional content below the cell values. </Paragraph>
<RichTextBlock TextWrapping="WrapWholeWords" Margin="0,12">
<Paragraph>The built-in column types include a text column, a check box column, and a template column for hosting custom content. The built-in row type includes a drop-down details section that you can use to display additional content below the cell values. </Paragraph>
<Paragraph Margin="0,8,0,0">The DataGrid control supports common table formatting options, such as alternating row backgrounds and foregrounds and the ability to show or hide headers, grid lines, and scroll bars. Additionally, the control provides several style and template properties that you can use to completely change the appearance of the control and its rows, columns, cells, and row or column headers.</Paragraph>
</RichTextBlock>

<TextBlock Margin="0,24,0,0" Text="DataGrid is included as a part of the Windows Community Toolkit." />
<Button Margin="0,8,0,0" Content="Launch the Windows Community Toolkit Sample App" Click="LaunchToolkitButton_Click" />
<HyperlinkButton Margin="0,8,0,0" Content="Launch the Windows Community Toolkit Sample App" Click="LaunchToolkitButton_Click" />
</StackPanel>
</Grid>
</Page>
Loading

0 comments on commit df6373e

Please sign in to comment.