Is it possible to configure an observable property as readonly using community toolkit?

549 views Asked by At

i am using CommunityToolkit to configure the binding properties in the view model, but in some cases I would like to set the property only as readonly. So I am tryiung this:

[ObservableProperty]
public MyType _myProperty{ get; private set; }

But this is only possible with fields, not with properties.

Is it possible to set a readonly property with CommunityToolkit?

Thanks.

0

There are 0 answers