Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6574821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:18:36+00:00 2026-05-25T15:18:36+00:00

I use AvalonDock to have a vs-like docking style, and I use prism to

  • 0

I use AvalonDock to have a vs-like docking style, and I use prism to inject views in my application.
Basically the user will have a panel on the side with one button per view loadable, and each time he presses one, I want to create a new tab on my AvalonDock’s DocumentPane, and inject the right view in it.

Now I was under the impression that prism is good for this kind of scenario, but I can’f figure it out.

Also, I stumbled accross DocumentPane and DockablePane region adapters by Markus Raufer, have added it to my project and registered the mappings in the bootstrapper.
This allows me to compile the solution (so I’m guessing I’m getting close).

So far, I do this:

In my Shell I have a place with:

<avadock:DocumentPane avadock:ResizingPanel.ResizeWidth="500" Background="Transparent"
                      prism:RegionManager.RegionName="{x:Static inf:RegionNames.MainTabControlRegion}">
</avadock:DocumentPane>

In my code-behind, after Bootstrapping etc, I have a place that does:

m_RegionManager.Regions[RegionNames.MainTabControlRegion].Add(oneOfMyUserControls);

Executing this line doesn’t show anything more to the user, but if i execute it twice, it will make an error saying a view is already registered (so it did add something!).

Furthermore, when i put a regular ContentControl, mark it with prism:RegionManager.RegionName="{x:Static inf:RegionNames.MainTabControlRegion} then add a UserControl in it the very same way I add it to AvalonDock’s DocumentPane, it works. freaky

What am I doing wrong?
Thanks,

bab.

EDIT:
If define the MainTabControlRegion like this, the first view actually gets added, now id i add another one (different UserControl) it doesn’t show it, but WPF Inspector says it’s there.
From my point of view, it is indeed adding UserControls to a region, but it doesn’t know how to create a new tab for each UserControl I add to the DocumentPane.
Since I’m not specifying anything about that, I’m probably missing a piece of code?

<avadock:DocumentPane avadock:ResizingPanel.ResizeWidth="500" Background="Transparent">
    <avadock:DocumentContent Title="" prism:RegionManager.RegionName="{x:Static inf:RegionNames.MainTabControlRegion}">

    </avadock:DocumentContent>
</avadock:DocumentPane>

I want it to create a new tab each time i add a usercontrol and insert it in there.

EDIT 2: Solution –> Here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:18:36+00:00Added an answer on May 25, 2026 at 3:18 pm

    This problem can be caused for many reasons.

    Or the RegionAdapter is not well suited for the user controls you are trying to add, therefore I would recommend you to have a look at RegionAdapter implementation so you can have a good understanding of how it adapts your view in the region and customize it to fit your needs.

    Or the user control you are adding has a particular behavior and is bugging the RegionAdapter when it tries to add your view to the DocumentPane items. Therefore you can customize the RegionAdapter or fix the user control behavior.

    Or it is simply a data binding problem. The fact that nothing shows up on first execution is kind of strange. Try to inspect your DocumentPane property Binding with WPF Inspector. It saved my life more than once when dealing with custom RegionAdapters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Use scenario is pretty simple: I have a desktop only application that could be
Use Case Show a photo uploaded by the user in a square box with
Has anybody tried PRISM and AvalonDock (latest release with DocumentSource property) together? I already
use strict; my $var = NULL; will raise an error of Bareword NULL not
Use Case: End-User searches for something and an ArrayCollection is returned with Result objects.
Use Elixir and have two entities -- Voter and Candidate -- with many to
use javascript or other method ? have any recommendation?
Use case: You have 2-3 files displayed in your MacVim window(s). You press ctrl+Q
I'm using AvalonDock in a WPF application, and need to persist the layout of
Use case is to have a server connect to thousands of users email accounts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.