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!
I am glad that my sample project worked for you.
Regarding the styling of the XamDockManager, that control has a Theme property which, by default comes with a few themes, such as Office2013, Leaf, Aero, Metro, MetroDark, etc. Some of these themes are more of a custom theme, and they can be used with the Infragistics.Windows.Themes.ThemeManager and its "SetTheme" method. These themes are the ones such as "Water", "Wind", "Lipstick", "Leaf", and "Fall." You can see that each of these has an assembly named after it that looks along the lines of InfragisticsWPF4.Themes.ThemeName.
If you access the above themes (for example, I will use "Water"), you can see that there are options in Intellisense to theme certain controls. For instance if you type "Infragistics.Windows.Themes.Water." - you will see a list that reads "DockManager", "DataPresenter", "Primitives", etc. These are the specific controls that this theme supports, and you can apply it by using the Infragistics.Windows.Themes.ThemeManager.SetTheme method. For more on this, I would recommend that you take a look at the following forum thread where this was discussed in further detail: http://ko.infragistics.com/community/forums/t/41014.aspx.