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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:11:10+00:00 2026-05-25T19:11:10+00:00

I have a value converter with a property I would like to bind to,

  • 0

I have a value converter with a property I would like to bind to, but the binding never happens, i.e. the dependency property in my value converter always is null.
Background: I want to bind an enum to a combo box but have control over the text that is being displayed.

I implemented the value converter like this:

public class EnumDisplayer : DependencyObject, IValueConverter
{
    public static readonly DependencyProperty LocalizerProperty =
        DependencyProperty.Register(
            "Localizer", typeof(ILocalizer), typeof(EnumDisplayer),
            new PropertyMetadata(default(ILocalizer), OnLocalizerChanged));

    public ILocalizer Localizer
    {
        get { return (ILocalizer) GetValue(LocalizerProperty); }
        set { SetValue(LocalizerProperty, value); }
    }

    private static void OnLocalizerChanged(DependencyObject d, 
                                           DependencyPropertyChangedEventArgs e)
    {
        // ...
    }

    //...
}

And I bind it like this:

<UserControl.Resources>
    <Common:EnumDisplayer x:Key="companyTypes"
                          Localizer="{Binding CompanyTypeEnumLocalizer}" />
    <!-- ... -->
</UserControl.Resources>

My class is an adapted version of the EnumDisplayer.

I fail to understand, why OnLocalizerChanged is never called. Can anyone provide some insight?

  • 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-25T19:11:10+00:00Added an answer on May 25, 2026 at 7:11 pm

    (Stack Team correct me if I am wrong)… ValueConverters do not automatically support in binding and there are reasons…

    1. They arent really something that the WPF framework is actively aware of, given that they dont lie on visual or logical tree.

    2. They are used as part of inner markup extensions. This is a merky area. Unless they implement marrkup extensions on their own, they would be bound to.

    Although there are ways..

    1. Straightforward way is to use MultiBinding instead of single binding. The second binding will replace your converter’s need to host a dependncy property.

    2. http://www.codeproject.com/KB/WPF/AttachingVirtualBranches.aspx

    I hope this helps.

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

Sidebar

Related Questions

Hi I would like set default value for binding on Text property. In widows
I have following XML configration i would like to convert to java property file.
I have a value like this: Foo Bar Another Value something else What regex
I have the value of the epoch time like say 123456789, now I want
I have a handful of records that I would like to sort based on
I have a node that looks like this, in the xml file: <property name=nameA
Using SilverLight, one can bind the value of a control to a property from
I have created a UserControl with two dependency properties: Value and Color. The Color
I have a date converted to double value and saved in database. Now, I
I often have to convert a retreived value (usually as a string) - and

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.