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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:30:26+00:00 2026-05-23T01:30:26+00:00

I am using implicit DataTemplates of Silverlight 5 to wire ViewModel and View. In

  • 0

I am using implicit DataTemplates of Silverlight 5 to wire ViewModel and View.

In my MainView there is a TabControl (from Telerik) which is bound to an ObservableCollection of the MainViewModel. And for all possible ViewModel-types within that Collection there is a DataTemplate which defines the corresponding View (=Tab).

Very clean and totally decoupled.

But now I need to write code that’s really only related to the Views: I want to manually merge a Ribbon of the selected Tab to the Ribbon of the MainView.
The ViewModels don’t have any knowledge of their corresponding View and do not know anything about a UI Element like a Ribbon (which is a good thing). So this is one of the very rare occasions where I need to write code-behind.

I tried the SelectionChanged Event of the TabControl, but all properties (SelectedItem, SelectedValue, …) point to the ViewModel and not to the View.

How do I get the View – which was wired by Silverlight 5 using a DataTemplate??

Thanks for any ideas!

  • 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-23T01:30:27+00:00Added an answer on May 23, 2026 at 1:30 am

    Short answer, you don’t. Use an event aggregator or a messenger class with strongly typed constraints.

    One good implementation with MVVM-Light is the Messenger class, see this article for info.

    http://blog.galasoft.ch/archive/2009/09/27/mvvm-light-toolkit-messenger-v2-beta.aspx

    Anyhow you should be able to have the ribbon message the tab via messengers if i’m understanding you right.

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

Sidebar

Related Questions

I am using Implicit Data Templates which are applied to the items of an
Is there anything wrong with using an implicit operator like the following: //linqpad c#
(Using django as an example; the ForeignKey is implicit in the example) >>> from
Is there an implicit method to convert scala.collection.mutable.StringBuilder to java.lang.StringBuilder? I am using a
I am working on using Matplotlib to produce plots of implicit equations (eg. y^x=x^y).
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
I'm having trouble getting my dll to work when using explicit linking. Using implicit
I often find myself wanting to just print (using the implicit toString() of each
I have recently begun using Scala. I've written a DSL in it which can

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.