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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:13:57+00:00 2026-05-30T18:13:57+00:00

In my WPF+MVVM application I have a View which hosts another usercontrol. The child

  • 0

In my WPF+MVVM application I have a View which hosts another usercontrol. The child usercontrol does not follow the MVVM way (because I’m simply hosting a Visio activeX object there), so I’m using the code behind class.

In the View I’m using this code:

<uc:VisioControl Grid.Row="2" x:Name="visioControlUC"
        VisioFileName="{Binding ElementName=tbFullFileName,Path=Text, UpdateSourceTrigger=PropertyChanged}"/>

In the same View, I have a Label element where I want to display a field value of a DependencyProperty named SelectedNodeCustomProperties defined on the child user control

<Label x:Name="lbNodeIdValue" DataContext="{Binding ElementName=visioControlUC}" Content="{Binding Path=SelectedNodeCustomProperties.Id, UpdateSourceTrigger=PropertyChanged}"/>

However, this is not working. Running in Debug mode I can see this binding exception in the Output window:

 BindingExpression path error: 'visioControlUC' property not found on 'object' ''NSDVizualizerViewModel' (HashCode=65573909)'. BindingExpression:Path=visioControlUC.SelectedNodeCustomProperties.NodeId; DataItem='NSDVizualizerViewModel' (HashCode=65573909); target element is 'Label' (Name=''); target property is 'Content' (type 'Object')

So, why is it that it’s expecting that the child user control be defined in the viewmodel and how can I set the DataContext to the user control when binding the label content?

Thanks,

Adrian

EDIT: To the person who downvoted my question, maybe you can explain why? Is there a similar question on the forum that I haven’t found maybe?

  • 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-30T18:13:59+00:00Added an answer on May 30, 2026 at 6:13 pm

    Try

    <Label x:Name="lbNodeIdValue" 
           Content="{Binding ElementName=visioControlUC, 
                             Path=SelectedNodeCustomProperties.Id,
                             UpdateSourceTrigger=PropertyChanged}"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application which I am developing using WPF\Prism\MVVM. All is going well
I have a WPf Toolkit-datagrid..in my application which follows MVVM pattern. How I can
in my MVVM application (in wpf) i have two view and I want to
I have a wpf application in mvvm pattern. In main view, I have few
I have a WPF application that mostly follows MVVM, which I am trying to
In a MVVM WPF application, I have a master-detail View that is used to
I'm writing an application using WPF MVVM. I have a view model with property
I'm building a WPF application and working with the MVVM pattern. I have 4
I'm trying to implement a WPF application using MVVM (Model-View-ViewModel) pattern and I'd like
I've got a WPF application which uses the MVVM pattern throughout, no code-behind, 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.