Quantcast
Channel: Combobox binding question
Viewing all articles
Browse latest Browse all 5

Combobox binding question

$
0
0

Hi,

fix your code:

  class Equity : INotifyPropertyChanged

    {
        private ComboBoxItem country;
        public ComboBoxItem Country
        {

            get { return country; }
            set
            {
                country = value;
                OnPropertyChanged("Country");
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));

        }
    }
<TextBox x:Name="Txtbx1" Width="500" Height="30"
                 Text="{Binding Path = Country.Content}"></TextBox>

Best Regards,

Alex


"Windows Presentation Foundation" forum will be migrating to a new home onMicrosoft Q&A (Preview)!
We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
For more information, please refer to the sticky post.


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>