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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:48:57+00:00 2026-06-18T10:48:57+00:00

I have a window in WPF based upon a viewmodel. The viewmodel includes a

  • 0

I have a window in WPF based upon a viewmodel. The viewmodel includes a child viewmodel that can be switched at runtime. Each child viewmodel has its own commands. The parent view contains a ribbon with buttons that need to bind to the current child viewmodels commands. To switch views I use a content control in the parent view that uses data templates. Each possible child view is a user control that binds to the appropriate viewmodel (that bit works).

    <!-- Switchable area -->
    <ContentControl Content="{Binding ChildViewModel}">
        <ContentControl.Resources>
            <DataTemplate DataType="{x:Type vm:VersionsViewModel}">
                <embeddable:VersionsView />
            </DataTemplate>
            <DataTemplate DataType="{x:Type vm:LockListViewModel}">
                <embeddable:LockListView />
            </DataTemplate>
        </ContentControl.Resources>
    </ContentControl>

So for example, one of my child viewmodels has a refresh command. I want this to appear in the main view in a ribbon button. I’ve tried setting the binding to the following XAML but it never binds so the command isn’t called. What am I doing wrong?

<telerik:RadRibbonButton Size="Large"
                         Text="Refresh"
                         LargeImage="..\Images\Ribbon\32x32\Refresh.png"
                         Command="{Binding ChildView.RefreshCommand}" 
                         telerik:KeyTipService.AccessText="R"/>

Elsewhere in the main view I have bindings for data that comes from the child viewmodel and works fine so I’m really confused! For example, this is the binding I use to get the title for the window.

Title="{Binding ChildViewModel.Title,FallbackValue='My System'}"
  • 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-18T10:48:58+00:00Added an answer on June 18, 2026 at 10:48 am
    <telerik:RadRibbonButton Size="Large"
                             Text="Refresh"
                             LargeImage="..\Images\Ribbon\32x32\Refresh.png"
                             Command="{Binding ChildViewModel.RefreshCommand}" 
                             telerik:KeyTipService.AccessText="R"/>
    

    you weren’t binding to the view model

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

Sidebar

Related Questions

I have two images on a WPF window that are on top of each
I have a comboBox that has a datatrigger that set its SelectedIndex based on
I have a borderless WPF window (WindowStyle=None) that can be moved by catching LeftMouseDown
I have a RichTextBox on a WPF window that I am using kind of
I have WPF window that uses a dockpanel and the menu control. I have
I have a wpf application with a simple window that shows a text in
I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on
I have a UniformGrid object in my WPF project that has 2 rows and
we have a wpf-window with some textboxes and a datagrid. the textboxes descripe a
I have a WPF window, which contains a button called Cancel. Under ordinary circumstances

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.