I have wpf app that I need to be able to load wpf pages(eg: page1.xaml) depending upon user selecting a button tool on the xamribbon component.
What I have not been able to figure out is how to manipulate the dockmanager to do this. If I was just doing regulare wpf I would put in a frame and just load the page to the frame, but it doesn't look like the content pane (when used) can do this... Is there a way to do this?
Hello jerovsek,
Thank you for your post.
I have attached a sample project demonstrating how to create a XamRibbon with a button tool within it that will load Xaml pages. Essentially, the sample project shows how to create a XamRibbon and use the XamRibbon.Tabs collection to create a RibbonTabItem with a RibbonGroup within it. In the RibbonGroup exists a ToolHorizontalWrapPanel with the ButtonTool inside. The Click event of this ButtonTool is handled to create a SplitPane which will then hold a new instance of a ContentPane which has a Frame as its content. The Frame's Source property is set to a new relative Uri to link to a local XAML file and display it. Then, the SplitPane is added to a pre-existing XamDockManager's Panes collection.
I hope this helps you, although I am a little curious what you had meant in your initial post when you had said "If I was just doing regulare WPF...". If this sample project does not demonstrate the behavior you are looking to achieve, please let me know along with some more detail on the functionality you are currently implementing.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Thank you! That was exactly what I had in mind... I had gotten close but it was ugly. Your sample project was what I needed.
In playing around I added themes as references so I did not have to add a themes folder per an earlier suggestion. Is there a list of theme names that are to be used when assigning a value to a theme property? For example: XamDockManager.Theme = "Leaf(?)".... its not always obvious what the value is that should go there should I want leaf theme or Office2013 etc.... There doesn't seem to be intellisense to indicate this.
Thanks!