I have a DocumentContent (AvalonDock) which contains a textEditor. I want to add a toolbar to it at runtime. To do this I need to add a GridDefinition so that the first row has a fixed height (for the toolbar) and the rest of the document content should be filled by the texteditor.
I created a new Grid and added a row definition to it and added the child to it but I don't know how to attach this to the DocumentContent. I am not even sure if it is the right way to add the toolbar. Any suggestions ?
Grid grid = new Grid();
RowDefinition rowDefinition1 = new RowDefinition();
rowDefinition1.Height = new GridLength(32);
grid.RowDefinitions.Insert(0, rowDefinition1);
grid.Children.Insert(0, new IsaDocToolbar());
PS: I forgot to mention that I use AvalonDock 1.3