語言

XamlRoot 類別

定義

代表一棵 XAML 內容樹狀結構,以及它所托管的上下文資訊。

public ref class XamlRoot sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class XamlRoot final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class XamlRoot
Public NotInheritable Class XamlRoot
繼承
Object Platform::Object IInspectable XamlRoot
屬性

屬性

名稱 Description
Content

取得 XAML 元素樹的根元素。

ContentIsland

會讓 ContentIsland 與這個 XamlRoot 綁定。

ContentIslandEnvironment

取得內容島的一般環境資訊。

CoordinateConverter

取得一個 ContentCoordinateConverter ,用於在本地座標空間與系統螢幕座標之間轉換。

IsHostVisible

會獲得一個值,表示 XamlRoot 是否可見。

RasterizationScale

會得到一個代表每個視圖像素的原始(物理)像素數值。

Size

取得內容區的寬度和高度。

事件

名稱 Description
Changed

當 XamlRoot 的屬性改變時會發生。

適用於