BindableObject.SetValue Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
SetValue(BindableProperty, Object) |
Sets the value of the specified bindable property. |
SetValue(BindablePropertyKey, Object) |
Sets the value of the specified bindable property. |
- Source:
- BindableObject.cs
- Source:
- BindableObject.cs
Sets the value of the specified bindable property.
public:
void SetValue(Microsoft::Maui::Controls::BindableProperty ^ property, System::Object ^ value);
public void SetValue (Microsoft.Maui.Controls.BindableProperty property, object value);
member this.SetValue : Microsoft.Maui.Controls.BindableProperty * obj -> unit
Public Sub SetValue (property As BindableProperty, value As Object)
Parameters
- property
- BindableProperty
The bindable property on which to assign a value.
- value
- Object
The value to set.
Exceptions
Thrown when property
is null
.
Remarks
If property
is read-only, nothing will happen.
Applies to
.NET MAUI 9 and .NET MAUI 8
Product | Versions |
---|---|
.NET MAUI | 8, 9 |
- Source:
- BindableObject.cs
- Source:
- BindableObject.cs
Sets the value of the specified bindable property.
public:
void SetValue(Microsoft::Maui::Controls::BindablePropertyKey ^ propertyKey, System::Object ^ value);
public void SetValue (Microsoft.Maui.Controls.BindablePropertyKey propertyKey, object value);
member this.SetValue : Microsoft.Maui.Controls.BindablePropertyKey * obj -> unit
Public Sub SetValue (propertyKey As BindablePropertyKey, value As Object)
Parameters
- propertyKey
- BindablePropertyKey
The key that identifies the bindable property to assign the value to.
- value
- Object
The value to set.
Exceptions
Thrown when propertyKey
is null
.
Thrown when the bindable property identified by propertyKey
is read-only.
Applies to
.NET MAUI 9 and .NET MAUI 8
Product | Versions |
---|---|
.NET MAUI | 8, 9 |
.NET MAUI feedback
.NET MAUI is an open source project. Select a link to provide feedback: