title: DataBinding a WPF PropertyGrid in a "Visual Studio"-fashion
body: <p>I'm creating a simply editor for a game using Fluent Ribbon and Avalon Dock, since the editor is highly specific I cannot share a direct screenshot, hence I'm using Visual Studio as an example:</p>
  
  <p><a href="https://i.stack.imgur.com/5mguF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5mguF.png" alt="Visual Studio layout"></a></p>
  
  <p>The idea is that every component that does so desire (be it something in a document or something from the Solution Explorer) can set an active object in the Properties for editing.</p>
  
  <p>Right now I gave my properties window a <code>public object ActiveObject</code> and applied a singleton pattern so other components can access this. But it just feels awfully hacky and was therefor wondering: What would be a better way to go about this in a nice MVVM way? Or is the approach fine? Should I instead databind the properties window to a property on some shared singleton class? I really have no idea how to go about this other than I did.</p>