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

  • Home
  • SEARCH
  • 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 9139117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:20:45+00:00 2026-06-17T09:20:45+00:00

In my XAML code, I have a binding to the current dataitem like this:

  • 0

In my XAML code, I have a binding to the current dataitem like this:

Background="{Binding Path=., Converter={StaticResource ResourceKey=kBackground}}"

My converter uses several properties of the dataitem to determine the background. When any of those properties change, the background color could change. I want to send a notification to the target so that the background will change appropriately. My question is that I don’t know how to send such a notification when the binding path is “.”.

If my converter uses PropertyA and PropertyB, calling:

PropertyChanged(this, new PropertyChangedEventArgs("PropertyA"))

and/or

PropertyChanged(this, new PropertyChangedEventArgs("PropertyB"))

doesn’t trigger the binding. I tried calling this:

PropertyChanged(this, new PropertyChangedEventArgs("."))

but it didn’t trigger the binding either.

How do I call PropertyChanged in such a way that my “Path=.” bindings get notifications that they need to update?

This may be a duplicate question, but I couldn’t find one. I don’t know the terminology very well.

  • 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-17T09:20:46+00:00Added an answer on June 17, 2026 at 9:20 am

    Try using an IMultiValueConverter instead, and passing it the properties it needs

    <Grid.Background>
        <MultiBinding Converter="{StaticResource MyMultiValueConverter}">
            <Binding Path="PropertyA"/>
            <Binding Path="PropertyB"/>
        </MultiBinding>
    </Grid.Background>
    

    This should get re-evaluated anytime a PropertyChange notification is raised for either PropertyA or PropertyB

    The alternative using your current binding syntax would be to raise a PropertyChange notification of your parent data item anytime PropertyA or PropertyB changes.

    For example, assuming your current data item is SomeObject:

    SomeObject.PropertyChanged += SomeObject_PropertyChanged;
    
    ...
    
    void SomeObject_PropertyChanged(object src, PropertyChangedEventArgs e)
    {
        if (e.PropertyName == "PropertyA" || e.PropertyName == "PropertyB")
        {
            RaisePropertyChanged("SomeObject");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Scenario: Currently I have this XAML code: <Button Content=_Cancel IsCancel=True Command={Binding Path=CancelCommand} Margin=5> <Button.ContentTemplate>
I have this code in XAML <Grid x:Name=LayoutRoot Background=Transparent> <Grid.RowDefinitions> <RowDefinition Height=Auto/> <RowDefinition Height=*/>
I have this code in a xaml file now in a event handler code
I have this very simple Combobox in my XAML: <ComboBox Name=cmb1 Width=200 Height=23 ItemsSource={Binding}
I have a ListBox containing CheckBoxes. Xaml looks like this: <ListBox x:Name=lbContactTypes> <ListBox.ItemTemplate> <HierarchicalDataTemplate>
What do I have to change in my xaml/code to make the binding to
I have below XAML code : <Window x:Class=WpfApplication1.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml DataContext={Binding RelativeSource={RelativeSource Self}} WindowStartupLocation=CenterScreen
I have the following XAML code: <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsVisible=True IsMenuEnabled=False x:Name=PageBar> <shell:ApplicationBarIconButton IconUri=/Assets/Icons/appbar.questionmark.rest.png Text=Help
I have a xaml code: <Grid> <WrapPanel> <TextBox ></TextBox> <Button Content=GetIt /> </WrapPanel> </Grid>
I have created blank C#/XAML Windows 8 application. Add simple XAML code: <Page x:Class=Blank.MainPage

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.