IXamlDirect.GetStringProperty(Object, XamlPropertyIndex) 方法

定义

获取特定 IXamlDirect字符串属性的值。

本文档适用于 Windows 应用 SDKWinUI 的 WinUI 2 for UWP (,请参阅Windows 应用 SDK命名空间) 。

public:
 Platform::String ^ GetStringProperty(Platform::Object ^ xamlDirectObject, XamlPropertyIndex propertyIndex);
winrt::hstring GetStringProperty(IInspectable const& xamlDirectObject, XamlPropertyIndex const& propertyIndex);
public string GetStringProperty(object xamlDirectObject, XamlPropertyIndex propertyIndex);
Public Function GetStringProperty (xamlDirectObject As Object, propertyIndex As XamlPropertyIndex) As String

参数

xamlDirectObject
Object

Platform::Object

IInspectable

对特定 IXamlDirect 的引用。

propertyIndex
XamlPropertyIndex

对要从 XamlPropertyIndex 枚举中受支持属性列表中获取值的字符串属性的引用。

返回

String

Platform::String

winrt::hstring

指定属性的字符串值。

适用于

另请参阅