设置属性“...保证金”抛出一个例外? [英] Set property '...Margin' threw an exception?

查看:143
本文介绍了设置属性“...保证金”抛出一个例外?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



异常:



Set属性System.Windows.FrameworkElement.Margin'抛出异常'行号'6'和行位置'31'。



InnerException:



'12,10,599自动不是属性保证金的有效值。 code>



我不知道如何发生,因为我没有触摸XAML。我只使用设计师。



这是我的XAML(属性中没有任何Auto):



<$ pre $ b xmlns:x =http://schemas.microsoft.com/winfx/2006/xaml
Title =MainWindowHeight =774Width =671Closing =Window_Closing>
< Grid>
< Label Content =URL:Height =28Margin =12,10,599,0Name =lURLVerticalAlignment =TopFontWeight =Bold/>
< Button Content =StartHeight =23Margin =0,44,93,0Name =btnStartVerticalAlignment =TopHorizo​​ntalAlignment =RightWidth =75Click = btnStart_Click/>
< ProgressBar Height =10Horizo​​ntalAlignment =LeftMargin =12,0,0,46Name =pbStatusVerticalAlignment =BottomWidth =625/>
< TextBox Height =23Margin =56,10,107,0Name =tbURLVerticalAlignment =Top/>
< / Grid>
< / Window>

感谢任何建议!

解决方案

我不知道真的发生了什么,但只有格式c:\帮助我解决了这个问题:(
没有什么,包括恢复VS和所有的依赖,没有帮助...那很伤心:(


I need some advice on how to fix this bug:

Exception:

"'Set property 'System.Windows.FrameworkElement.Margin' threw an exception.' Line number '6' and line position '31'."

InnerException:

"'12,10,599,Auto' is not a valid value for property 'Margin'."

I dont know how it could happen, because I didn't touch XAML yet. I used only designer.

Here is my XAML (There is no any "Auto" in properties ):

<Window x:Class="LinksGraph.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="774" Width="671" Closing="Window_Closing">
        <Grid>
            <Label Content="URL:" Height="28" Margin="12,10,599,0" Name="lURL" VerticalAlignment="Top" FontWeight="Bold" />
            <Button Content="Start" Height="23" Margin="0,44,93,0" Name="btnStart" VerticalAlignment="Top" HorizontalAlignment="Right" Width="75" Click="btnStart_Click" />
            <ProgressBar Height="10" HorizontalAlignment="Left" Margin="12,0,0,46" Name="pbStatus" VerticalAlignment="Bottom" Width="625" />
            <TextBox Height="23" Margin="56,10,107,0" Name="tbURL" VerticalAlignment="Top" />
        </Grid>
    </Window>

Thanks for any advice!

解决方案

I don't know really what happened, but only "format c:\" helped me solve this problem :( Nothing, including reinstal VS and all dependencies, didn't help... And that's sad :(

这篇关于设置属性“...保证金”抛出一个例外?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆