-
-
Notifications
You must be signed in to change notification settings - Fork 153
/
MainView.ux
47 lines (40 loc) · 1.07 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
<App>
<ClientPanel>
<JavaScript>
var Observable = require("FuseJS/Observable");
var items = Observable();
for (var i = 0; i < 50; ++i) {
items.add({
index: i,
color: [ 0.9 + Math.random() * 0.1,
0.9 + Math.random() * 0.1,
0.9 + Math.random() * 0.1,
1],
});
};
module.exports = {
items: items
};
</JavaScript>
<Panel Alignment="Left" Margin="5,25,0,25">
<Rectangle ux:Name="scrollThumb" Height="40" Width="20"
CornerRadius="5" Color="#0aa" Anchor="50%,50%" Alignment="TopCenter"
Opacity="0" />
</Panel>
<ScrollView>
<StackPanel>
<Each Items="{items}">
<Rectangle Margin="10" CornerRadius="3" Color="{color}" Height="50">
<Text Alignment="TopRight" Value="{index}" Margin="3" />
</Rectangle>
</Each>
</StackPanel>
<ScrollingAnimation>
<Move Target="scrollThumb" Y="1" RelativeTo="ParentSize" />
</ScrollingAnimation>
<WhileInteracting>
<Change scrollThumb.Opacity="1" Duration="0.2" DurationBack="2" />
</WhileInteracting>
</ScrollView>
</ClientPanel>
</App>