WPF control with fixed place buttons
By this I mean you want a scalable WPF control which has controls which stay in the same place the background. For instance buttons on the same place on an image. This is important with different monitor resolutions etc.
Use a Canvas inside a Viewbox! For example a button on an image.
<Viewbox Stretch="Uniform">
<Grid>
<Image Source="Foot.png"/>
<Canvas Name="KeyPointsFoot">
<Button Background="Transparent" Canvas.Left="168" Canvas.Top="418" Width="80" Height="80">
<Button.Content>
<Image Source="Button.png"/>
</Button.Content>
</Button>
</Canvas>
</Grid>
</Viewbox>
There is an example project here
Written by David Corne
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#