首页 新闻 会员 周边

Silverlight 未能从文本“100px”创建“System.Double”。

0
悬赏园豆:5 [已解决问题] 解决于 2013-09-22 23:52

刚开始学Silverlight 

下面贴出代码:

MainPage.xaml

<UserControl x:Class="DiggSample1.MainPage"
    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"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <!--<Button x:Name="MyButton"  Content="Click Me!" Click="MyButton_Click" />-->
        <Button x:Name="Mybutton1" Content="Click Me!" Width="100px" Height="80px"/>
    </Grid>
</UserControl>

F5运行后 报错 :未能从文本“100px”创建“System.Double”。

不知道是什么原因 ,求各位大侠帮忙解决。。。。。

yuloe2012的主页 yuloe2012 | 初学一级 | 园豆:171
提问于:2013-09-22 23:40
< >
分享
最佳答案
0

改为100就可以了。

不用带px~

收获园豆:5
幻天芒 | 高人七级 |园豆:37175 | 2013-09-22 23:45
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册