-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathSplitView.xaml
74 lines (65 loc) · 3.02 KB
/
SplitView.xaml
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
72
73
74
<Page.Resources>
<x:Double x:Key="SplitWidth">38</x:Double>
<Style x:Key="SplitStackPanel" TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="Margin" Value="0,0,0,0" />
</Style>
<Style x:Key="SplitFe" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
<Setter Property="Width" Value="{StaticResource SplitWidth}" />
</Style>
<Style x:Key="SplitButton" TargetType="Button">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
</Style>
</Page.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="15*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<ToggleButton x:Name="SplitToggleButton" >
<ToggleButton.Content>
<TextBlock FontFamily="Segoe MDL2 Assets" Text=""></TextBlock>
</ToggleButton.Content>
</ToggleButton>
</Grid>
<SplitView Grid.Row="1" IsPaneOpen="{Binding ElementName=SplitToggleButton,Path=IsChecked,Mode=TwoWay}"
DisplayMode="CompactOverlay" OpenPaneLength="100"
CompactPaneLength="50" >
<SplitView.Pane>
<Grid>
<StackPanel>
<Button Style="{StaticResource SplitButton}">
<Button.Content>
<Grid>
<StackPanel Style="{StaticResource SplitStackPanel}">
<TextBlock Style="{StaticResource SplitFe}"
Text="" />
<TextBlock Text="极客头条" />
</StackPanel>
</Grid>
</Button.Content>
</Button>
</StackPanel>
<StackPanel VerticalAlignment="Bottom">
<Button Style="{StaticResource SplitButton}">
<Button.Content>
<StackPanel Style="{StaticResource SplitStackPanel}">
<TextBlock Style="{StaticResource SplitFe}"
Text=""></TextBlock>
<TextBlock Text="信息"></TextBlock>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
</Grid>
</SplitView.Pane>
<SplitView.Content>
<Grid>
<Frame ></Frame>
</Grid>
</SplitView.Content>
</SplitView>
</Grid>