WebBrowser.Source プロパティ

定義

Uriでホストされている現在のドキュメントのWebBrowserを取得または設定します。

public:
 property Uri ^ Source { Uri ^ get(); void set(Uri ^ value); };
public Uri Source { [System.Security.SecurityCritical] get; set; }
public Uri Source { get; set; }
[<get: System.Security.SecurityCritical>]
member this.Source : Uri with get, set
member this.Source : Uri with get, set
Public Property Source As Uri

プロパティ値

Uri

現在の HTML ドキュメントの Uri

属性

例外

WebBrowser インスタンスは無効です。

基になるネイティブ WebBrowser への参照を取得できませんでした。

部分信頼で実行されているアプリケーションから、配信元のサイトにない Uri へのナビゲーション。

次の例は、マークアップのみを使用して HTML ドキュメントに移動するように WebBrowser を構成する方法を示しています。

<!-- Web Browser Control that hosts a web page. -->
<WebBrowser x:Name="webBrowser" Source="http://msdn.com"
  Width="600" Height="600"  />

注釈

ソース プロパティを設定すると、 WebBrowserUriで指定されたドキュメントに移動します。 Urinullされている場合は、空白のドキュメントが表示されます ("about:blank")。

適用対象