コード例 #1
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;
            }
        }
コード例 #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);
 }
コード例 #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;
            }
        }
コード例 #4
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);
 }