-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainView.ux
163 lines (150 loc) · 5.08 KB
/
MainView.ux
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<App>
<JavaScript File="./MainView.js" />
<!-- COMPONENT -->
<Font File="./assets/Playfair_Display/PlayfairDisplay-Regular.ttf" ux:Global="Normal" />
<Font File="./assets/Playfair_Display/PlayfairDisplay-Italic.ttf" ux:Global="Italic" />
<Font File="./assets/Playfair_Display/PlayfairDisplay-Bold.ttf" ux:Global="Bold" />
<Text ux:Class="MainText"
TextWrapping="Wrap"
FontSize="30"
Margin="0,0,0,30"/>
<Text ux:Class="TitleText"
TextWrapping="Wrap"
FontSize="20"
Margin="0,0,0,20"/>
<Text ux:Class="ContentText"
FontSize="13"
TextWrapping="Wrap"
Margin="0,0,5,0"
/>
<ContentText ux:Class="NormalText" Font="Normal" />
<ContentText ux:Class="BoldText" Font="Bold" />
<ContentText ux:Class="ItalicText" Font="Italic" />
<Panel ux:Class="MenuButton" Padding="5" Margin="0,5,10,5" Color="#000" >
<string ux:Property="Title" />
<Text Color="#ffffff">{ReadProperty this.Title}</Text>
<WhilePressed>
<Scale Factor=".8" Duration=".08" Easing="QuadraticOut" />
</WhilePressed>
</Panel>
<!-- plain post -->
<Page ux:Class="PlainPost">
<ScrollView ClipToBounds="true">
<StackPanel Alignment="Top" Padding="30,10">
<MainText>Plain Post</MainText>
<TitleText Value="{post.title}" />
<Each Items="{post.contentParagraphs}">
<ContentText Value="{content}" Margin="0,0,0,10" />
</Each>
</StackPanel>
</ScrollView>
</Page>
<Page ux:Class="PlainPostAuto">
<ScrollView ClipToBounds="true">
<StackPanel Alignment="Top" Padding="30,10">
<MainText>Plain Post Auto</MainText>
<!--<WrapPanel>
<TitleText TextAlignment="Left">
In this guide, we will look at how you install Fuse on both Windows and macOS.
</TitleText>
<TitleText TextAlignment="Center">
In this guide, we will look at how you install Fuse on both Windows and macOS.
</TitleText>
<TitleText TextAlignment="Center">
***
</TitleText>
<TitleText TextAlignment="Right">
In this guide, we will look at how you install Fuse on both Windows and macOS.
</TitleText>
</WrapPanel>
<TitleText TextAlignment="Center">
In this guide, we will look at how you install Fuse on both Windows and macOS.
</TitleText>
<TitleText TextAlignment="Center">
***
</TitleText>-->
<TitleText Value="{post.title}" />
<Each Items="{post.contentParagraphsFormatted}">
<StackPanel Margin="0,0,0,10">
<ContentText Value="Paragraph: {paragraphNumber} - Alignment: {paragraphAlignment}" Margin="0,0,0,10" Color="#091" />
<Panel>
<Match Value="{paragraphAlignment}">
<Case String="Center">
<Each Items="{paragraphContents}">
<Match Value="{fontStyle}">
<Case String="Normal">
<NormalText TextAlignment="{paragraphAlignment}" Value="{content}"/>
</Case>
<Case String="Italic">
<ItalicText TextAlignment="{paragraphAlignment}" Value="{content}"/>
</Case>
<Case String="Bold">
<BoldText TextAlignment="{paragraphAlignment}" Value="{content}"/>
</Case>
</Match>
</Each>
</Case>
<Case IsDefault="true">
<WrapPanel>
<Each Items="{paragraphContents}">
<Match Value="{fontStyle}">
<Case String="Normal">
<NormalText TextAlignment="{paragraphAlignment}" Value="{content}"/>
</Case>
<Case String="Italic">
<ItalicText TextAlignment="{paragraphAlignment}" Value="{content}"/>
</Case>
<Case String="Bold">
<BoldText TextAlignment="{paragraphAlignment}" Value="{content}"/>
</Case>
</Match>
</Each>
</WrapPanel>
</Case>
</Match>
</Panel>
</StackPanel>
</Each>
</StackPanel>
</ScrollView>
</Page>
<!-- html post -->
<Page ux:Class="HTMLPost">
<ScrollView ClipToBounds="true">
<StackPanel Alignment="Top" Padding="30,10">
<MainText>HTML Post</MainText>
<TitleText Value="{post.title}" />
<NativeViewHost>
<WebView Height="900" ZoomEnabled="false" Source="{post.contentHTML}">
</WebView>
</NativeViewHost>
</StackPanel>
</ScrollView>
</Page>
<DockPanel>
<StatusBarBackground Dock="Top"/>
<BottomBarBackground Dock="Bottom"/>
<PageControl ux:Name="pageControl">
<PlainPost ux:Name="plainPost" />
<PlainPostAuto ux:Name="plainPostAuto"/>
<HTMLPost ux:Name="htmlPost"/>
</PageControl>
<StackPanel Orientation="Horizontal" Dock="Top" Navigation="pageControl" Padding="30,10">
<MenuButton Title="Plain">
<Clicked>
<NavigateTo Target="plainPost"/>
</Clicked>
</MenuButton>
<MenuButton Title="Plain Auto">
<Clicked>
<NavigateTo Target="plainPostAuto"/>
</Clicked>
</MenuButton>
<MenuButton Title="HTML">
<Clicked>
<NavigateTo Target="htmlPost"/>
</Clicked>
</MenuButton>
</StackPanel>
</DockPanel>
</App>