1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows.Controls;
|
---|
6 | using System.Windows;
|
---|
7 | using System.Windows.Media;
|
---|
8 | using System.Windows.Input;
|
---|
9 | using System.Diagnostics;
|
---|
10 |
|
---|
11 | namespace Microsoft.Research.DynamicDataDisplay.Charts
|
---|
12 | {
|
---|
13 | public class LiveToolTip : ContentControl
|
---|
14 | {
|
---|
15 | static int nameCounter = 0;
|
---|
16 | static LiveToolTip()
|
---|
17 | {
|
---|
18 | var thisType = typeof(LiveToolTip);
|
---|
19 |
|
---|
20 | DefaultStyleKeyProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(thisType));
|
---|
21 | FocusableProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(false));
|
---|
22 | IsHitTestVisibleProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(false));
|
---|
23 | BackgroundProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(Brushes.White));
|
---|
24 | OpacityProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(1.0));
|
---|
25 | BorderBrushProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(Brushes.DarkGray));
|
---|
26 | BorderThicknessProperty.OverrideMetadata(thisType, new FrameworkPropertyMetadata(new Thickness(1.0)));
|
---|
27 | }
|
---|
28 |
|
---|
29 | public LiveToolTip()
|
---|
30 | {
|
---|
31 | Name = "Microsoft_Research_Dynamic_Data_Display_Charts_LiveToolTip_" + nameCounter;
|
---|
32 | nameCounter++;
|
---|
33 | }
|
---|
34 |
|
---|
35 | #region Properties
|
---|
36 |
|
---|
37 | public FrameworkElement Owner
|
---|
38 | {
|
---|
39 | get { return (FrameworkElement)GetValue(OwnerProperty); }
|
---|
40 | set { SetValue(OwnerProperty, value); }
|
---|
41 | }
|
---|
42 |
|
---|
43 | public static readonly DependencyProperty OwnerProperty = DependencyProperty.Register(
|
---|
44 | "Owner",
|
---|
45 | typeof(FrameworkElement),
|
---|
46 | typeof(LiveToolTip),
|
---|
47 | new FrameworkPropertyMetadata(null));
|
---|
48 |
|
---|
49 | #endregion // end of Properties
|
---|
50 | }
|
---|
51 | }
|
---|