markus / MarkupToPDF / Common / CommentUserInfo.cs @ 89b30429
이력 | 보기 | 이력해설 | 다운로드 (1.86 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using System.Windows.Media; |
6 |
|
7 |
namespace MarkupToPDF.Common |
8 |
{ |
9 |
//public class MyEventArgs : System.EventArgs |
10 |
//{ |
11 |
// public bool isMouseOver { get; set; } |
12 |
//} |
13 |
|
14 |
public class CommentUserInfo : System.Windows.Controls.Control |
15 |
{ |
16 |
public string Memo { get; set; } |
17 |
public string MarkupInfoID { get; set; } |
18 |
public bool IsMouseOver { get; set; } |
19 |
public bool IsNew { get; set; } |
20 |
public string CommentID { get; set; } |
21 |
|
22 |
//public event EventHandler<MyEventArgs> StateChanged; |
23 |
|
24 |
public CommentUserInfo() |
25 |
{ |
26 |
//this.BorderThickness = new System.Windows.Thickness(5.0); |
27 |
this.BorderThickness = new System.Windows.Thickness(20.0); |
28 |
|
29 |
|
30 |
this.MouseEnter += CommentUserInfo_MouseEnter; |
31 |
this.MouseLeave += CommentUserInfo_MouseLeave; |
32 |
} |
33 |
|
34 |
protected override GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters) |
35 |
{ |
36 |
var temp = base.HitTestCore(hitTestParameters); |
37 |
return temp; |
38 |
//return base.HitTestCore(hitTestParameters); |
39 |
} |
40 |
|
41 |
private void CommentUserInfo_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) |
42 |
{ |
43 |
this.IsMouseOver = false; |
44 |
//if (StateChanged !=null) |
45 |
//{ |
46 |
// StateChanged(this, new MyEventArgs { isMouseOver = false }); |
47 |
//} |
48 |
//this.Opacity = 1; |
49 |
} |
50 |
|
51 |
private void CommentUserInfo_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) |
52 |
{ |
53 |
this.IsMouseOver = true; |
54 |
//this.Opacity = 0.5; |
55 |
//if (StateChanged != null) |
56 |
//{ |
57 |
// StateChanged(this, new MyEventArgs { isMouseOver = true }); |
58 |
//} |
59 |
} |
60 |
} |
61 |
} |
62 |
|