I've been experimenting with the tiles control and have worked out exactly how I want my application to work.
There will be a few tiles and a document area like in visual studio.
I've defined the individual tiles in the xaml for the wpf window.
The only thing I don't understand is how to design a document form (independantly of the window) so I can use it repeatedly in the document area, by adding programatically, whenever a new customer record is opened by the user. (each document in the document area would be for a different customer, consisting of a tabcontrol with some text boxes and a datagrid).
Please can you explain this for me?
- Anthony
The xamDockManager has an AddDocument method that you can use when the Content is a DocumentContentHost. It will create a ContentPane with the specified Header and Content and add that to the TabGroupPane that contains the active document just as VS opens a document in the tab group containing the active document when you open a file. That method returns the ContentPane so you can do other initialization or activate it (using the Activate method).
You are indeed right not to understand me, I was talking rubbish!
I was talking rubbish because I meant the XamDockManager.
You've got dockable windows and the document area.
in the document area, just like visual studio 2008 you can have various types of documents open (eg in visual studio a source file, a window designer, a project properties window).
So what I'd like to do is somewhere in another file define the different types of document windows lets say my app has customer records and I've defined a document "customer"
I'd do something like this is completely made up code...
//Create an instance of my pre-designed "document" and load the customer into itCustomer myCustomerPage = new Customer(CustomerID)//Add the customer dcument to the documenthostmyXamDockPanel.DocumentHostPanel.Add(myCustomerPage)
Problem being that I don't know how to define a reusable document (I may want to have 10 different customers open in tabs in the document host), and that I don't know how to add it programatically to the dockpanel. (this is what I need explaining)
Hi Anthony,
I'm not 100% sure what you are asking here and how it relates to tiles control. It sounds like you could create a UserControl for documents in your 'document area'. That area would be outside the XamTilesControl if I understand your scenario.
If you wanted to leverage the features of the XamTilesControl however you could allow the user to maximize more than one tile by setting its MaximizedTileLimit property. Then you could specify a different data template for maximized tiles thru its ItemTemplateMaxmized property. This template could contain the tabcontrol and datagrid you mentioned. Then everything would be handled within the tiles control.