TypeConverter for "Thickness" does not support conversion from string

I am using the following code for xaml silverlight file.

<UserControl x:Class="DBServer.Selenium.Silvernium.ReferenceApplication.SilverlightFixture"    
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
             mc:Ignorable="d" 
             d:DesignWidth="640" 
             d:DesignHeight="480">
    <navigation:Frame x:Name="frameContent" Source="/MainPage.xaml" Margin="0,0,0,0"/> // "Margin" on this line throws error
</UserControl>

But when I try to build it, it causes the following error

The TypeConverter for "Thickness" does not support converting from a string
+3
source share
1 answer

I tried your code and it did not give any errors, are you sure of the xaml file, and not the xaml.cs file, which runs the code that gives this error, because Thickness is how you define the margin in the current code as this

mainborder.Margin = new Thickness(20, 20, 20, 20);
0
source

All Articles