Skip to main content

Posts

Showing posts from January, 2015

Styling WPF buttons for Image Viewer

A quick post on styling the next & previous buttons for an Image Viewer written in WPF, I'm using the MahApps libraries to give the UI a modern look & feel - they are available as nuget packages, I'm using the core and resources packages. The initial version is very simple and hopefully the behaviour is obvious - the image flanked by a couple of buttons for moving to the next\previous image:   The XAML for this is very simple, using grid layout to achieve the alignment required, one thing to note is the Stretch characteristics of the Image control - the image ratio will be maintained as the app is resized. Also I'm using the default (implicit) styling for the button controls, these come from the MahApps libraries: The next iteration sees the ' cleaning up ' of the actual UI elements - the removal of border from around all the controls and the applying of the flat button style to the next & previous buttons. The other majors changes a