summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamed Abdelnour <mohamed.k.abdelnour@gmail.com>2021-05-14 23:59:11 +0200
committerMohamed Abdelnour <mohamed.k.abdelnour@gmail.com>2021-05-14 23:59:11 +0200
commit8b6341458b742736bf42da0589c10a2bff864a4c (patch)
treea98e0a8bd09fcf64a55484043eb5227bbf1058e1
parent7c49919297717eeca616b382ab398f12958ed56f (diff)
Add XAML test file
-rw-r--r--tests/syntax-tests/highlighted/XAML/ItemPage.xaml264
-rw-r--r--tests/syntax-tests/source/XAML/ItemPage.xaml264
-rw-r--r--tests/syntax-tests/source/XAML/LICENSE.md23
3 files changed, 551 insertions, 0 deletions
diff --git a/tests/syntax-tests/highlighted/XAML/ItemPage.xaml b/tests/syntax-tests/highlighted/XAML/ItemPage.xaml
new file mode 100644
index 00000000..ea33f0d4
--- /dev/null
+++ b/tests/syntax-tests/highlighted/XAML/ItemPage.xaml
@@ -0,0 +1,264 @@
+<!--
+ //*********************************************************
+ //
+ // 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.
+ //
+ //*********************************************************
+-->
+<Page
+ x:Class="AppUIBasics.ItemPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:common="using:AppUIBasics.Common"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:data="using:AppUIBasics.Data"
+ xmlns:local="using:AppUIBasics"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ x:Name="pageRoot"
+ mc:Ignorable="d">
+
+ <!--
+ This grid acts as a root panel for the page that defines two rows:
+ * Row 0 contains the back button and page title
+ * Row 1 contains the rest of the page layout
+ -->
+ <Grid x:Name="rootPanel" d:DataContext="{Binding Groups[0].Items[0], Source={d:DesignData Source=/DataModel/ControlinfoData.json, Type=data:ControlInfoDataSource}}" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
+ <VisualStateManager.VisualStateGroups>
+ <VisualStateGroup>
+ <VisualState>
+ <VisualState.StateTriggers>
+ <local:DeviceFamilyTrigger DeviceFamily="Windows.Xbox" />
+ </VisualState.StateTriggers>
+ <VisualState.Setters>
+ <Setter Target="svPanel.Margin" Value="0,0,48,27" />
+ </VisualState.Setters>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup>
+ <VisualState x:Name="NormalFrameContent" />
+ <VisualState x:Name="WideFrameContent">
+ <VisualState.Setters>
+ <Setter Target="contentFrame.Width" Value="1028" />
+ <Setter Target="contentFrame.HorizontalAlignment" Value="Left" />
+ </VisualState.Setters>
+ </VisualState>
+ </VisualStateGroup>
+ <VisualStateGroup x:Name="LayoutVisualStates">
+ <VisualState x:Name="LargeLayout">
+ <VisualState.StateTriggers>
+ <AdaptiveTrigger MinWindowWidth="1372" />
+ </VisualState.StateTriggers>
+ </VisualState>
+ <VisualState x:Name="WideLayout">
+ <VisualState.StateTriggers>
+ <AdaptiveTrigger MinWindowWidth="{StaticResource Breakpoint640Plus}" />
+ </VisualState.StateTriggers>
+ <VisualState.Setters>
+ <Setter Target="seeAlsoPanel.Width" Value="Auto" />
+ <Setter Target="seeAlsoPanel.(Grid.Row)" Value="3" />
+ <Setter Target="seeAlsoPanel.(Grid.Column)" Value="0" />
+ <Setter Target="seeAlsoPanel.(Grid.ColumnSpan)" Value="3" />
+
+ <Setter Target="SourcePanel.(Grid.ColumnSpan)" Value="1" />
+
+ <Setter Target="DocumentationPanel.(Grid.ColumnSpan)" Value="1" />
+
+ <Setter Target="RelatedControlsPanel.(Grid.Row)" Value="0" />
+ <Setter Target="RelatedControlsPanel.(Grid.Column)" Value="2" />
+ <Setter Target="RelatedControlsPanel.(Grid.ColumnSpan)" Value="1" />
+
+ <Setter Target="FeedbackPanel.(Grid.Row)" Value="1" />
+ <Setter Target="FeedbackPanel.(Grid.Column)" Value="2" />
+ <Setter Target="FeedbackPanel.(Grid.ColumnSpan)" Value="1" />
+ </VisualState.Setters>
+ </VisualState>
+ <VisualState x:Name="NarrowLayout">
+ <VisualState.StateTriggers>
+ <AdaptiveTrigger MinWindowWidth="0" />
+ </VisualState.StateTriggers>
+ <VisualState.Setters>
+ <Setter Target="seeAlsoPanel.Width" Value="Auto" />
+ <Setter Target="seeAlsoPanel.(Grid.Row)" Value="3" />
+ <Setter Target="seeAlsoPanel.(Grid.Column)" Value="0" />
+ <Setter Target="seeAlsoPanel.(Grid.ColumnSpan)" Value="3" />
+
+ <Setter Target="SourcePanel.(Grid.ColumnSpan)" Value="1" />
+
+ <Setter Target="DocumentationPanel.(Grid.ColumnSpan)" Value="1" />
+
+ <Setter Target="RelatedControlsPanel.(Grid.Row)" Value="0" />
+ <Setter Target="RelatedControlsPanel.(Grid.Column)" Value="2" />
+ <Setter Target="RelatedControlsPanel.(Grid.ColumnSpan)" Value="1" />
+
+ <Setter Target="FeedbackPanel.(Grid.Row)" Value="1" />
+ <Setter Target="FeedbackPanel.(Grid.Column)" Value="2" />
+ <Setter Target="FeedbackPanel.(Grid.ColumnSpan)" Value="1" />
+
+ <Setter Target="rightMargin.Width" Value="0" />
+ <Setter Target="contentRoot.Padding" Value="14,0" />
+ </VisualState.Setters>
+ </VisualState>
+ </VisualStateGroup>
+ </VisualStateManager.VisualStateGroups>
+
+ <!-- Content Region -->
+ <ScrollViewer
+ x:Name="svPanel"
+
+ VerticalScrollBarVisibility="Auto"
+ VerticalScrollMode="Auto">
+ <Grid x:Name="contentRoot" Padding="24,0,0,0" SizeChanged="OnContentRootSizeChanged">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition x:Name="contentColumn" />
+ <ColumnDefinition x:Name="rightMargin" Width="20" />
+ <ColumnDefinition x:Name="infoColumn" Width="Auto" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="*" />
+ <RowDefinition Height="20" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <TextBlock
+ x:Name="descriptionText"
+ Style="{ThemeResource BodyTextBlockStyle}"
+ Grid.ColumnSpan="2"
+ Margin="0,5,24,0"
+ Text="{x:Bind Item.Description}" />
+
+ <Frame x:Name="contentFrame" Grid.Row="1" />
+
+ <Grid
+ x:Name="seeAlsoPanel"
+ Grid.Row="0"
+ Grid.RowSpan="2"
+ Grid.Column="2"
+ Width="280"
+ Margin="0,0,24,24">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition />
+ <ColumnDefinition Width="20" />
+ <ColumnDefinition />
+ </Grid.ColumnDefinitions>
+
+ <StackPanel x:Name="SourcePanel" Grid.Row="0" Grid.ColumnSpan="3" Margin="0,0,0,40">
+ <TextBlock
+ x:Name="SourceHeader"
+ x:Uid="SourceHeader"
+ Style="{ThemeResource SubtitleTextBlockStyle}"
+ Text="View page code on GitHub"/>
+ <HyperlinkButton
+ x:Name="PageMarkupGitHubLink"
+ ToolTipService.ToolTip="{x:Bind PageMarkupGitHubLink.NavigateUri, Mode=OneWay}">
+ <TextBlock Text="XAML source code"/>
+ </HyperlinkButton>
+ <HyperlinkButton
+ x:Name="PageCodeGitHubLink"
+ ToolTipService.ToolTip="{x:Bind PageCodeGitHubLink.NavigateUri, Mode=OneWay}"
+ Margin="0,12,0,0">
+ <TextBlock Text="C# source code"/>
+ </HyperlinkButton>
+ </StackPanel>
+
+ <StackPanel x:Name="DocumentationPanel" Grid.Row="1" Grid.ColumnSpan="3" Margin="0,0,0,40">
+ <TextBlock
+ x:Name="docHeader"
+ x:Uid="DocHeader"
+ Style="{StaticResource SubtitleTextBlockStyle}" />
+ <ItemsControl
+ x:Name="DocsList"
+ Margin="0,12,0,0"
+ IsTabStop="False"
+ ItemsSource="{x:Bind Item.Docs}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <[3