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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:54:19+00:00 2026-05-13T10:54:19+00:00

I have a two userControls (IconUserControl & DisplayUserControl), I’m having a problem with binding

  • 0

I have a two userControls (IconUserControl & DisplayUserControl), I’m having a problem with binding dependency properties, here’s some detail:

  • IconUserControl has a bool DP of IsDisplayShown
  • DisplayUserControl has a bool DP of IsDisplayShown

In the XAML I have:

<local:DisplayUserControl
                    x:Name="DisplayUserControl"
                    IsDisplayShown="{Binding ElementName=IconUserControl, Path=IsDisplayShown, Converter={StaticResource DummyConverter}}" />

<local:IconUserControl
                    x:Name="IconUserControl" />

When IconUserControl.IsDisplayShown is set to true, I can see in the DummyConverter this value getting passed, but it never sets DisplayUserControl.IsDisplayShown.

However, if in the codebehind for the View I set DisplayUserControl.IsDisplayShown = true;, then it works fine.

I have the DataContext for both UserControls set to “this” in the constructor. I’ve tried to fiddle with the “Mode” property of the binding.

*Note: DummyConverter just returns the value, I only have this to confirm that the Binding is trying to work.

What am I doing wrong?

Edit:

Here’s the two DPs:

public bool IsDisplayShown
        {
            get { return (bool)GetValue(IsDisplayShownProperty); }
            set { SetValue(IsDisplayShownProperty, value); }
        }
        public static readonly DependencyProperty IsDisplayShownProperty =
            DependencyProperty.Register("IsDisplayShown", typeof(bool), typeof(IconUserControl), new UIPropertyMetadata(false));

public bool IsDisplayShown
        {
            get { return (bool)GetValue(IsDisplayShownProperty); }
            set
            {
                if (value)
                    ShowOpenItems();
                else
                    HideOpenItems();
                SetValue(IsDisplayShownProperty, value);
            }
        }
        public static readonly DependencyProperty IsDisplayShownProperty=
            DependencyProperty.Register("IsDisplayShown", typeof(bool), typeof(DisplayUserControl), new UIPropertyMetadata(false));
  • 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-13T10:54:20+00:00Added an answer on May 13, 2026 at 10:54 am

    This should help you, but probably won’t solve the whole problem. It is a good place to start, though. Adding this code will cause debugging info for the binding to dump to your Debug window in Visual Studio.

    add this namespace to your xaml….

    xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
    

    then, your binding, add this:

    diagnostics:PresentationTraceSources.TraceLevel=High
    

    check Bea Stollnitz article for more information

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

Sidebar

Ask A Question

Stats

  • Questions 389k
  • Answers 389k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer try running for %i in (*.dll) do copy /b %i+,,… May 15, 2026 at 12:48 am
  • Editorial Team
    Editorial Team added an answer Take a look at XSL Transformations. There is a lot… May 15, 2026 at 12:48 am
  • Editorial Team
    Editorial Team added an answer There is an setting in Terminal's preferences to use the… May 15, 2026 at 12:48 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.