-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathInteractiveSample.xaml
More file actions
71 lines (70 loc) · 3.75 KB
/
InteractiveSample.xaml
File metadata and controls
71 lines (70 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:local="using:MvvmSampleUwp.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls">
<Style TargetType="local:InteractiveSample">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:InteractiveSample">
<Grid
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Style="{StaticResource CardStyle}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock
Margin="24,12,0,0"
FontSize="22"
FontWeight="Normal"
Text="Sample" />
<Pivot Grid.Row="1" Margin="14,0,12,12">
<Pivot.Resources>
<FontWeight x:Key="PivotHeaderItemThemeFontWeight">SemiBold</FontWeight>
<x:Double x:Key="PivotHeaderItemFontSize">14</x:Double>
</Pivot.Resources>
<PivotItem Header="Sample">
<ContentPresenter Margin="0,4,0,12" Content="{TemplateBinding Content}" />
</PivotItem>
<PivotItem Header="XAML">
<ScrollViewer>
<controls:MarkdownTextBlock
Margin="-8,4,0,0"
Padding="8"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollMode="Disabled"
Text="{TemplateBinding XamlCode}" />
</ScrollViewer>
</PivotItem>
<PivotItem
Header="C#">
<ScrollViewer>
<controls:MarkdownTextBlock
Margin="-8,4,0,0"
Padding="8,8,0,0"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollMode="Disabled"
Text="{TemplateBinding CSharpCode}" />
</ScrollViewer>
</PivotItem>
</Pivot>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>