I have a WPF control that is roughly layed out like this:
<ViewBox Stretch="Uniform" Name="viewboxName">
<ItemsControl>
<ItemsControl.ItemTemplate>
<DataTemplate>
<!-- a bunch of controls here that I want stretched in the viewbox -->
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ViewBox>
Then, in the AdornerLayer, I have (using a technique based on http://shevaspace.blogspot.com/2007/02/visual-level-programming-vs-logical.html) a button control defined as
<Button>
<Image Source="/AcchImageLoad;component/icons/metroStudio/ImageRotation.png" Stretch="None" />
</Button>
How can I get this button in the AdornerLayer to use the image's native resolution, instead of stretching with the ViewBox?