This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.

Join us in building a kind, collaborative learning community via our updated
Code of Conduct.

Why do you need this ToggleSwitsch inside the Button content?
– punker76Nov 2 '16 at 15:04

The design of the project I'm working on requires this. basically, there is a navigation sidebar, and the user has the option to turn on/off some services from any page he is in now.
– AbdoNov 2 '16 at 15:21

So you want to enable/disable the button click action with the toggle button? Or what do you do at the click event of the button and the toggle switch?
– punker76Nov 2 '16 at 15:34

There is a ContentControl, each button in the sidebar changes the content of the ContentControl with a specific UserControl. The ToggleSwitch is used to turn on/off some background service. What I need is allowing to click the ToggleSwitsch to control the background service without executing the (parent) Button click event. When I click the ToggleSwitch now, the Button click event fires since its a parent.
– AbdoNov 2 '16 at 15:49