SilverLight应用程序_使用标签和文本框 [英] SilverLight Application_Using Label and Textbox

查看:64
本文介绍了SilverLight应用程序_使用标签和文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在silverlight4中做了一个简单的应用程序,其中包括一个标签和一个文本框,按钮.当我按下按钮时,文本框中的文本应显示在标签中.

我已经为浏览器安装了silverlight sdk和silverlight插件,但是当我每次运行aplication时,它甚至要求我已经安装了Silverlight开发人员运行时.我可以知道为什么吗?我缺少任何要安装的东西吗?

这是应用程序代码...

Hi all,

i have made a simple application in silverlight4 which includes one label and a textbox , button. when i press a button the text from the textbox should be displayed in label.

i have installed silverlight sdk and silverlight plugins for browser but when i run the aaplication each time it ask for the silverlight developer runtime even i have installed it already. May i know why is it so? am i missing anything to install?

here is the app code...

<UserControl x:Class="First_App.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" ShowGridLines="True">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>

        </Grid.RowDefinitions>
        <TextBlock Name="txtname" Height="25" Width="75" HorizontalAlignment="Center"></TextBlock>
        <TextBox Name="txtbxname" Height="35" Width="90" HorizontalAlignment="Center" Margin="15" Grid.Row="2"></TextBox>
        <Button Name="mybtn" Content="ClickMe" Grid.Row="3" Width="55" Height="35" Click="mybtn_Click"></Button>
    </Grid>
</UserControl>



并在.cs文件中:



and in .cs file:

public partial class MainPage : UserControl
   {
       public MainPage()
       {
           InitializeComponent();
       }

       private void mybtn_Click(object sender, RoutedEventArgs e)
       {
           txtname.Text = txtbxname.Text;

       }
   }




有人可以帮我吗?

在此先感谢.....




Can anybody help me please???

thanks in advance.....

推荐答案



您可以检查您的Silverlight运行时是否约为89mb大.

http://www.microsoft.com/downloads/details.aspx?FamilyID = bf5ab940-c011-4bd1-ad98-da671e491009& displaylang = zh_CN [
Hi,

You may check if your Silverlight runtime is about 89mb large.

http://www.microsoft.com/downloads/details.aspx?FamilyID=bf5ab940-c011-4bd1-ad98-da671e491009&amp;displaylang=en[^]


尝试以下链接:

http://forums.silverlight.net/t/202323.aspx/1 [ ^ ]

Try these links:

http://blogs.msdn.com/b/alikl/archive/2010/07/14/resolve-unable-to-start-debugging-the-silverlight-developer-runtime-not-installed-please-install-a-matching-version-visual-studio-2010-silverlight-4.aspx[^]

http://forums.silverlight.net/t/202323.aspx/1[^]

http://www.coderaz.com/2010/08/17/unable-to-start-debugging-the-silverlight-developer-runtime-is-not-installed-please-install-a-matching-version/[^]

hope it helps :)


这篇关于SilverLight应用程序_使用标签和文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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