Hello, colleagues, maybe someone has the example of radiobutton in mvvm or an article, where to read about it? I have to connect the radiobutton to one of parameters in the linked model. If it exists, this parameter will be used, if not - the number from the text box.
I don't think MVVM is really an appropriate pattern for this.
Your controls don't have direct and continuous access to the Revit model as you would an SQL database etc. At best you can bind to a property that makes a request of Revit and gets a response. It is better to make a shallow copy of the information you are interested in (the data context object) have that bound to your controls and push all of the changes for the object onto Revit rather than in bits and pieces via individual controls.