Changed namespace to fcu and cu

This commit is contained in:
sibille 2017-09-22 12:07:09 +02:00
Родитель 5cb75c4473
Коммит dc19aee694
4 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -41,20 +41,20 @@ IsApiContractPresent(ContractName, VersionNumber)
Therefore, we could create a namespace that checks for the 5th version of the contract in the following way. It would be added to our page in the following way
``` XML
xmlns:FCU="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:fcu="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
<UserControl
x:Class="XXXXX"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
...
xmlns:FCU="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:fcu="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
```
We can then conditionally instantiate controls based on the API contract as follows. In this example, the ColorPicker (a control only introduced in the Fall Creators Update) is only created at runtime when the machine it is running on has the right APIs.
``` XML
<FCU:ColorPicker x:Name="colorPicker" Grid.Column="1"/>
<fcu:ColorPicker x:Name="colorPicker" Grid.Column="1"/>
```
## Parallax Controls
@ -81,9 +81,9 @@ As in the above section, we are going to selectively create a ParallaxView contr
``` XML
<Grid>
<FCU:ParallaxView Source="{x:Bind ForegroundElement}">
<FCU:Image x:Name="BackgroundImage" Source="/Assets/XXXX.jpg"/>
</FCU:ParallaxView>
<fcu:ParallaxView Source="{x:Bind ForegroundElement}">
<fcu:Image x:Name="BackgroundImage" Source="/Assets/XXXX.jpg"/>
</fcu:ParallaxView>
<ScrollViewer Name="ForegroundElement".../>
...

Просмотреть файл

@ -7,8 +7,8 @@
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
xmlns:cm="using:Caliburn.Micro"
xmlns:FCU ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:CU ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:fcu ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:cu ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
mc:Ignorable="d">
<Page.Resources>
<Style x:Key="BrowserButtonStyle" TargetType="Button">
@ -100,7 +100,7 @@
<HyperlinkButton cm:Message.Attach="Retry" x:Uid="WebViewPage_Retry" HorizontalAlignment="Center" />
</StackPanel>
<Grid FCU:VerticalAlignment="Bottom" CU:Grid.Row="1" CU:Background="{ThemeResource SystemControlBackgroundBaseLowBrush}" FCU:Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush }">
<Grid fcu:VerticalAlignment="Bottom" cu:Grid.Row="1" cu:Background="{ThemeResource SystemControlBackgroundBaseLowBrush}" fcu:Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush }">
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource BrowserButtonStyle}" cm:Message.Attach="GoBack" x:Uid="WebViewPage_BrowserBackButton">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE72B;" />

Просмотреть файл

@ -4,8 +4,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:FCU ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:CU ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:fcu ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:cu ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
mc:Ignorable="d">
<Page.Resources>
<Style x:Key="BrowserButtonStyle" TargetType="Button">
@ -96,7 +96,7 @@
<HyperlinkButton Click="OnRetry" x:Uid="WebViewPage_Retry" HorizontalAlignment="Center" />
</StackPanel>
<Grid FCU:VerticalAlignment="Bottom" CU:Grid.Row="1" CU:Background="{ThemeResource SystemControlBackgroundBaseLowBrush}" FCU:Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush }">
<Grid fcu:VerticalAlignment="Bottom" cu:Grid.Row="1" cu:Background="{ThemeResource SystemControlBackgroundBaseLowBrush}" fcu:Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush }">
<StackPanel Orientation="Horizontal">
<Button IsEnabled="{x:Bind IsBackEnabled, Mode=OneWay}" Style="{StaticResource BrowserButtonStyle}" Click="OnGoBack" x:Uid="WebViewPage_BrowserBackButton">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE72B;" />

Просмотреть файл

@ -6,8 +6,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
xmlns:FCU ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:CU ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:fcu ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)"
xmlns:cu ="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
mc:Ignorable="d">
<Page.Resources>
<Style x:Key="BrowserButtonStyle" TargetType="Button">
@ -105,7 +105,7 @@
<HyperlinkButton Command="{x:Bind ViewModel.RetryCommand}" x:Uid="WebViewPage_Retry" HorizontalAlignment="Center" />
</StackPanel>
<Grid FCU:VerticalAlignment="Bottom" CU:Grid.Row="1" CU:Background="{ThemeResource SystemControlBackgroundBaseLowBrush}" FCU:Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush }">
<Grid fcu:VerticalAlignment="Bottom" cu:Grid.Row="1" cu:Background="{ThemeResource SystemControlBackgroundBaseLowBrush}" fcu:Background="{ThemeResource SystemControlChromeHighAcrylicElementMediumBrush }">
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource BrowserButtonStyle}" Command="{x:Bind ViewModel.BrowserBackCommand, Mode=OneWay}" x:Uid="WebViewPage_BrowserBackButton">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE72B;" />