Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Data biding from checkbox for displaying and hiding tooltip doesn't get updated

$
0
0
WPF Code<Button Name="btnCancel" Content="Cancel" 
                        ToolTipService.IsEnabled="{Binding GeneralDisplayTooltipsForPreferencesAndSearchOptions, UpdateSourceTrigger=PropertyChanged}"
                        ToolTip="Discard Changes On All Tabs and Close Dialog"
                    Height="25" Width="80" Margin="0,5,2,5" VerticalAlignment="Center" Click="btnCancel_Click
-------------------------------------------------------

C#

 public class General : INotifyPropertyChanged, IPreferencesGeneral
    {
       
        private bool generalDisplayTooltipsForPreferencesAndSearchOptions = false;
              
        [field: NonSerializedAttribute()]
        public event PropertyChangedEventHandler PropertyChanged = delegate
        {

        };

 public bool GeneralDisplayTooltipsForPreferencesAndSearchOptions
        { 
            get { return generalDisplayTooltipsForPreferencesAndSearchOptions; }
            set
            {
                if (!Equals(generalDisplayTooltipsForPreferencesAndSearchOptions, value))
                {
                    generalDisplayTooltipsForPreferencesAndSearchOptions = value;
                    OnPropertyChanged("GeneralDisplayTooltipsForPreferencesAndSearchOptions");
                }
            }
        }
}

Hi, I need to display some tooltips and have a checkbox to display it and hide it. I have the databiding but it won't get updated. The bool value seems always true which means that the tooltip won't disappear even when the checkbox is unchecked. Thanks. Jean


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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