共用方式為


XamlBindingHelper.SetPropertyFromString 方法

定義

public:
 static void SetPropertyFromString(Platform::Object ^ dependencyObject, DependencyProperty ^ propertyToSet, Platform::String ^ value);
 static void SetPropertyFromString(IInspectable const& dependencyObject, DependencyProperty const& propertyToSet, winrt::hstring const& value);
public static void SetPropertyFromString(object dependencyObject, DependencyProperty propertyToSet, string value);
function setPropertyFromString(dependencyObject, propertyToSet, value)
Public Shared Sub SetPropertyFromString (dependencyObject As Object, propertyToSet As DependencyProperty, value As String)

參數

dependencyObject
Object

Platform::Object

IInspectable

要設定之屬性所屬的物件。

propertyToSet
DependencyProperty

要寫入值的屬性。

value
String

Platform::String

winrt::hstring

要設定的值。

備註

這個方法可用於 XAML 編譯器所產生的程式碼中。

適用於