개정판 91c5e7a1
KEY EVENT APP에 추가
Change-Id: Ibfa264faa1cee77bbd61a83d7868caed6dedff0f
MarkupToPDF/Controls/Text/ArrowTextControl.cs | ||
---|---|---|
76 | 76 |
Base_TextBox.GotFocus += new RoutedEventHandler(Base_TextBox_GotFocus); |
77 | 77 |
Base_TextBox.LostFocus += new RoutedEventHandler(Base_TextBox_LostFocus); |
78 | 78 |
Base_TextBox.SelectionChanged += (sender, e) => MoveCustomCaret(); |
79 |
|
|
79 |
this.KeyDown += ArrowTextControl_KeyDown; |
|
80 | 80 |
SetArrowTextPath(); |
81 | 81 |
Base_TextBox.IsTabStop = true; |
82 | 82 |
} |
83 | 83 |
|
84 |
private void ArrowTextControl_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) |
|
85 |
{ |
|
86 |
if(e.Key == System.Windows.Input.Key.Escape) |
|
87 |
{ |
|
88 |
if(string.IsNullOrEmpty(Base_TextBox.Text)) |
|
89 |
{ |
|
90 |
this.Visibility = Visibility.Collapsed; |
|
91 |
} |
|
92 |
|
|
93 |
EditEnd(); |
|
94 |
} |
|
95 |
} |
|
96 |
|
|
84 | 97 |
public void SetFontFamily(FontFamily fontFamily) |
85 | 98 |
{ |
86 | 99 |
this.FontFamily = fontFamily; |
... | ... | |
194 | 207 |
|
195 | 208 |
void Base_TextBox_LostFocus(object sender, RoutedEventArgs e) |
196 | 209 |
{ |
197 |
|
|
210 |
EditEnd(); |
|
211 |
} |
|
212 |
|
|
213 |
private void EditEnd() |
|
214 |
{ |
|
198 | 215 |
this.ArrowText = Base_TextBox.Text; |
216 |
Base_TextBox.Focusable = false; |
|
199 | 217 |
this.BaseTextbox_Caret.Visibility = Visibility.Collapsed; |
200 | 218 |
this.IsEditingMode = false; |
201 | 219 |
ApplyOverViewData(); |
내보내기 Unified diff