Type property is now optional for Samples
This allows us to more easily create XAML Only samples and load them more efficiently. Removed Dummy Pages for State Triggers as a Test
This commit is contained in:
Родитель
cb4dc66b7e
Коммит
633ceef5fa
|
@ -565,36 +565,18 @@
|
|||
<Compile Include="SamplePages\TokenizingTextBox\TokenizingTextBoxPage.xaml.cs">
|
||||
<DependentUpon>TokenizingTextBoxPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\CompareStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>CompareStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\IsEqualStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>IsEqualStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\FullScreenModeStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>FullScreenModeStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\IsNullOrEmptyStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>IsNullOrEmptyStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\NetworkConnectionStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>NetworkConnectionStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\IsNotEqualStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>IsNotEqualStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\RegexStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>RegexStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\UserHandPreferenceStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>UserHandPreferenceStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\Triggers\UserInteractionModeStateTriggerPage.xaml.cs">
|
||||
<DependentUpon>UserInteractionModeStateTriggerPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\WrapLayout\WrapLayoutPage.xaml.cs">
|
||||
<DependentUpon>WrapLayoutPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\XamlOnlyPage.xaml.cs">
|
||||
<DependentUpon>XamlOnlyPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Shell.Search.cs" />
|
||||
<Compile Include="Shell.SamplePicker.cs" />
|
||||
<Content Include="SamplePages\ViewportBehavior\ViewportBehaviorXaml.bind" />
|
||||
|
@ -1109,14 +1091,6 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Content>
|
||||
<Page Include="SamplePages\Triggers\CompareStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\Triggers\IsEqualStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\Triggers\FullScreenModeStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -1125,26 +1099,6 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\Triggers\NetworkConnectionStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\Triggers\IsNotEqualStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\Triggers\RegexStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\Triggers\UserHandPreferenceStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\Triggers\UserInteractionModeStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\UniformGrid\UniformGridPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -1473,6 +1427,10 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="SamplePages\XamlOnlyPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Shell.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
@ -157,6 +157,8 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
|
||||
public string ApiCheck { get; set; }
|
||||
|
||||
public bool HasType => !string.IsNullOrWhiteSpace(Type);
|
||||
|
||||
public bool HasXAMLCode => !string.IsNullOrEmpty(XamlCodeFile);
|
||||
|
||||
public bool HasCSharpCode => !string.IsNullOrEmpty(CodeFile);
|
||||
|
|
|
@ -191,7 +191,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
|
||||
if (CurrentSample != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(CurrentSample.Type))
|
||||
if (CurrentSample.HasType)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
SamplePage.Loaded += SamplePage_Loaded;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!CurrentSample.HasXAMLCode)
|
||||
{
|
||||
_onlyDocumentation = true;
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
{
|
||||
base.OnNavigatedFrom(e);
|
||||
|
||||
if (SamplePage != null)
|
||||
if (SamplePage != null && CurrentSample.HasType)
|
||||
{
|
||||
MethodInfo method = CurrentSample.PageType.GetMethod(
|
||||
"OnNavigatedFrom",
|
||||
|
@ -510,13 +510,13 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
|
||||
if (element != null)
|
||||
{
|
||||
// Add element to main panel
|
||||
if (SamplePage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Add element to main panel or sub-panel
|
||||
FrameworkElement root = null;
|
||||
|
||||
var root = SamplePage.FindDescendantByName("XamlRoot");
|
||||
if (CurrentSample.HasType)
|
||||
{
|
||||
root = SamplePage?.FindDescendantByName("XamlRoot");
|
||||
}
|
||||
|
||||
if (root is Panel)
|
||||
{
|
||||
|
@ -527,7 +527,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
else
|
||||
{
|
||||
// Otherwise, just replace the entire page's content
|
||||
SamplePage.Content = element;
|
||||
SampleContent.Content = element;
|
||||
}
|
||||
|
||||
// Tell the page we've finished with an update to the XAML contents, after the control has rendered.
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.CompareStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:CompareStateTrigger x:Key="CompareStateTrigger"/>
|
||||
</Page.Resources>
|
||||
</Page>
|
|
@ -1,24 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Toolkit.Uwp.UI.Extensions;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class CompareStateTriggerPage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CompareStateTriggerPage"/> class.
|
||||
/// </summary>
|
||||
public CompareStateTriggerPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.IsEqualStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:IsEqualStateTrigger x:Key="IsEqualStateTrigger"/>
|
||||
</Page.Resources>
|
||||
</Page>
|
|
@ -1,24 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Toolkit.Uwp.UI.Extensions;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class IsEqualStateTriggerPage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IsEqualStateTriggerPage"/> class.
|
||||
/// </summary>
|
||||
public IsEqualStateTriggerPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.IsNotEqualStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:IsNotEqualStateTrigger x:Key="IsNotEqualStateTrigger"/>
|
||||
</Page.Resources>
|
||||
</Page>
|
|
@ -1,24 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Toolkit.Uwp.UI.Extensions;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class IsNotEqualStateTriggerPage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IsNotEqualStateTriggerPage"/> class.
|
||||
/// </summary>
|
||||
public IsNotEqualStateTriggerPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +1,14 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.IsNullOrEmptyStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.IsNullOrEmptyStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:IsNullOrEmptyStateTrigger x:Key="IsNullOrEmptyStateTrigger"/>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:IsNullOrEmptyStateTrigger x:Key="IsNullOrEmptyStateTrigger" />
|
||||
</Page.Resources>
|
||||
</Page>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.NetworkConnectionStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:NetworkConnectionStateTrigger x:Key="NetworkConnectionStateTrigger"/>
|
||||
</Page.Resources>
|
||||
</Page>
|
|
@ -1,24 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Toolkit.Uwp.UI.Extensions;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class NetworkConnectionStateTriggerPage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NetworkConnectionStateTriggerPage"/> class.
|
||||
/// </summary>
|
||||
public NetworkConnectionStateTriggerPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.RegexStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:RegexStateTrigger x:Key="RegexStateTrigger"/>
|
||||
</Page.Resources>
|
||||
</Page>
|
|
@ -1,15 +0,0 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.UserHandPreferenceStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:UserHandPreferenceStateTrigger x:Key="UserHandPreferenceStateTrigger"/>
|
||||
</Page.Resources>
|
||||
</Page>
|
|
@ -1,24 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Toolkit.Uwp.UI.Extensions;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class UserHandPreferenceStateTriggerPage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserHandPreferenceStateTriggerPage"/> class.
|
||||
/// </summary>
|
||||
public UserHandPreferenceStateTriggerPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<Page
|
||||
x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.UserInteractionModeStateTriggerPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Page.Resources>
|
||||
<!-- Dummy Resource for Optimization Protection -->
|
||||
<triggers:UserInteractionModeStateTrigger x:Key="UserInteractionModeStateTrigger"/>
|
||||
</Page.Resources>
|
||||
</Page>
|
|
@ -1,24 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Toolkit.Uwp.UI.Extensions;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class UserInteractionModeStateTriggerPage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UserInteractionModeStateTriggerPage"/> class.
|
||||
/// </summary>
|
||||
public UserInteractionModeStateTriggerPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.XamlOnlyPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<!-- Dummy Page for .NET Native Optimization Protection -->
|
||||
<!-- Put a copy of any controls/resources required for XAML Parsing within XAML Only Samples -->
|
||||
<!-- This page is never loaded by the app, but used to trick the compiler... -->
|
||||
<Page.Resources>
|
||||
<triggers:CompareStateTrigger x:Key="CompareStateTrigger" />
|
||||
<triggers:IsEqualStateTrigger x:Key="IsEqualStateTrigger" />
|
||||
<triggers:IsNotEqualStateTrigger x:Key="IsNotEqualStateTrigger" />
|
||||
<triggers:NetworkConnectionStateTrigger x:Key="NetworkConnectionStateTrigger" />
|
||||
<triggers:RegexStateTrigger x:Key="RegexStateTrigger" />
|
||||
<triggers:UserHandPreferenceStateTrigger x:Key="UserHandPreferenceStateTrigger" />
|
||||
<triggers:UserInteractionModeStateTrigger x:Key="UserInteractionModeStateTrigger" />
|
||||
</Page.Resources>
|
||||
|
||||
<Grid />
|
||||
</Page>
|
|
@ -2,8 +2,6 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.Toolkit.Uwp.UI.Extensions;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
|
@ -11,14 +9,12 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
|||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class RegexStateTriggerPage : Page
|
||||
public sealed partial class XamlOnlyPage : Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RegexStateTriggerPage"/> class.
|
||||
/// </summary>
|
||||
public RegexStateTriggerPage()
|
||||
public XamlOnlyPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
// DO NOT add any code here, this page is never loaded...
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -941,7 +941,6 @@
|
|||
},
|
||||
{
|
||||
"Name": "CompareStateTrigger",
|
||||
"Type": "CompareStateTriggerPage",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Enables a state if the value is equal to, greater than, or less than another value",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Triggers",
|
||||
|
@ -951,7 +950,6 @@
|
|||
},
|
||||
{
|
||||
"Name": "IsEqualStateTrigger",
|
||||
"Type": "IsEqualStateTriggerPage",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Enables a state if the value is equal to another value",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Triggers",
|
||||
|
@ -981,7 +979,6 @@
|
|||
},
|
||||
{
|
||||
"Name": "NetworkConnectionStateTrigger",
|
||||
"Type": "NetworkConnectionStateTriggerPage",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Trigger for switching when the network availability changes",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Triggers",
|
||||
|
@ -991,7 +988,6 @@
|
|||
},
|
||||
{
|
||||
"Name": "IsNotEqualStateTrigger",
|
||||
"Type": "IsNotEqualStateTriggerPage",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Enables a state if the value is not equal to another value",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Triggers",
|
||||
|
@ -1001,7 +997,6 @@
|
|||
},
|
||||
{
|
||||
"Name": "RegexStateTrigger",
|
||||
"Type": "RegexStateTriggerPage",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Enables a state if the regex expression is true for a given string value",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Triggers",
|
||||
|
@ -1011,7 +1006,6 @@
|
|||
},
|
||||
{
|
||||
"Name": "UserHandPreferenceStateTrigger",
|
||||
"Type": "UserHandPreferenceStateTriggerPage",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Trigger for switching UI based on whether the user favours their left or right hand.",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Triggers",
|
||||
|
@ -1021,7 +1015,6 @@
|
|||
},
|
||||
{
|
||||
"Name": "UserInteractionModeStateTrigger",
|
||||
"Type": "UserInteractionModeStateTriggerPage",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Trigger for switching when the User interaction mode changes (tablet mode)",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Triggers",
|
||||
|
|
Загрузка…
Ссылка в новой задаче