I've been reading some into it, but I am time pressed, so I would require a simple solution now and I promise to read up on it later. I come from a winforms c# background, and have lately been working with WPF. As the user interface I'm implementing is not that input intensive, I've gotten by with using INotifyPropertyChanged so far. Until I ran into this:
I have a 3D interface from a third party library (MogreInWpf). Upon clicking an object in the 3D interface, I need to display some of the object's properties (position, size etc). Here's how my code-behind looks. I have a class, let's call it objectOfInterest, that saves all these properties, the 3D data and includes some methods that manipulate the object. In one of these methods, I generate a Grid containing textboxes to simulate name-value pairs of properties. Like "X position:" "134". As these properties are only user-changed, I've managed to bind the textbox on text changed event to respond to most changes, IE when the size is changed from 134 to 1345.
Once this grid is generated, it is set to display in the main window using a ContentPresenter and setting its content to the objectOfInterest.grid. Works like a charm. Now, I have to implement a property that changes how the properties grid look like depending on a combobox included in this grid.
For example, if the object is a cube, I want width/height/length to show, while I only want a radius property to show if it's a sphere. I'm kind of stuck here, as regenerating the grid upon combobox selectedValueChanged doesn't notify the view, and the generating occurs in the objectOfInterest class instead of the main window class, meaning I can't rebind the grid once it's regenerated (I cannot call contentPresenter.Content = objectOfInterest.grid again, as the main window has no idea the instances grid has changed). So, without completely understanding the MVVM methods and rewriting most of the application to fit the model, how can this be accomplished?