I created a Canvas with fixed Width and Height (256x256). Next to it I put an Image control displaying a 256x256 texture without stretching. How is it possible that actual sizes of both controls on the screen differ so much?
Here - is the screenshot illustrating size mismatch.
And here - the TestLines256.png in case someone liked to check it (and maybe point out that I'm stupid and this texture is 180x180 and not 256x256 as I claimed).
XAML with creation of the controls:
<Window x:Class="OversizedQuad.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" SizeToContent="WidthAndHeight">
<StackPanel Orientation="Horizontal">
<Canvas Width="256" Height="256" Background="Red" />
<Image Stretch="None" Source="TestLines256.png" />
</StackPanel>