Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2325
how to load WPF pages
posted

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? 

Parents
No Data
Reply
  • 34810
    Verified Answer
    Offline posted

    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,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    DockManagerFrameTest.zip
Children