Silverlight-获取域信息 [英] Silverlight - Getting the Domain Information

查看:71
本文介绍了Silverlight-获取域信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Silverlight应用程序如何询问浏览器从哪个域提供服务?

How does a Silverlight application ask the browser what domain its being served up from?

更新: 确保如果您的班级还没有这个 using 语句,请将其添加到班级的顶部.这将帮助您获得一些在线上看到的示例.这让我有些困惑.

UPDATE: Make sure if your class doesn't already have this using statement add it at the top your class. This will help you on some of the examples you'll see online. It confused me for a bit.

  using System.Windows.Browser;

推荐答案

此处 .

How about HtmlDocument.DocumentUri? That'd get you what you need. Page about browser interop here.

这篇关于Silverlight-获取域信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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