forked from fuse-open/fuse-samples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAppMenu.ux
44 lines (39 loc) · 1.46 KB
/
AppMenu.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
<DockPanel Color="#DDD" ux:Class="AppMenu">
<Router ux:Dependency="router"/>
<JavaScript>
exports.gotoOne = function() {
router.goto( "home", {}, "flights", {}, "arrivals" )
}
exports.gotoTwo = function() {
router.goto( "home", {}, "flights", {}, "departures" )
}
exports.gotoThree = function() {
router.goto( "home", {}, "bookings" )
}
exports.gotoAccount = function() {
router.push( "account" )
}
</JavaScript>
<!-- logo / app name -->
<Panel Dock="Top">
<Text Value="✈️" Alignment="Center" Margin="0,0,0,10" FontSize="100"/>
<Text Value="AppName" Alignment="BottomCenter" FontSize="20"/>
</Panel>
<Panel ux:Class="AppMenuItem" HitTestMode="LocalBounds">
<string ux:Property="Icon"/>
<string ux:Property="Label"/>
<object ux:Property="Handler"/>
<Text Alignment="CenterLeft" Width="32" Margin="4,0" Value="{Property this.Icon}"
Font="MaterialIcons" FontSize="32"/>
<Text Alignment="CenterLeft" Margin="40,0,10,0" Value="{Property this.Label}"/>
<Clicked Handler="{Property this.Handler}">
<RaiseUserEvent EventName="dismissMenu"/>
</Clicked>
</Panel>
<StackPanel ItemSpacing="5" Margin="0,30,0,0">
<AppMenuItem Icon="" Label="Arrivals" Handler="{gotoOne}"/>
<AppMenuItem Icon="" Label="Departures" Handler="{gotoTwo}"/>
<AppMenuItem Icon="" Label="Bookings" Handler="{gotoThree}"/>
<AppMenuItem Icon="" Label="Account" Handler="{gotoAccount}"/>
</StackPanel>
</DockPanel>