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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:53:07+00:00 2026-06-18T08:53:07+00:00

I have a ListBox that is bound, via dependency property, to a ObservableCollection<object> .

  • 0

I have a ListBox that is bound, via dependency property, to a ObservableCollection<object>. I am using a DataTemplateSelector to determine which type of objects, based off of class type, are found in the ObservableCollection then I apply the appropriate DataTemplate. Multiple objects of any class type is possible.

Part of my model class is below. It has been edited to show points of interest only:

public class IPUpdater
{
   public IPUpdater()
   {
   }

   public string IPTransceiverInstall { get; set; }
   public string IPTransceiverFinal { get; set; }
   public Boolean IsFinal { get; set; }       

   public string IPTransceiver
   {
       get
       {
           return IPTransceiverAddress();
       }
   }

   private string IPTransceiverAddress()
   {
       if (!IsFinal)
           return IPTransceiverInstall;
       else
           return IPTransceiverFinal;
   }

}

IPTransceiver is bound to a TextBox within the XAML DataTemplate when the appropriate IPUpdater template is used. IsFinal is bound to a CheckBox within the same template.

Question: How do I force the TextBox to register that IPTransceiver has changed? I thought about trying to set a DependencyProperty equal to IPTransceiver, but I wasn’t sure how to initially set it’s value if there’s more than one instance of the class in the Listbox.

TwoWay and OneWayToSource binding modes are not available for a read-only property. I can verify that IsFinal updates when the CheckBox value has changed. I’ve even tried to force IPTransceiverAddress() to trigger when IsFinal updates. None of the above have caused the TextBox to update. The only way I have been able to get the box to update is by repeating the SQLite Query, which I’d like to avoid.

Thanks!

  • 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-18T08:53:08+00:00Added an answer on June 18, 2026 at 8:53 am

    Any classes you expect to use as binding sources should implement INotifyPropertyChanged. Your ViewModels (as well as your models, if you plan to bind the Views directly to them) should implement this interface and raise the PropertyChanged event in order for the WPF binding engine to reflect these changes in the UI.

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

Sidebar

Related Questions

I have a listbox in WPF that's bound to a ObservableCollection using the ItemSource
I have a ListBox that is bound to a ViewModel property of type BindingList(Of
I have this ListBox which is bound to an ObservableCollection. Each object in the
I currently have a listbox that has its selected item bound to a property
I have a ListBox that is bound to a list of CustomerViewModel-objects, that each
I have a ListBox which is bound to ObservableCollection of LogMessages. public ObservableCollection<LogMessage> LogMessages
Suppose I have a ListBox which is bound to a collection of Foo objects,
I have a ListBox, that's bound to an ObservableCollection . Each ListBoxItem is displayed
I have a ListBox bound to a list of objects that implement IDataErrorInfo. I
I have a ListBox which is bound to my custom class ObservableCollection<FieldPropertyItem> _fieldOrderCollection`; internal

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.