Added sample page
This commit is contained in:
Родитель
c0f7ff3684
Коммит
b31758da2d
|
@ -1078,6 +1078,10 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Content>
|
||||
<Content Include="SamplePages\Triggers\ControlSizeTrigger.bind">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Content>
|
||||
<Page Include="SamplePages\Triggers\FullScreenModeStateTriggerPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<Page
|
||||
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:triggers="using:Microsoft.Toolkit.Uwp.UI.Triggers"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup>
|
||||
<VisualState>
|
||||
<VisualState.StateTriggers>
|
||||
<triggers:ControlSizeTrigger
|
||||
TargetElement="ParentGrid"
|
||||
MinWidth="400"
|
||||
MaxWidth="500"/>
|
||||
</VisualState.StateTriggers>
|
||||
<VisualState.Setters>
|
||||
<Setter Target="ResizingText.FontSize" Value="20"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
|
||||
<StackPanel VerticalAlignment="Center" Width="500">
|
||||
<Grid
|
||||
x:Name="ParentGrid"
|
||||
Width="{Binding Value, ElementName=Slider, Mode=OneWay}"
|
||||
Height="50"
|
||||
Background="Blue"/>
|
||||
<TextBlock
|
||||
x:Name="ResizingText"
|
||||
FontSize="12"
|
||||
Text="Windows Community Toolkit"
|
||||
HorizontalAlignment="Center"/>
|
||||
<Slider
|
||||
x:Name="Slider"
|
||||
Minimum="0"
|
||||
Maximum="500" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
|
@ -31,6 +31,7 @@
|
|||
<triggers:RegexStateTrigger x:Key="RegexStateTrigger" />
|
||||
<triggers:UserHandPreferenceStateTrigger x:Key="UserHandPreferenceStateTrigger" />
|
||||
<triggers:UserInteractionModeStateTrigger x:Key="UserInteractionModeStateTrigger" />
|
||||
<triggers:ControlSizeTrigger x:Key="ControlSizeTrigger" />
|
||||
<behaviors:StartAnimationAction x:Key="StartAnimationAction" />
|
||||
<behaviors:AutoSelectBehavior x:Key="AutoSelectBehavior" />
|
||||
<controls:ColorPicker x:Key="ColorPicker" />
|
||||
|
|
|
@ -785,7 +785,7 @@
|
|||
"Type": "ThemeListenerPage",
|
||||
"Subcategory": "Systems",
|
||||
"About": "The ThemeListener allows you to keep track of changes to the System Theme.",
|
||||
"CodeUrl" : "https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI/Helpers/ThemeListener.cs",
|
||||
"CodeUrl": "https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI/Helpers/ThemeListener.cs",
|
||||
"Icon": "/Assets/Helpers.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/ThemeListener.md"
|
||||
},
|
||||
|
@ -844,7 +844,7 @@
|
|||
"Type": "CanvasPathGeometryPage",
|
||||
"Subcategory": "Parser",
|
||||
"About": "CanvasPathGeometry class allows you to convert Win2d Path Mini Language string to CanvasGeometry, Brushes, CanvasStrokes or CanvasStrokeStyles.",
|
||||
"CodeUrl" : "https://github.com/CommunityToolkit/WindowsCommunityToolkit/tree/main/Microsoft.Toolkit.Uwp.UI.Media/Geometry",
|
||||
"CodeUrl": "https://github.com/CommunityToolkit/WindowsCommunityToolkit/tree/main/Microsoft.Toolkit.Uwp.UI.Media/Geometry",
|
||||
"Icon": "/SamplePages/CanvasPathGeometry/CanvasPathGeometry.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/parsers/CanvasPathGeometry.md"
|
||||
},
|
||||
|
@ -882,7 +882,7 @@
|
|||
"Name": "Guard APIs",
|
||||
"Subcategory": "Developer",
|
||||
"About": "The Guard APIs can be used to validate method arguments in a streamlined manner, which is also faster, less verbose, more expressive and less error prone than manually writing checks and throwing exceptions.",
|
||||
"CodeUrl" : "https://github.com/CommunityToolkit/WindowsCommunityToolkit/tree/main/Microsoft.Toolkit.Diagnostics",
|
||||
"CodeUrl": "https://github.com/CommunityToolkit/WindowsCommunityToolkit/tree/main/Microsoft.Toolkit.Diagnostics",
|
||||
"Icon": "/Assets/Helpers.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/developer-tools/Guard.md"
|
||||
},
|
||||
|
@ -890,7 +890,7 @@
|
|||
"Name": "High Performance APIs",
|
||||
"Subcategory": "Developer",
|
||||
"About": "The High Performance package contains a set of APIs that are heavily focused on optimization. All the new APIs have been carefully crafted to achieve the best possible performance when using them, either through reduced memory allocation, micro-optimizations at the assembly level, or by structuring the APIs in a way that facilitates writing performance oriented code in general.",
|
||||
"CodeUrl" : "https://github.com/CommunityToolkit/WindowsCommunityToolkit/tree/main/Microsoft.Toolkit.HighPerformance",
|
||||
"CodeUrl": "https://github.com/CommunityToolkit/WindowsCommunityToolkit/tree/main/Microsoft.Toolkit.HighPerformance",
|
||||
"Icon": "/Assets/Helpers.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/high-performance/Introduction.md"
|
||||
},
|
||||
|
@ -911,6 +911,15 @@
|
|||
"Icon": "/Assets/Helpers.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/Triggers.md"
|
||||
},
|
||||
{
|
||||
"Name": "ControlSizeTrigger",
|
||||
"Subcategory": "State Triggers",
|
||||
"About": "Enables a state if the target control meets the specified size.",
|
||||
"CodeUrl": "https://github.com/CommunityToolkit/WindowsCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI/Triggers/ControlSizeTrigger.cs",
|
||||
"XamlCodeFile": "/SamplePages/Triggers/ControlSizeTrigger.bind",
|
||||
"Icon": "/Assets/Helpers.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/helpers/Triggers.md"
|
||||
},
|
||||
{
|
||||
"Name": "IsEqualStateTrigger",
|
||||
"Subcategory": "State Triggers",
|
||||
|
|
Загрузка…
Ссылка в новой задаче