-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml
134 lines (131 loc) · 7.5 KB
/
MainPage.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
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
<Page
x:Class="Roomsizer.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Roomsizer"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Converters"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" d:DesignHeight="400" Width="400">
<Page.Resources>
<controls:BoolToVisibilityConverter x:Key="BoolToVis" />
</Page.Resources>
<Grid Margin="0,0,0,0">
<TextBlock HorizontalAlignment="Left" Text="Select a Room .yy File" TextWrapping="Wrap" VerticalAlignment="Top" Margin="26,25,0,0"/>
<Button Content="Browse" Margin="300,19,0,0" VerticalAlignment="Top" Click="Browser_Click"/>
<Button Name="ReloadButton" IsEnabled="False" Content="Reload" Margin="228,19,0,0" VerticalAlignment="Top" Click="ReloadButton_Click"/>
<TextBox Name="PathTextBox" HorizontalAlignment="Left" Margin="26,55,0,0" Text="" TextWrapping="Wrap" VerticalAlignment="Top" Width="341" Height="32" IsReadOnly="True"/>
<ToggleButton Name="AnchorTL" Margin="37,103,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorTL_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="-45" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorT" Margin="92,103,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorT_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="0" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorTR" Margin="146,103,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorTR_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="45" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorL" Margin="37,155,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorL_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="-90" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorC" Margin="92,155,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="True" Click="AnchorC_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="0" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorR" Margin="146,155,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorR_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="90" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorBL" Margin="37,206,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorBL_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="-135" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorB" Margin="92,206,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorB_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="180" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<ToggleButton Name="AnchorBR" Margin="146,206,0,0" VerticalAlignment="Top" Height="40" Width="40" IsChecked="False" Click="AnchorBR_Checked">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph=""
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="135" />
</FontIcon.RenderTransform>
</FontIcon>
</ToggleButton>
<TextBox Name="WidthBox" HorizontalAlignment="Left" Margin="228,133,0,0" Text="" TextWrapping="Wrap" VerticalAlignment="Top" Width="139" TextChanged="TextChanged"/>
<TextBox Name="HeightBox" HorizontalAlignment="Left" Margin="228,209,0,0" Text="" TextWrapping="Wrap" VerticalAlignment="Top" Width="139" TextChanged="TextChanged"/>
<TextBlock Text="Width" TextWrapping="Wrap" Margin="228,103,37,275" />
<TextBlock Text="Height" TextWrapping="Wrap" Margin="228,180,38,197" />
<Button Name="ResizeButton" Background="{ThemeResource SystemAccentColor}" Content="Resize" Margin="38,342,0,0" VerticalAlignment="Top" Width="327" Click="Resize_Click" Height="47" RequestedTheme="Default">
<FlyoutBase.AttachedFlyout>
<Flyout>
<Flyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
<Setter Property="Width" Value="350"/>
</Style>
</Flyout.FlyoutPresenterStyle>
<TextBlock Text="Set Width and Height larger than their starting values"/>
</Flyout>
</FlyoutBase.AttachedFlyout>
</Button>
<CheckBox Name="TileSizeCheckbox" Content="Round up by tile size?" Margin="37,295,0,0" VerticalAlignment="Top" Click="TileSizeCheckbox_Click"/>
<TextBlock Visibility="{Binding ElementName=TileSizeCheckbox,Path=IsChecked,Converter={StaticResource BoolToVis}}" Name="TileSizeLabel" Text="Tile Size" TextWrapping="Wrap" Margin="228,272,38,42" />
<TextBox Visibility="{Binding ElementName=TileSizeCheckbox,Path=IsChecked,Converter={StaticResource BoolToVis}}" Name="TileSizeBox" HorizontalAlignment="Left" Margin="228,295,0,0" Text="" TextWrapping="Wrap" VerticalAlignment="Top" Width="139" TextChanged="TextChanged"/>
</Grid>
</Page>