This project is read-only.

Exception adding ToggleSwitch to Grid in Blend4


If I try to create a ToggleSwitch in Blend4 using V1.1 by clicking on the control in the toolbar and then placing in in a container I'm getting an exception:
Argument Exception: 'Auto, 0, Auto, 0' is not a valid value for property Margin.
But pasting in a completely filled out ToggleSwitch from the sample application into my WPF app works fine.


sarat12 wrote Jan 9, 2013 at 12:47 PM

same issue

wrote Feb 14, 2013 at 8:28 PM

wrote Oct 29, 2013 at 5:48 PM

Arteny wrote Oct 29, 2013 at 5:49 PM

Same error if adding foloowing code to xaml:

John_Vance wrote Feb 25, 2014 at 8:17 AM

Same issue in VS 2013 Designer and Blend for VS 2013. Explicitly setting Margin on the ToggleSwitch does not help. Setting margin on every element does not help.

John_Vance wrote Feb 25, 2014 at 9:39 AM

Looks like you need to set a width on the control
<WPFSpark:ToggleSwitch Width="50"/>