FlatToolTip.cs 836 B

123456789101112131415161718192021222324252627282930
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. namespace CustomUI
  4. {
  5. public class FlatToolTip : ToolTip
  6. {
  7. #region DependencyProperty
  8. public EnumPlacement PlacementEx
  9. {
  10. get { return (EnumPlacement)GetValue(PlacementExProperty); }
  11. set { SetValue(PlacementExProperty, value); }
  12. }
  13. public static readonly DependencyProperty PlacementExProperty =
  14. DependencyProperty.Register("PlacementEx", typeof(EnumPlacement), typeof(FlatToolTip), new PropertyMetadata(EnumPlacement.RightCenter));
  15. #endregion
  16. #region Constructors
  17. static FlatToolTip()
  18. {
  19. DefaultStyleKeyProperty.OverrideMetadata(typeof(FlatToolTip), new FrameworkPropertyMetadata(typeof(FlatToolTip)));
  20. }
  21. #endregion
  22. }
  23. }