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 9016635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:02:51+00:00 2026-06-16T04:02:51+00:00

Silverlight5 From a button click on Tab1Data I want to pass a parameter to

  • 0

Silverlight5

From a button click on Tab1Data I want to pass a parameter to Tab2_1Data

Am currently doing it with a global public property(!) on the MainPage which each UserControl can reference using this helper

Is there a better way using a non MVVM approach to pass parameters?

 <controls:TabControl Name="TabOverallMain">
                        <!-- Tab 1 -->
                        <controls:TabItem Header="Home Screen" IsSelected="True">
                            <UserControls:Tab1Data />
                        </controls:TabItem>

                        <!-- Tab 2 -->
                        <controls:TabItem Header="Admin">
                            <Grid>
                                <controls:TabControl>
                                    <!-- Tab 2_1 -->
                                    <controls:TabItem Header="Users">
                                        <UserControls:Tab2_1Data />
                                    </controls:TabItem>

EDIT:
Using this I implemented a DependencyProperty in my Tab2_1Data control:

 public static readonly DependencyProperty CaptionProperty = DependencyProperty.Register("Caption", typeof(string), typeof(WidgetControl),null);

        public string Caption
        {
            get { return (string)GetValue(CaptionProperty); }
            set { SetValue(CaptionProperty, value); }
        }

which I then referenced from my Tab1Data user control by:

wid.Caption = "hello world";

This is fine for me now.. although databinding between the 2 looks v.good too!

  • 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-06-16T04:02:52+00:00Added an answer on June 16, 2026 at 4:02 am

    Since you dont want to use MVVM, try use data binding.. You will need to expose the parameter as a dependency propety int the first control

    Here’s some pseudo code. Create a dependency property on Tab1Data called MyParam

        public static readonly DependencyProperty MyParamProperty = DependencyProperty.Register("MyParam",
                    int, typeof(Tab2_1Data), null);
    
    public int MyParam
    {
        get { return (int)GetValue(MyParamProperty); }
        set
        {
            SetValue(MyParamProperty, value);
        }
    }
    
    <controls:TabItem Header="Home Screen" IsSelected="True">
        <UserControls:Tab1Data x:Name="OneCtrl"  />
    </controls:TabItem>
    

    Then create a dependency property (similar to above) on the second control called something like ParamFromControlOne… then bind them

    <UserControls:Tab2_1Data ParamFromControlOne="{Binding MyParam, ElementName=OneCtrl}" />
    

    That’s not tested and thrown together using Notepad, but that is the path I would go down

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

Sidebar

Related Questions

I'm currently trying to pass Silverlight a string value from the parent JavaScript. The
I need to open window pop-up from Silverlight Out-of-Browser application. I've added parameter <param
In Silverlight5, how to reference a user control resource - emoticon from a button_click
I have Page1.xaml and Page2.xaml in Silverlight project. I want to pass query string
I'm currently porting an application from iPhone to Windows Phone. The behaviour of buttons
I am new to silverlight. I want to go from login page to another
When will Silverlight support [from Microsoft] be officially end-of-lifed?
I moved my app from silverlight 3 VS2010 to a system having Silverlight 4
I am learning MVVM for C# Silverlight development from http://msdn.microsoft.com/en-us/magazine/dd419663.aspx and I am confused
I have a SL application with many DataGrids (from Silverlight Toolkit), each on its

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.