|
6 | 6 | xmlns:local="clr-namespace:PixelArtTool"
|
7 | 7 | xmlns:System="clr-namespace:System;assembly=mscorlib" x:Name="window" x:Class="PixelArtTool.MainWindow"
|
8 | 8 | mc:Ignorable="d"
|
9 |
| - Title="PixelArtTool (Test Version)" Height="412.222" Width="739.444" Background="#FF252526" KeyDown="OnKeyDown" KeyUp="OnKeyUp" Icon="Resources/Icons/appicon.ico"> |
| 9 | + Title="PixelArtTool (Test Version)" Height="412.222" Width="739.444" Background="#FF252526" KeyDown="OnKeyDown" KeyUp="OnKeyUp" Icon="Resources/Icons/appicon.ico" MouseWheel="WindowMouseWheel"> |
10 | 10 | <Window.CommandBindings>
|
11 | 11 | <CommandBinding Command="ApplicationCommands.Undo" Executed="Executed_Undo" CanExecute="CanExecute_Undo"/>
|
12 | 12 | <CommandBinding Command="ApplicationCommands.Redo" Executed="Executed_Redo" CanExecute="CanExecute_Redo"/>
|
|
169 | 169 | </StatusBarItem>
|
170 | 170 | </StatusBar>
|
171 | 171 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="198" Margin="10,50,0,0" VerticalAlignment="Top" Width="64">
|
172 |
| - <Image x:Name="imgPalette" HorizontalAlignment="Left" Height="198" Margin="0,0,0,-30" VerticalAlignment="Top" Width="64" Stretch="Fill"/> |
| 172 | + <Image x:Name="paletteImage" HorizontalAlignment="Left" Height="198" Margin="0,0,0,-30" VerticalAlignment="Top" Width="64" Stretch="Fill" MouseLeftButtonDown="PaletteLeftButtonDown" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
173 | 173 | </Border>
|
174 | 174 | <Grid>
|
175 | 175 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="256" Margin="89,50,0,0" VerticalAlignment="Top" Width="256">
|
176 |
| - <Image x:Name="imgGrid" HorizontalAlignment="Left" Height="256" Margin="-1" VerticalAlignment="Top" Width="256" Stretch="Fill"/> |
| 176 | + <Image x:Name="gridImage" HorizontalAlignment="Left" Height="256" Margin="-1" VerticalAlignment="Top" Width="256" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
177 | 177 | </Border>
|
178 | 178 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="256" Margin="89,50,0,0" VerticalAlignment="Top" Width="256">
|
179 |
| - <Image x:Name="imgCanvas" HorizontalAlignment="Left" Height="256" Margin="-1" VerticalAlignment="Top" Width="256" Stretch="Fill"/> |
| 179 | + <Image x:Name="drawingImage" HorizontalAlignment="Left" Height="256" Margin="-1" VerticalAlignment="Top" Width="256" Stretch="Fill" MouseMove="DrawingAreaMouseMoved" MouseRightButtonDown="DrawingRightButtonDown" MouseLeftButtonDown="DrawingLeftButtonDown" MouseDown="DrawingMiddleButtonDown" MouseUp="DrawingMouseUp" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
180 | 180 | </Border>
|
181 | 181 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="256" Margin="89,50,0,0" VerticalAlignment="Top" Width="256">
|
182 |
| - <Image x:Name="imgOutline" IsHitTestVisible="False" HorizontalAlignment="Left" Height="256" Margin="-1" VerticalAlignment="Top" Width="256" Stretch="Fill" IsEnabled="False"/> |
| 182 | + <Image x:Name="outlineImage" IsHitTestVisible="False" HorizontalAlignment="Left" Height="256" Margin="-1" VerticalAlignment="Top" Width="256" Stretch="Fill" IsEnabled="False" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
183 | 183 | </Border>
|
184 | 184 | <Rectangle x:Name="recPreviewBg2x" Fill="Black" HorizontalAlignment="Left" Height="32" Margin="375,50,0,0" VerticalAlignment="Top" Width="32"/>
|
185 | 185 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="32" Margin="375,50,0,0" VerticalAlignment="Top" Width="32">
|
186 |
| - <Image x:Name="imgPreview2x" HorizontalAlignment="Left" Height="32" Margin="-1" VerticalAlignment="Top" Width="32" Stretch="Fill"/> |
| 186 | + <Image x:Name="imgPreview2x" HorizontalAlignment="Left" Height="32" Margin="-1" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
187 | 187 | </Border>
|
188 | 188 | <Rectangle x:Name="recPreviewBg1x" Fill="Black" HorizontalAlignment="Left" Height="16" Margin="425,50,0,0" VerticalAlignment="Top" Width="16"/>
|
189 | 189 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="16" Margin="425,50,0,0" VerticalAlignment="Top" Width="16">
|
190 |
| - <Image x:Name="imgPreview1x" HorizontalAlignment="Left" Height="16" Margin="-1" VerticalAlignment="Top" Width="16" Stretch="Fill"/> |
| 190 | + <Image x:Name="imgPreview1x" HorizontalAlignment="Left" Height="16" Margin="-1" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
191 | 191 | </Border>
|
192 | 192 | <Rectangle x:Name="recPreviewBg2xb" Fill="Gray" HorizontalAlignment="Left" Height="32" Margin="375,100,0,0" VerticalAlignment="Top" Width="32"/>
|
193 | 193 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="32" Margin="375,100,0,0" VerticalAlignment="Top" Width="32">
|
194 |
| - <Image x:Name="imgPreview2xb" HorizontalAlignment="Left" Height="32" Margin="-1" VerticalAlignment="Top" Width="32" Stretch="Fill"/> |
| 194 | + <Image x:Name="imgPreview2xb" HorizontalAlignment="Left" Height="32" Margin="-1" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
195 | 195 | </Border>
|
196 | 196 | <Rectangle x:Name="recPreviewBg1xb" Fill="Gray" HorizontalAlignment="Left" Height="16" Margin="425,100,0,0" VerticalAlignment="Top" Width="16"/>
|
197 | 197 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="16" Margin="425,100,0,0" VerticalAlignment="Top" Width="16">
|
198 |
| - <Image x:Name="imgPreview1xb" HorizontalAlignment="Left" Height="16" Margin="-1" VerticalAlignment="Top" Width="16" Stretch="Fill"/> |
| 198 | + <Image x:Name="imgPreview1xb" HorizontalAlignment="Left" Height="16" Margin="-1" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
199 | 199 | </Border>
|
200 | 200 | <Rectangle x:Name="recPreviewBg2xc" Fill="White" HorizontalAlignment="Left" Height="32" Margin="375,150,0,0" VerticalAlignment="Top" Width="32"/>
|
201 | 201 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="32" Margin="375,150,0,0" VerticalAlignment="Top" Width="32">
|
202 |
| - <Image x:Name="imgPreview2xc" HorizontalAlignment="Left" Height="32" Margin="-1" VerticalAlignment="Top" Width="32" Stretch="Fill"/> |
| 202 | + <Image x:Name="imgPreview2xc" HorizontalAlignment="Left" Height="32" Margin="-1" VerticalAlignment="Top" Width="32" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
203 | 203 | </Border>
|
204 | 204 | <Rectangle x:Name="recPreviewBg1xc" Fill="White" HorizontalAlignment="Left" Height="16" Margin="425,150,0,0" VerticalAlignment="Top" Width="16"/>
|
205 | 205 | <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="16" Margin="425,150,0,0" VerticalAlignment="Top" Width="16">
|
206 |
| - <Image x:Name="imgPreview1xc" HorizontalAlignment="Left" Height="16" Margin="-1" VerticalAlignment="Top" Width="16" Stretch="Fill"/> |
| 206 | + <Image x:Name="imgPreview1xc" HorizontalAlignment="Left" Height="16" Margin="-1" VerticalAlignment="Top" Width="16" Stretch="Fill" RenderOptions.BitmapScalingMode="NearestNeighbor"/> |
207 | 207 | </Border>
|
208 | 208 | <Button x:Name="btnScrollUp" Click="OnScrollButtonUpClicked" Content="/\" HorizontalAlignment="Left" Margin="388,252,0,0" VerticalAlignment="Top" Width="24"/>
|
209 | 209 | <Button x:Name="btnScrollDown" Click="OnScrollButtonDownClicked" Content="\/" HorizontalAlignment="Left" Margin="388,274,0,0" VerticalAlignment="Top" Width="24"/>
|
|
0 commit comments