Reputation: 1167
I'm trying to get the Infragistics TabGroupPane to integrate with Caliburn.Micro as per the standard WPF TabControl.
I've tried adding a new convention in the bootstrapper (a modification of the standard WPF one) but have not had any success.
My TabGroupPane is defined as:
<igDock:TabGroupPane x:Name="Items"/>
When an item is added to the collection an exception is thrown "InvalidOperationException: A TabGroupPane can only contain 'ContentPane' and 'ContentPanePlaceholder' instances".
Also, if my TabGroupPane is inside a DockManager:
<igDock:XamDockManager>
<igDock:DocumentContentHost>
<igDock:SplitPane>
<igDock:TabGroupPane x:Name="Items" />
</igDock:SplitPane>
</igDock:DocumentContentHost>
</igDock:XamDockManager>
It doesn't appear to be found by Caliburn at all.
Has anyone else done this before?
Cheers!
Update
I have created my own dock manager class, a blog post explaining it or just the code on bitbucket. Hopefully this will be useful to someone!
Upvotes: 1
Views: 1903
Reputation: 1468
If you can't get the ContentPaneFactory suggested in Infragistics blog to fill the TabGroupPane through binding, you might consider these alternative approaches:
Upvotes: 1
Reputation: 2931
You can add bespoke controls to the ConventionManager class in Caliburn Micro, I would simply follow the example of the standard TabGroupPanel.
I would be wary of amending the actual class though, If I remember rightly (there is a recent post on the discussion forums at CaliburnMicro Codeplex page) You can also add bespoke conventions to the bootstrapper by overriding the Config method? I say this because if you amend the class itself, you will tie yourself to a particular version of Caliburn.
Its a really simple framework and easy to get to know intimately, I would recommend stepping through the code thats run when you bind a view to a viewmodel, there you will learn how these conventions are setup.
Upvotes: 1
Reputation:
Have you tried using a more explicit binding? Caliburn can only do automatic binding on certain elementtypes, and I guess Infragistics TabGroupPane is not one of them!
I guess you have to use something like this:
<igDock:TabGroupPane x:Name="Items" ItemSource={Binding <what to bind to>}/>
Note: This is just used as an example, not sure if ItemSource is the correct property!
Upvotes: 0