Hi Everyone,

I wanted to share a neat custom button I created in XAML for a WPF program. I wanted a toggle button that looked very similar to the iOS toggle button but either couldn’t find any online or didn’t want to steal someone else's code.

I wanted this to be a learning experience rather than another step into tutorial hell.

I also wanted a button that could be resized to any dimension and still look correct 🤞

This is the XAML I used to create the button:

iOS Style Toggle Button Code

Finally, here is a GIF of the button 🥳

Thank you for reading! Any questions, let me know 👍

--

--

IT. Delinquent

IT. Delinquent

A humble tech enthusiast and dad writing articles about the tasks I perform whilst working. Hopefully, you find something useful… I never do.