-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
103 lines (93 loc) · 3.49 KB
/
MainWindow.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
<Window
x:Class="nonAffine.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:nonAffine"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
Width="800"
Height="450"
mc:Ignorable="d">
<Grid>
<Viewport3D Name="viewport3d">
<ModelVisual3D>
<ModelVisual3D.Content>
<Model3DGroup>
<GeometryModel3D>
<GeometryModel3D.Geometry>
<!-- Rectangle. -->
<MeshGeometry3D
x:Name="mesh"
Positions="0 0 0, 0 1 0, 1 0 0, 1 1 0"
TextureCoordinates="0 1, 0 0, 1 1, 1 0"
TriangleIndices="0 2 1, 2 3 1" />
</GeometryModel3D.Geometry>
<GeometryModel3D.Material>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<ImageBrush x:Name="MainImage" ImageSource="LetterPaperTest.jpg" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</GeometryModel3D.Material>
<GeometryModel3D.Transform>
<MatrixTransform3D x:Name="xform" />
</GeometryModel3D.Transform>
</GeometryModel3D>
<!-- Light source. -->
<AmbientLight Color="White" />
</Model3DGroup>
</ModelVisual3D.Content>
</ModelVisual3D>
<!-- Camera. -->
<Viewport3D.Camera>
<OrthographicCamera
Width="5"
LookDirection="0 0 -1"
Position="0.5 0.5 1"
UpDirection="0 1 0" />
</Viewport3D.Camera>
</Viewport3D>
<Viewbox>
<Border
Width="85"
Height="110"
Margin="40"
BorderBrush="Black"
BorderThickness=".3"
Opacity=".5" />
</Viewbox>
<Viewbox>
<Border
Width="110"
Height="85"
Margin="40"
BorderBrush="Black"
BorderThickness=".3"
Opacity=".5" />
</Viewbox>
<Button
x:Name="OpenButton"
Margin="20"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="OpenButton_Click"
Content="Open Image" />
<StackPanel
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Orientation="Horizontal">
<Button
x:Name="OpenFolder"
Margin="5,20"
Click="OpenFolder_Click"
Content="Open Folder"
IsEnabled="False" />
<Button
x:Name="SaveButton"
Margin="5,20,20,20"
Click="SaveButton_Click"
Content="Save" />
</StackPanel>
</Grid>
</Window>