@@ -21,7 +21,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
21
21
/// </summary>
22
22
[ TemplatePart ( Name = CanvasTextBoxToolsName , Type = typeof ( StackPanel ) ) ]
23
23
[ TemplatePart ( Name = CanvasTextBoxColorPickerName , Type = typeof ( Windows . UI . Xaml . Controls . ColorPicker ) ) ]
24
- [ TemplatePart ( Name = CanvasTextBoxFontSizeTextBoxName , Type = typeof ( TextBox ) ) ]
24
+ [ TemplatePart ( Name = CanvasComboBoxFontSizeTextBoxName , Type = typeof ( TextBox ) ) ]
25
25
[ TemplatePart ( Name = CanvasTextBoxItalicButtonName , Type = typeof ( ToggleButton ) ) ]
26
26
[ TemplatePart ( Name = CanvasTextBoxBoldButtonName , Type = typeof ( ToggleButton ) ) ]
27
27
[ TemplatePart ( Name = DrawingSurfaceRendererName , Type = typeof ( InfiniteCanvasVirtualDrawingSurface ) ) ]
@@ -45,7 +45,7 @@ public partial class InfiniteCanvas : Control
45
45
46
46
private const string CanvasTextBoxToolsName = "CanvasTextBoxTools" ;
47
47
private const string CanvasTextBoxColorPickerName = "CanvasTextBoxColorPicker" ;
48
- private const string CanvasTextBoxFontSizeTextBoxName = "CanvasTextBoxFontSizeTextBox " ;
48
+ private const string CanvasComboBoxFontSizeTextBoxName = "CanvasComboBoxFontSizeTextBox " ;
49
49
private const string CanvasTextBoxItalicButtonName = "CanvasTextBoxItalicButton" ;
50
50
private const string CanvasTextBoxBoldButtonName = "CanvasTextBoxBoldButton" ;
51
51
private const string DrawingSurfaceRendererName = "DrawingSurfaceRenderer" ;
@@ -71,7 +71,7 @@ public partial class InfiniteCanvas : Control
71
71
private StackPanel _canvasTextBoxTools ;
72
72
private Windows . UI . Xaml . Controls . ColorPicker _canvasTextBoxColorPicker ;
73
73
74
- private ComboBox _canvasTextBoxFontSizeTextBox ;
74
+ private ComboBox _canvasComboBoxFontSizeTextBox ;
75
75
private ToggleButton _canvasTextBoxItalicButton ;
76
76
private ToggleButton _canvasTextBoxBoldButton ;
77
77
private Button _undoButton ;
@@ -244,7 +244,7 @@ protected override void OnApplyTemplate()
244
244
{
245
245
_canvasTextBoxTools = ( StackPanel ) GetTemplateChild ( CanvasTextBoxToolsName ) ;
246
246
this . _canvasTextBoxColorPicker = ( Windows . UI . Xaml . Controls . ColorPicker ) GetTemplateChild ( CanvasTextBoxColorPickerName ) ;
247
- _canvasTextBoxFontSizeTextBox = ( ComboBox ) GetTemplateChild ( CanvasTextBoxFontSizeTextBoxName ) ;
247
+ _canvasComboBoxFontSizeTextBox = ( ComboBox ) GetTemplateChild ( CanvasComboBoxFontSizeTextBoxName ) ;
248
248
_canvasTextBoxItalicButton = ( ToggleButton ) GetTemplateChild ( CanvasTextBoxItalicButtonName ) ;
249
249
_canvasTextBoxBoldButton = ( ToggleButton ) GetTemplateChild ( CanvasTextBoxBoldButtonName ) ;
250
250
_drawingSurfaceRenderer = ( InfiniteCanvasVirtualDrawingSurface ) GetTemplateChild ( DrawingSurfaceRendererName ) ;
@@ -296,7 +296,7 @@ protected override void OnApplyTemplate()
296
296
297
297
private void UnRegisterEvents ( )
298
298
{
299
- _canvasTextBoxFontSizeTextBox . SelectionChanged -= CanvasTextBoxFontSizeTextBox_SelectionChanged ;
299
+ _canvasComboBoxFontSizeTextBox . SelectionChanged -= CanvasComboBoxFontSizeTextBox_SelectionChanged ;
300
300
_canvasTextBoxItalicButton . Click -= CanvasTextBoxItalicButton_Clicked ;
301
301
_canvasTextBoxBoldButton . Click -= CanvasTextBoxBoldButton_Clicked ;
302
302
_canvasTextBoxColorPicker . ColorChanged -= CanvasTextBoxColorPicker_ColorChanged ;
@@ -314,13 +314,13 @@ private void UnRegisterEvents()
314
314
Unloaded -= InfiniteCanvas_Unloaded ;
315
315
Application . Current . LeavingBackground -= Current_LeavingBackground ;
316
316
_drawingSurfaceRenderer . CommandExecuted -= DrawingSurfaceRenderer_CommandExecuted ;
317
- _canvasTextBoxFontSizeTextBox . PreviewKeyDown -= CanvasTextBoxFontSizeTextBox_PreviewKeyDown ;
317
+ _canvasComboBoxFontSizeTextBox . PreviewKeyDown -= CanvasComboBoxFontSizeTextBox_PreviewKeyDown ;
318
318
Loaded -= InfiniteCanvas_Loaded ;
319
319
}
320
320
321
321
private void RegisterEvents ( )
322
322
{
323
- _canvasTextBoxFontSizeTextBox . SelectionChanged += CanvasTextBoxFontSizeTextBox_SelectionChanged ;
323
+ _canvasComboBoxFontSizeTextBox . SelectionChanged += CanvasComboBoxFontSizeTextBox_SelectionChanged ;
324
324
_canvasTextBoxItalicButton . Click += CanvasTextBoxItalicButton_Clicked ;
325
325
_canvasTextBoxBoldButton . Click += CanvasTextBoxBoldButton_Clicked ;
326
326
_canvasTextBoxColorPicker . ColorChanged += CanvasTextBoxColorPicker_ColorChanged ;
@@ -338,7 +338,7 @@ private void RegisterEvents()
338
338
Unloaded += InfiniteCanvas_Unloaded ;
339
339
Application . Current . LeavingBackground += Current_LeavingBackground ;
340
340
_drawingSurfaceRenderer . CommandExecuted += DrawingSurfaceRenderer_CommandExecuted ;
341
- _canvasTextBoxFontSizeTextBox . PreviewKeyDown += CanvasTextBoxFontSizeTextBox_PreviewKeyDown ;
341
+ _canvasComboBoxFontSizeTextBox . PreviewKeyDown += CanvasComboBoxFontSizeTextBox_PreviewKeyDown ;
342
342
Loaded += InfiniteCanvas_Loaded ;
343
343
}
344
344
0 commit comments