From 9d055565199a9731cf8a436e852e3486c14c077d Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti <13schishti@Gmail.com> Date: Wed, 30 Oct 2019 04:08:39 +0000 Subject: [PATCH 1/8] Update PropertyKind.cs --- .../Models/PropertyDescriptor/PropertyKind.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs b/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs index a4cb9632949..1a5c1679c33 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs @@ -13,6 +13,6 @@ public enum PropertyKind Bool, Brush, TimeSpan, - Thickness + Thicknessasdfadsf } } From 1e7c8c54b625ce6cf0607572ef6716bd4271481e Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti <13schishti@Gmail.com> Date: Wed, 30 Oct 2019 04:09:01 +0000 Subject: [PATCH 2/8] Update Microsoft.Toolkit.Uwp.Connectivity.csproj --- .../Microsoft.Toolkit.Uwp.Connectivity.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj b/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj index e1a7784b70c..159f75b72ec 100644 --- a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj +++ b/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj @@ -3,7 +3,7 @@ uap10.0.16299 Windows Community Toolkit Devices - This library enables easier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers. + This library enables easdfdsfaasier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers. UWP Toolkit Windows Devices Bluetooth BluetoothLE BLE Networking From 848a5b691ee9051b0dbc91e23c38f693508b7d02 Mon Sep 17 00:00:00 2001 From: SalmanMKC <13schishti@gmail.com> Date: Wed, 1 Apr 2020 01:57:58 +0100 Subject: [PATCH 3/8] undo change --- .../Models/PropertyDescriptor/PropertyKind.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs b/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs index 1a5c1679c33..a4cb9632949 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/Models/PropertyDescriptor/PropertyKind.cs @@ -13,6 +13,6 @@ public enum PropertyKind Bool, Brush, TimeSpan, - Thicknessasdfadsf + Thickness } } From 629496651c1cec66766b45ed56f56a70e7a6b276 Mon Sep 17 00:00:00 2001 From: SalmanMKC <13schishti@gmail.com> Date: Wed, 1 Apr 2020 16:50:51 +0100 Subject: [PATCH 4/8] Functionality done --- .../InfiniteCanvas/InfiniteCanvas.TextBox.cs | 6 +-- .../InfiniteCanvas/InfiniteCanvas.cs | 8 ++-- .../InfiniteCanvas/InfiniteCanvas.xaml | 37 +++++++++++++++---- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs index 94a537fbb53..46ade5ff03d 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs @@ -41,10 +41,10 @@ private int TextFontSize { get { - if (!string.IsNullOrWhiteSpace(_canvasTextBoxFontSizeTextBox.Text) && + if (!string.IsNullOrWhiteSpace(_canvasTextBoxFontSizeTextBox.SelectedValue.ToString()) && Regex.IsMatch(_canvasTextBoxFontSizeTextBox.Text, "^[0-9]*$")) { - var fontSize = int.Parse(_canvasTextBoxFontSizeTextBox.Text); + var fontSize = int.Parse((_canvasTextBoxFontSizeTextBox.SelectedItem as ComboBoxItem).Content.ToString()); _lastValidTextFontSizeValue = fontSize; } @@ -93,7 +93,7 @@ private void CanvasTextBoxItalicButton_Clicked(object sender, RoutedEventArgs e) } } - private void CanvasTextBoxFontSizeTextBox_TextChanged(object sender, TextChangedEventArgs e) + private void CanvasTextBoxFontSizeTextBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { _canvasTextBox.UpdateFontSize(TextFontSize); if (SelectedTextDrawable != null) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs index c2c80be3b4f..e5d630f1823 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs @@ -71,7 +71,7 @@ public partial class InfiniteCanvas : Control private StackPanel _canvasTextBoxTools; private ColorPicker _canvasTextBoxColorPicker; - private TextBox _canvasTextBoxFontSizeTextBox; + private ComboBox _canvasTextBoxFontSizeTextBox; private ToggleButton _canvasTextBoxItalicButton; private ToggleButton _canvasTextBoxBoldButton; private Button _undoButton; @@ -202,7 +202,7 @@ protected override void OnApplyTemplate() { _canvasTextBoxTools = (StackPanel)GetTemplateChild(CanvasTextBoxToolsName); _canvasTextBoxColorPicker = (ColorPicker)GetTemplateChild(CanvasTextBoxColorPickerName); - _canvasTextBoxFontSizeTextBox = (TextBox)GetTemplateChild(CanvasTextBoxFontSizeTextBoxName); + _canvasTextBoxFontSizeTextBox = (ComboBox)GetTemplateChild(CanvasTextBoxFontSizeTextBoxName); _canvasTextBoxItalicButton = (ToggleButton)GetTemplateChild(CanvasTextBoxItalicButtonName); _canvasTextBoxBoldButton = (ToggleButton)GetTemplateChild(CanvasTextBoxBoldButtonName); _drawingSurfaceRenderer = (InfiniteCanvasVirtualDrawingSurface)GetTemplateChild(DrawingSurfaceRendererName); @@ -240,7 +240,7 @@ protected override void OnApplyTemplate() private void UnRegisterEvents() { - _canvasTextBoxFontSizeTextBox.TextChanged -= CanvasTextBoxFontSizeTextBox_TextChanged; + _canvasTextBoxFontSizeTextBox.SelectionChanged -= CanvasTextBoxFontSizeTextBox_SelectionChanged; _canvasTextBoxItalicButton.Click -= CanvasTextBoxItalicButton_Clicked; _canvasTextBoxBoldButton.Click -= CanvasTextBoxBoldButton_Clicked; _canvasTextBoxColorPicker.ColorChanged -= CanvasTextBoxColorPicker_ColorChanged; @@ -264,7 +264,7 @@ private void UnRegisterEvents() private void RegisterEvents() { - _canvasTextBoxFontSizeTextBox.TextChanged += CanvasTextBoxFontSizeTextBox_TextChanged; + _canvasTextBoxFontSizeTextBox.SelectionChanged += CanvasTextBoxFontSizeTextBox_SelectionChanged; _canvasTextBoxItalicButton.Click += CanvasTextBoxItalicButton_Clicked; _canvasTextBoxBoldButton.Click += CanvasTextBoxBoldButton_Clicked; _canvasTextBoxColorPicker.ColorChanged += CanvasTextBoxColorPicker_ColorChanged; diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml index 9d78d87c390..af209614f72 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml @@ -96,13 +96,36 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + From aac18f9e13ac4404f22c7773e1b53908834e1b6e Mon Sep 17 00:00:00 2001 From: SalmanMKC <13schishti@gmail.com> Date: Wed, 1 Apr 2020 16:58:50 +0100 Subject: [PATCH 5/8] capitalisation corrections --- .../InfiniteCanvas/InfiniteCanvas.TextBox.cs | 12 ++++++------ .../InfiniteCanvas/InfiniteCanvas.cs | 16 ++++++++-------- .../InfiniteCanvas/InfiniteCanvas.xaml | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs index 46ade5ff03d..592a56797e7 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.TextBox.cs @@ -41,10 +41,10 @@ private int TextFontSize { get { - if (!string.IsNullOrWhiteSpace(_canvasTextBoxFontSizeTextBox.SelectedValue.ToString()) && - Regex.IsMatch(_canvasTextBoxFontSizeTextBox.Text, "^[0-9]*$")) + if (!string.IsNullOrWhiteSpace(_canvasComboBoxFontSizeTextBox.SelectedValue.ToString()) && + Regex.IsMatch(_canvasComboBoxFontSizeTextBox.Text, "^[0-9]*$")) { - var fontSize = int.Parse((_canvasTextBoxFontSizeTextBox.SelectedItem as ComboBoxItem).Content.ToString()); + var fontSize = int.Parse((_canvasComboBoxFontSizeTextBox.SelectedItem as ComboBoxItem).Content.ToString()); _lastValidTextFontSizeValue = fontSize; } @@ -93,7 +93,7 @@ private void CanvasTextBoxItalicButton_Clicked(object sender, RoutedEventArgs e) } } - private void CanvasTextBoxFontSizeTextBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void CanvasComboBoxFontSizeTextBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { _canvasTextBox.UpdateFontSize(TextFontSize); if (SelectedTextDrawable != null) @@ -185,7 +185,7 @@ private void InkScrollViewer_PointerPressed(object sender, PointerRoutedEventArg // Updating toolbar _canvasTextBoxColorPicker.Color = SelectedTextDrawable.TextColor; - _canvasTextBoxFontSizeTextBox.Text = SelectedTextDrawable.FontSize.ToString(); + _canvasComboBoxFontSizeTextBox.Text = SelectedTextDrawable.FontSize.ToString(); _canvasTextBoxBoldButton.IsChecked = SelectedTextDrawable.IsBold; _canvasTextBoxItalicButton.IsChecked = SelectedTextDrawable.IsItalic; @@ -210,7 +210,7 @@ private void ClearTextBoxValue() _canvasTextBox.Clear(); } - private void CanvasTextBoxFontSizeTextBox_PreviewKeyDown(object sender, KeyRoutedEventArgs e) + private void CanvasComboBoxFontSizeTextBox_PreviewKeyDown(object sender, KeyRoutedEventArgs e) { if (_allowedCommands.Contains(e.Key.ToString())) { diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs index e5d630f1823..40aa481758a 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.cs @@ -21,7 +21,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls /// [TemplatePart(Name = CanvasTextBoxToolsName, Type = typeof(StackPanel))] [TemplatePart(Name = CanvasTextBoxColorPickerName, Type = typeof(ColorPicker))] - [TemplatePart(Name = CanvasTextBoxFontSizeTextBoxName, Type = typeof(TextBox))] + [TemplatePart(Name = CanvasComboBoxFontSizeTextBoxName, Type = typeof(TextBox))] [TemplatePart(Name = CanvasTextBoxItalicButtonName, Type = typeof(ToggleButton))] [TemplatePart(Name = CanvasTextBoxBoldButtonName, Type = typeof(ToggleButton))] [TemplatePart(Name = DrawingSurfaceRendererName, Type = typeof(InfiniteCanvasVirtualDrawingSurface))] @@ -45,7 +45,7 @@ public partial class InfiniteCanvas : Control private const string CanvasTextBoxToolsName = "CanvasTextBoxTools"; private const string CanvasTextBoxColorPickerName = "CanvasTextBoxColorPicker"; - private const string CanvasTextBoxFontSizeTextBoxName = "CanvasTextBoxFontSizeTextBox"; + private const string CanvasComboBoxFontSizeTextBoxName = "CanvasComboBoxFontSizeTextBox"; private const string CanvasTextBoxItalicButtonName = "CanvasTextBoxItalicButton"; private const string CanvasTextBoxBoldButtonName = "CanvasTextBoxBoldButton"; private const string DrawingSurfaceRendererName = "DrawingSurfaceRenderer"; @@ -71,7 +71,7 @@ public partial class InfiniteCanvas : Control private StackPanel _canvasTextBoxTools; private ColorPicker _canvasTextBoxColorPicker; - private ComboBox _canvasTextBoxFontSizeTextBox; + private ComboBox _canvasComboBoxFontSizeTextBox; private ToggleButton _canvasTextBoxItalicButton; private ToggleButton _canvasTextBoxBoldButton; private Button _undoButton; @@ -202,7 +202,7 @@ protected override void OnApplyTemplate() { _canvasTextBoxTools = (StackPanel)GetTemplateChild(CanvasTextBoxToolsName); _canvasTextBoxColorPicker = (ColorPicker)GetTemplateChild(CanvasTextBoxColorPickerName); - _canvasTextBoxFontSizeTextBox = (ComboBox)GetTemplateChild(CanvasTextBoxFontSizeTextBoxName); + _canvasComboBoxFontSizeTextBox = (ComboBox)GetTemplateChild(CanvasComboBoxFontSizeTextBoxName); _canvasTextBoxItalicButton = (ToggleButton)GetTemplateChild(CanvasTextBoxItalicButtonName); _canvasTextBoxBoldButton = (ToggleButton)GetTemplateChild(CanvasTextBoxBoldButtonName); _drawingSurfaceRenderer = (InfiniteCanvasVirtualDrawingSurface)GetTemplateChild(DrawingSurfaceRendererName); @@ -240,7 +240,7 @@ protected override void OnApplyTemplate() private void UnRegisterEvents() { - _canvasTextBoxFontSizeTextBox.SelectionChanged -= CanvasTextBoxFontSizeTextBox_SelectionChanged; + _canvasComboBoxFontSizeTextBox.SelectionChanged -= CanvasComboBoxFontSizeTextBox_SelectionChanged; _canvasTextBoxItalicButton.Click -= CanvasTextBoxItalicButton_Clicked; _canvasTextBoxBoldButton.Click -= CanvasTextBoxBoldButton_Clicked; _canvasTextBoxColorPicker.ColorChanged -= CanvasTextBoxColorPicker_ColorChanged; @@ -258,13 +258,13 @@ private void UnRegisterEvents() Unloaded -= InfiniteCanvas_Unloaded; Application.Current.LeavingBackground -= Current_LeavingBackground; _drawingSurfaceRenderer.CommandExecuted -= DrawingSurfaceRenderer_CommandExecuted; - _canvasTextBoxFontSizeTextBox.PreviewKeyDown -= CanvasTextBoxFontSizeTextBox_PreviewKeyDown; + _canvasComboBoxFontSizeTextBox.PreviewKeyDown -= CanvasComboBoxFontSizeTextBox_PreviewKeyDown; Loaded -= InfiniteCanvas_Loaded; } private void RegisterEvents() { - _canvasTextBoxFontSizeTextBox.SelectionChanged += CanvasTextBoxFontSizeTextBox_SelectionChanged; + _canvasComboBoxFontSizeTextBox.SelectionChanged += CanvasComboBoxFontSizeTextBox_SelectionChanged; _canvasTextBoxItalicButton.Click += CanvasTextBoxItalicButton_Clicked; _canvasTextBoxBoldButton.Click += CanvasTextBoxBoldButton_Clicked; _canvasTextBoxColorPicker.ColorChanged += CanvasTextBoxColorPicker_ColorChanged; @@ -282,7 +282,7 @@ private void RegisterEvents() Unloaded += InfiniteCanvas_Unloaded; Application.Current.LeavingBackground += Current_LeavingBackground; _drawingSurfaceRenderer.CommandExecuted += DrawingSurfaceRenderer_CommandExecuted; - _canvasTextBoxFontSizeTextBox.PreviewKeyDown += CanvasTextBoxFontSizeTextBox_PreviewKeyDown; + _canvasComboBoxFontSizeTextBox.PreviewKeyDown += CanvasComboBoxFontSizeTextBox_PreviewKeyDown; Loaded += InfiniteCanvas_Loaded; } diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml index af209614f72..f112b9d8d94 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml @@ -97,7 +97,7 @@ - From 6c6c04489131e1a8dd333477ae4179188339e146 Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti <13schishti@gmail.com> Date: Wed, 1 Apr 2020 17:10:59 +0100 Subject: [PATCH 6/8] Update Microsoft.Toolkit.Uwp.Connectivity.csproj --- .../Microsoft.Toolkit.Uwp.Connectivity.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj b/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj index 159f75b72ec..e1a7784b70c 100644 --- a/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj +++ b/Microsoft.Toolkit.Uwp.Connectivity/Microsoft.Toolkit.Uwp.Connectivity.csproj @@ -3,7 +3,7 @@ uap10.0.16299 Windows Community Toolkit Devices - This library enables easdfdsfaasier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers. + This library enables easier consumption of connectivity Devices/Peripherals and handle its connection to Windows devices. It contains BluetoothLE and Network connectivity helpers. UWP Toolkit Windows Devices Bluetooth BluetoothLE BLE Networking From 6a8630a2e94151aef7eb8dae6ee67a59cb049358 Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti <13schishti@gmail.com> Date: Thu, 9 Apr 2020 00:26:00 +0100 Subject: [PATCH 7/8] removed duplicate 48 size font --- .../InfiniteCanvas/InfiniteCanvas.xaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml index f112b9d8d94..40d8c83571b 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml @@ -117,7 +117,6 @@ - From 096a49c9f2a3e8702cbc8cbbb09627127b958b82 Mon Sep 17 00:00:00 2001 From: Salman Muin Kayser Chishti <13schishti@gmail.com> Date: Fri, 11 Sep 2020 13:44:14 +0100 Subject: [PATCH 8/8] Update Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com> --- .../InfiniteCanvas/InfiniteCanvas.xaml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml index 40d8c83571b..4767685ce06 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml @@ -103,27 +103,19 @@ - + + - - - - - - - - -