-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
156 lines (120 loc) · 5.21 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<Window x:Class="Upscale_Pixels.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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Upscale_Pixels"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" Background="Black"
>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border BorderBrush="Blue"
BorderThickness="5"
CornerRadius="10"
Margin="10"
Grid.Column="1"
Grid.ColumnSpan="2">
<StackPanel Margin="5">
<Image x:Name="OutputImage" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
</StackPanel>
</Border>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" VerticalAlignment="Stretch">
<TextBlock Text="Original Image:" FontSize="10" Foreground="White"/>
<Border BorderThickness="2"
CornerRadius="5"
BorderBrush="Blue"
VerticalAlignment="Stretch"
>
<Image x:Name="OriginalImage" VerticalAlignment="Stretch" Width="120"/>
</Border>
</StackPanel>
<Border Grid.Row="1"
BorderThickness="2"
CornerRadius="5"
BorderBrush="Blue">
<Grid>
<Label x:Name="LabelDrop"
AllowDrop="True"
PreviewDrop="LabelDrop_PreviewDrop"
Drop="LabelDrop_Drop">
</Label>
<TextBlock x:Name="DropTextBlock" Foreground="White" VerticalAlignment="Bottom" Margin="0, 15" />
</Grid>
</Border>
<Border Grid.Row="2"
BorderBrush="Blue"
BorderThickness="2"
CornerRadius="5">
<TextBlock x:Name="InfoBox"
Text="Info: "
TextWrapping="Wrap"
Foreground="White"
/>
</Border>
</Grid>
<Grid Grid.Column="3">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Content="Start!"
Background="Transparent"
Foreground="Blue"
FontSize="50"
Grid.Row="1"
Click="Button_Click">
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<EventTrigger RoutedEvent="Button.MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="FontSize"
To="85"
Duration="0:0:0.3" />
<!-- Ändere die Dauer nach Bedarf -->
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="Button.MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="FontSize"
To="50"
Duration="0:0:0.3" />
<!-- Ändere die Dauer nach Bedarf -->
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<StackPanel Grid.Row="2">
<TextBlock Text="Previous Files:"
Foreground="White"
HorizontalAlignment="Center"/>
<ComboBox x:Name="ImagesHistory"
Margin ="10"/>
</StackPanel>
</Grid>
</Grid>
</Window>