WebViewBrush.SourceName 屬性

定義

取得或設定提供 HTML 內容的來源 WebView 控制項名稱。

public:
 property Platform::String ^ SourceName { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring SourceName();

void SourceName(winrt::hstring value);
public string SourceName { get; set; }
var string = webViewBrush.sourceName;
webViewBrush.sourceName = string;
Public Property SourceName As String
<WebViewBrush SourceName="nameOfWebView"/>

屬性值

String

Platform::String

winrt::hstring

提供 HTML 內容之WebViewNamex:Name 屬性

備註

建立 WebViewBrushWebView 控制項來源的關聯有兩個替代方案:

  • 藉由設定 SourceName 屬性,依識別碼名稱參考來源 WebView
  • 藉由呼叫SetSource方法並傳遞WebView物件,以參考來源WebView

適用於