如何参数传递到Silverlight的,以便它是与QUOT;场景&QUOT后面; [英] How to pass parameter into silverlight so that it is "behind the scenes"

查看:77
本文介绍了如何参数传递到Silverlight的,以便它是与QUOT;场景&QUOT后面;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我全新的学习的Silverlight / XAML / C#。

I'm brand new to learning Silverlight/XAML/C#.

我使用的是ASP.NET功能传递一个字符串参数到Silverlight应用程序。目前我使用下面的code简单地确认它可以工作在Silverlight应用程序被加载:

I'm using an ASP.NET function to pass a string parameter to a Silverlight App. Currently I'm using the following code to simply verify that it works when the Silverlight App is loaded:

<Grid x:Name="LayoutRoot">
    <StackPanel>
        <TextBlock x:Name="txtIP" />
    </StackPanel>
</Grid>

我如何设置这并不一定在XAML显示幕后的元素?我想过干脆隐藏文本块,但我想有一个更好的办法。

How do I set up an element that's "behind the scenes" that doesn't necessarily display in the XAML? I thought about simply hiding the TextBlock, but I imagine there's a better way.

推荐答案

您可以传递参数使用在插件中initParams在选项Silverlight应用程序。加载一些ASPNET code和您可以动态设置它在加载时。

You can pass parameters to a Silverlight application using the initParams option in the plugin. Load that with some ASPNET code and you can dynamically set it at load time.

这篇关于如何参数传递到Silverlight的,以便它是与QUOT;场景&QUOT后面;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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