Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
<Content Include="Icons\More.png" />
<Content Include="Icons\Notifications.png" />
<Content Include="Icons\Services.png" />
<Content Include="SamplePages\CanvasPathGeometry\CanvasPathGeometry.png" />
<Content Include="SamplePages\TilesBrush\TilesBrush.png" />
<Content Include="SamplePages\Eyedropper\Eyedropper.png" />
<Content Include="SamplePages\OnDevice\OnDevice.png" />
Expand Down Expand Up @@ -523,6 +524,9 @@
<Compile Include="SamplePages\EnumValuesExtension\EnumValuesExtensionPage.xaml.cs">
<DependentUpon>EnumValuesExtensionPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\CanvasPathGeometry\CanvasPathGeometryPage.xaml.cs">
<DependentUpon>CanvasPathGeometryPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\FocusBehavior\FocusBehaviorPage.xaml.cs">
<DependentUpon>FocusBehaviorPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -1017,6 +1021,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\CanvasPathGeometry\CanvasPathGeometryPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\FocusBehavior\FocusBehaviorPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.CanvasPathGeometryPage"
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:xaml="using:Microsoft.Graphics.Canvas.UI.Xaml"
mc:Ignorable="d">

<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="0.1*" />
<RowDefinition Height="48" />
<RowDefinition Height="0.9*" />
</Grid.RowDefinitions>
<TextBox x:Name="InputData"
Margin="10,3"
FontFamily="Courier New"
FontSize="14"
PlaceholderText="Enter SVG/XAML Path Data and press Parse. (Or select a sample from the Samples list below)"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectionHighlightColor="#007aff"
Text="{x:Bind InputText, Mode=TwoWay}"
TextWrapping="Wrap" />
<StackPanel Grid.Row="1"
HorizontalAlignment="Left"
Orientation="Horizontal">
<TextBlock Margin="12,3"
VerticalAlignment="Center"
Text="Samples: " />
<ComboBox x:Name="SampleList"
Width="150"
Height="30"
Margin="0,4,10,4"
VerticalAlignment="Center"
SelectionChanged="{x:Bind OnSampleChanged}" />
</StackPanel>
<Button Grid.Row="1"
Width="120"
Height="36"
Margin="10,3"
HorizontalAlignment="Center"
Click="{x:Bind OnClearCanvas}"
Content="Clear" />
<Button Grid.Row="1"
Width="120"
Height="36"
Margin="10,3"
HorizontalAlignment="Right"
Click="{x:Bind OnParseData}"
Content="Parse" />
<Pivot x:Name="RootPivot"
Grid.Row="2">
<PivotItem Foreground="Black"
Header="Canvas">
<ScrollViewer x:Name="RenderScroll"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<xaml:CanvasControl x:Name="RenderCanvas"
Width="{Binding ElementName=RenderScroll, Path=ActualWidth}"
Height="{Binding ElementName=RenderScroll, Path=ActualHeight}"
MinWidth="1200"
MinHeight="800"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ClearColor="#A7A7A7"
Draw="{x:Bind OnCanvasDraw}" />
</ScrollViewer>
</PivotItem>
<PivotItem Foreground="Black"
Header="Commands">
<ScrollViewer Background="#272727"
HorizontalScrollBarVisibility="Disabled"
VerticalScrollBarVisibility="Auto">
<TextBlock x:Name="CommandsList"
Padding="10"
FontFamily="Courier New"
FontSize="16"
Foreground="White"
IsTextSelectionEnabled="True"
SelectionHighlightColor="#007aff"
TextWrapping="Wrap" />
</ScrollViewer>
</PivotItem>
</Pivot>
<StackPanel Grid.Row="2"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Orientation="Horizontal">
<TextBlock Margin="10,10,5,-10"
Text="StrokeThickness" />
<Slider x:Name="StrokeThickness"
Width="150"
Height="30"
Margin="0,4,10,4"
Background="White"
Foreground="White"
Maximum="10"
Minimum="0"
StepFrequency="0.1"
ValueChanged="{x:Bind OnStrokeThicknessChanged}" />
<TextBlock Margin="10,10,5,-10"
Text="Stroke Color: " />
<ComboBox x:Name="StrokeList"
Width="150"
Height="30"
Margin="0,4,10,4"
SelectionChanged="{x:Bind OnStrokeColorChanged}" />
<TextBlock Margin="10,10,5,-10"
Text="Fill Color: " />
<ComboBox x:Name="FillList"
Width="150"
Height="30"
Margin="0,4,10,4"
SelectionChanged="{x:Bind OnFillColorChanged}" />
</StackPanel>
</Grid>
</Page>
Loading