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

  • Home
  • SEARCH
  • 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 4057678
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:58:59+00:00 2026-05-20T14:58:59+00:00

I have built a Silverlight 4 application with Prism4. I created several content regions

  • 0

I have built a Silverlight 4 application with Prism4. I created several content regions in the shell.xaml and everything is working just fine. Now I want to do the following:
In the shell.xaml we have a header bar (in there a label as shown below) in the layout. In there we want to dynamically change the value of the header string depending on the displayed view in my main content region.
Any ideas of how I could accomplish this in an easy way?

<sdk:Label Content="Should be dynamic" FontWeight="SemiBold" Grid.ColumnSpan="3" Grid.Row="0" Grid.Column="2" BorderThickness="0" Background="{StaticResource DetailHeaderBackground}"  ></sdk:Label>

Thank you!

  • 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-20T14:59:00+00:00Added an answer on May 20, 2026 at 2:59 pm

    Since I use PRISM regions which are populated by exported views of a prism module I now did it like this:

    public static void AddLabelToHeaderRegion(string HeaderName, IRegionManager regionManager)
        {
            Label headerLabel = new Label
            {
                Content = HeaderName,
                FontWeight = System.Windows.FontWeights.SemiBold,
                Background = (System.Windows.Media.Brush)Application.Current.Resources["DetailHeaderBackground"],
                Padding = new Thickness(30, 3, 0, 3),
                BorderThickness = new Thickness(0),
                Margin = new Thickness(0)
    
            };
            Grid.SetColumn(headerLabel, 2);
            Grid.SetRow(headerLabel, 0);
            Grid.SetColumnSpan(headerLabel, 3);
            IRegion headerBarRegion = regionManager.Regions[RegionNames.HeaderBarRegion];
            if (headerBarRegion != null)
            {
                foreach (var item in headerBarRegion.ActiveViews)
                {
                    headerBarRegion.Remove(item);
                }
    
                headerBarRegion.Add(headerLabel);
            }
        }
    

    I can use this everywhere I import the current region manager via MEF.

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

Sidebar

Related Questions

I have a Silverlight application that is built from a set of Silverlight class
I have built a Silverlight\WCF\Sql application and as a part of the testing i
I have a combo box in Silverlight. It has a collection of values built
I have built an application in C# that I would like to be optimized
I have a requirement to deliver an app built in silverlight. Once the app
I have a Silverlight 4 application. I have a C# DateTime object that I'm
I have an application I'm building for silverlight. I'm also going to build a
I have built an MSI that I would like to deploy, and update frequently.
I have built a simple C#.Net app on a M/C with only .Net FX
I have built a web page which contains a Crystal Report built using the

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.