WPF Tooltip binding not updating -
All in the afternoon, I want to work with the Heritage Winform application, but I want to start migrating it to WPF. It does not have a tooltip control, so I want to use a WPF tooltip object.
I make a global installation of a tooltip object. I have bound the control inside of it and my application sets the datacontact of the tooltip. I can manually show and hide tooltip manually For the first time when I move on an object, it raises completely bound data and works great. When I go to another control, the tooltip datacontext changes, but the displayed data never reloads.
I tried to apply the occurrence of a property change and use the INITifyPropertyChanged interface I used to bind in the object. It appears that the wpf tooltip is not listening to the incident.
I tried to set the compulsive mode on to ON (this is only a display).
Tooltip is programmatically created:
// Create the tooltip window System.Windows.Controls.Image img = New system.windows. Control. Image (); Img.Width = 50; Img.Height = 60; // Bind the image system. Windows. Data. Image binding = new system Windows Data. Binding ("petthemage data"); ImageBinding.Mode = System.Windows.Data.BindingMode.OneWay; ImageBinding.Source = Bedding; Img.Setbinding (System.Windows.Controls.Image.SourceProperty, imageBinding); // wrap image in a boundary system. Windows Control Border BRRR = New System. Windows Control Border (); Brdr.BorderBrush = System.Windows.Media.Brushes.Blue; Brdr.Margin = New system. Windows.shahar (6); Brdr.child = img; System.Windows.Controls.WrapPanel wp = New system.windows Control. Viparpan (); System.Windows.Controls.TextBlock TB = New System.windows. Control. Text block (); Tb.Background = System.Windows.Media.Brushes.LightBlue; Tb.Foreground = System.Windows.Media.Brushes.Blue; // Bind the text block system. Windows. Data Binding Textboxing = New System Windows Data Binding ("tooltip text"); TextBlockBinding.Mode = System.Windows.Data.BindingMode.OneWay; TextBlockBinding.Source = Bedding; Tb.SetBinding (System.Windows.Controls.TextBlock.TextProperty, textBlockBinding); Wp.children.Add (BRDR); Wp.children.Add (TB); BedTooltip = New system.windows Control. Tooltip (); BedTooltip.Content = wp; Any idea why this does not work? Maybe I should use ToolTip objects for a control instead of a global option?
Binding specifies a source because they are now about datacontext Do not "care" and therefore do not update the binding, if any asset in the source-object changes instead of itself.
Comments
Post a Comment