forked from fuse-open/fuse-samples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainView.ux
57 lines (52 loc) · 2.41 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
<App>
<DockPanel>
<StatusBarBackground Dock="Top" />
<Panel>
<Rectangle ux:Name="newLayoutMaster" Width="50" Height="50" Color="#8889" Alignment="TopLeft" Margin="20,50" />
<StackPanel Alignment="Top">
<TextInput PlaceholderText="Click me to show the keyboard" Alignment="Center">
<WhileKeyboardVisible>
<Move Target="rect3" RelativeTo="Keyboard" Y="-1" Duration="0.5" />
</WhileKeyboardVisible>
</TextInput>
<Button Text="Click me" Alignment="Center">
<WhilePressed>
<Move Target="rect1" RelativeTo="Size" Y="-1" Duration="0.5" />
<Move Target="rect2" RelativeTo="ParentSize" Y="-1" Duration="0.5" />
<Move Target="rect5" RelativeTo="Size" RelativeNode="relativeNode" Y="-1" Duration="0.5" />
</WhilePressed>
</Button>
<Switch>
<WhileTrue>
<Change rect4.LayoutMaster="newLayoutMaster" />
</WhileTrue>
</Switch>
</StackPanel>
<Rectangle ux:Name="relativeNode" Height="400" Width="50" Color="#bbf" Alignment="BottomRight">
<VerticalText Alignment="Center" Width="200">relativeNode</VerticalText>
</Rectangle>
<Text ux:Class="VerticalText" TransformOrigin="Center" Alignment="Bottom" Color="#000">
<Rotation Degrees="-90" />
</Text>
<Grid ColumnCount="5" Rows="3*,1*" Color="#ddd" Width="80%" Height="100%" Alignment="BottomLeft">
<VerticalText Width="200">RelativeTo="Size"</VerticalText>
<VerticalText Width="200">RelativeTo="ParentSize"</VerticalText>
<VerticalText Width="200">RelativeTo="Keyboard"</VerticalText>
<VerticalText Width="200">RelativeTo="PositionChange"</VerticalText>
<VerticalText Width="200">RelativeNode="relativeNode"</VerticalText>
<Rectangle ux:Name="rect1" Width="50" Height="50" Color="#f00" Alignment="Bottom" />
<Rectangle ux:Name="rect2" Width="50" Height="50" Color="#0f0" Alignment="Bottom" />
<Rectangle ux:Name="rect3" Width="50" Height="50" Color="#00f" Alignment="Bottom" />
<Panel Alignment="Bottom" Width="50" Height="50">
<Rectangle ux:Name="rect4" Width="50" Height="50" Color="#0ff" LayoutMaster="layoutMaster">
<LayoutAnimation>
<Move RelativeTo="PositionChange" X="1" Y="1" Duration="0.5" />
</LayoutAnimation>
</Rectangle>
<Rectangle ux:Name="layoutMaster" Width="50" Height="50" />
</Panel>
<Rectangle ux:Name="rect5" Width="50" Height="50" Color="#f0f" Alignment="Bottom" />
</Grid>
</Panel>
</DockPanel>
</App>