Last Updated: February 25, 2016
· davidcorne

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">
        <Image Source="Foot.png"/>
        <Canvas Name="KeyPointsFoot">
          <Button Background="Transparent" Canvas.Left="168" Canvas.Top="418" Width="80" Height="80">
              <Image Source="Button.png"/>

There is an example project here

Say Thanks
Awesome Job

C7a484d2 f24c 11e7 9f8c 3b9e5e589026
Junior Front-end Web Developer
Idaho Falls, Idaho or Remote
Full Time