private void OnShowTooltipChanged(CutTextKind oldValue, CutTextKind newValue)
        {
            _cutTextKind = (CutTextKind)newValue;

            if (oldValue != CutTextKind.None)
            {
                _owner.IsVisibleChanged -= OnIsVisibleChanged;
                _owner.LayoutUpdated    -= OnLayoutUpdated;
                _owner.SizeChanged      -= OnSizeChanged;
            }
            if (newValue != CutTextKind.None)
            {
                _owner.IsVisibleChanged += OnIsVisibleChanged;
                _owner.LayoutUpdated    += OnLayoutUpdated;
                _owner.SizeChanged      += OnSizeChanged;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the value that defines when the tooltip should be shown.
 /// </summary>
 /// <param name="obj">The element to which the attached property is written.</param>
 /// <param name="value">The needed DW.WPFToolkit.Interactivity.CutTooltipBehavior.ShowTooltip value.</param>
 public static void SetShowTooltip(DependencyObject obj, CutTextKind value)
 {
     obj.SetValue(ShowTooltipProperty, value);
 }
Exemplo n.º 3
0
        private void OnShowTooltipChanged(CutTextKind oldValue, CutTextKind newValue)
        {
            _cutTextKind = (CutTextKind)newValue;

            if (oldValue != CutTextKind.None)
            {
                _owner.IsVisibleChanged -= OnIsVisibleChanged;
                _owner.LayoutUpdated -= OnLayoutUpdated;
                _owner.SizeChanged -= OnSizeChanged;
            }
            if (newValue != CutTextKind.None)
            {
                _owner.IsVisibleChanged += OnIsVisibleChanged;
                _owner.LayoutUpdated += OnLayoutUpdated;
                _owner.SizeChanged += OnSizeChanged;
            }
        }
 /// <summary>
 /// Sets the value that defines when the tooltip should be shown.
 /// </summary>
 /// <param name="obj">The element to which the attached property is written.</param>
 /// <param name="value">The needed DW.WPFToolkit.Interactivity.CutTooltipBehavior.ShowTooltip value.</param>
 public static void SetShowTooltip(DependencyObject obj, CutTextKind value)
 {
     obj.SetValue(ShowTooltipProperty, value);
 }