개정판 71d7e0bf
issue #000 TextControl Gotfocus 받을 때 TextBox가 EditMode가 안되는 현상 해결.
ArrowTextControl과 TextControl에 있는 IsEditing 속성 및 의존속성을 제거 이유는 EnableEditing과 동일한 역할을 하고 있기 때문에 필요없다.
Change-Id: Ic4452154655c07eaf5730a0dcebdb255237851ee
MarkupToPDF/Controls/Text/TextControl.cs | ||
---|---|---|
139 | 139 |
{ |
140 | 140 |
if (EnableEditing) |
141 | 141 |
{ |
142 |
IsEditing = true; |
|
143 | 142 |
EditingMode(); |
144 | 143 |
} |
145 | 144 |
else |
146 | 145 |
{ |
147 |
IsEditing = false; |
|
148 | 146 |
UnEditingMode(); |
149 | 147 |
} |
150 | 148 |
} |
151 | 149 |
|
152 | 150 |
void TextControl_LostFocus(object sender, RoutedEventArgs e) |
153 | 151 |
{ |
154 |
IsEditing = false; |
|
155 | 152 |
UnEditingMode(); |
156 | 153 |
ApplyOverViewData(); |
157 | 154 |
} |
... | ... | |
522 | 519 |
public static readonly DependencyProperty AngleProperty = DependencyProperty.Register( |
523 | 520 |
"Angle", typeof(double), typeof(TextControl), new PropertyMetadata((double)0.0, new PropertyChangedCallback(AngleValueChanged))); |
524 | 521 |
|
525 |
public static readonly DependencyProperty IsEditingProperty = DependencyProperty.Register( |
|
526 |
"IsEditing", typeof(bool), typeof(TextControl), new PropertyMetadata((false), new PropertyChangedCallback(OnIsEditingChanged))); |
|
527 |
|
|
528 | 522 |
public static readonly DependencyProperty EnableEditingProperty = DependencyProperty.Register( |
529 |
"EnableEditing", typeof(bool), typeof(TextControl), new PropertyMetadata((true))); |
|
523 |
"EnableEditing", typeof(bool), typeof(TextControl), new PropertyMetadata((true), new PropertyChangedCallback(OnIsEditingChanged)));
|
|
530 | 524 |
|
531 | 525 |
public static readonly DependencyProperty TextBoxVisibilityProperty = DependencyProperty.Register( |
532 | 526 |
"TextBoxVisibility", typeof(Visibility), typeof(TextControl), new PropertyMetadata((Visibility.Visible), OnTextBoxVisibilityChanged)); |
... | ... | |
551 | 545 |
} |
552 | 546 |
} |
553 | 547 |
|
554 |
public bool IsEditing |
|
555 |
{ |
|
556 |
get { return (bool)GetValue(IsEditingProperty); } |
|
557 |
set |
|
558 |
{ |
|
559 |
if (this.IsEditing != value) |
|
560 |
{ |
|
561 |
SetValue(IsEditingProperty, value); |
|
562 |
|
|
563 |
OnPropertyChanged("IsEditing"); |
|
564 |
|
|
565 |
} |
|
566 |
} |
|
567 |
} |
|
548 |
|
|
568 | 549 |
|
569 | 550 |
public bool EnableEditing |
570 | 551 |
{ |
... | ... | |
1097 | 1078 |
|
1098 | 1079 |
if (instance.EnableEditing) |
1099 | 1080 |
{ |
1100 |
if (instance.IsEditing) |
|
1101 |
{ |
|
1102 |
instance.EditingMode(); |
|
1103 |
} |
|
1104 |
else |
|
1105 |
{ |
|
1106 |
instance.UnEditingMode(); |
|
1107 |
} |
|
1081 |
instance.EditingMode(); |
|
1108 | 1082 |
} |
1109 | 1083 |
else |
1110 | 1084 |
{ |
내보내기 Unified diff