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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:20:45+00:00 2026-05-31T19:20:45+00:00

Another WPF question for you all. I have a user control that contains a

  • 0

Another WPF question for you all.

I have a user control that contains a text box and button. The button opens a “folder selection” dialog; when the user selects a folder, the text box should populate with the path the user selected. That works fine.

Inside of the user control, I have a dependency property named Path. When the user makes their selection, the Path gets updated and the text box bound to it also updates. That works great.

Now, the parent View also needs to know what this Path value is. What to do from here?

I’d assume that we should add a property to the parent’s view model named Path. Easy enough — then what do we bind it to? The Path dependency property of the user control? Can that be bound to both the parent’s View Model and user control’s text box simultaneously?

I tried adding the user controls attributes without success:

<v:MyControl Path="{Binding ViewModels:MyViewModel.Path}" ... />

No errors, it just didn’t update the view model. If this approach is feasible, I can post more of the code.

enter image description here

  • 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-31T19:20:46+00:00Added an answer on May 31, 2026 at 7:20 pm

    Dependency properties can be the source of multiple bindings, yes. Speaking solely about the view, I could have a master slider with five text boxes bound to its value, and that would work just fine.

    However, since you’re living in MVVM, it’s probably more sound to use the view model’s change-notifying properties as the Single Source Of Truth for this screen. The user control writes to this property, and the parent view reads from it, simple as that.

    Rule of thumb: if more than one view-level component needs access to a property, bind both of them to the view model, not to each other.

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

Sidebar

Related Questions

Hai am having a WPF user control, when i use that control in another
I have another WPF databinding question... one that I haven't found an answer to
Ok another WPF question, well I guess this is just general .NET. I have
Note first of all that this question is not tagged winforms or wpf or
I have a custom WPF control that I made a couple of days ago:
Another WPF question... <UserControl x:Class=TKEApp.Components.UserControls.ButtonControl xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid Background=Black> <TextBlock Foreground=White Background=Brown Name=lblCaption TextAlignment=Center></TextBlock>
I'm trying to replace the content of a WPF grid control by another WPF
So if I have a WPF window, would moving another window over the WPF
Writing another question for SO, I came to a pattern that I use very
In my list view control (or any other WPF control that will fit 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.