diff --git a/dev/DevWinUI.Controls/Controls/TextBox.cs b/dev/DevWinUI.Controls/Controls/TextBox.cs
new file mode 100644
index 00000000..556e6c3f
--- /dev/null
+++ b/dev/DevWinUI.Controls/Controls/TextBox.cs
@@ -0,0 +1,44 @@
+using Microsoft.UI.Input;
+using Microsoft.UI.Xaml.Markup;
+
+namespace DevWinUI;
+
+[ContentProperty(Name = nameof(Content))]
+public partial class TextBox : Microsoft.UI.Xaml.Controls.TextBox
+{
+ public object Content
+ {
+ get { return (object)GetValue(ContentProperty); }
+ set { SetValue(ContentProperty, value); }
+ }
+
+ public static readonly DependencyProperty ContentProperty =
+ DependencyProperty.Register(nameof(Content), typeof(object), typeof(TextBox), new PropertyMetadata(null, OnContentChanged));
+
+ private static void OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var ctl = (TextBox)d;
+ if (ctl != null )
+ {
+ ctl.UpdateCursor();
+ }
+ }
+
+ private void UpdateCursor()
+ {
+ if (Content != null)
+ {
+ if (Content is Button button)
+ {
+ GeneralHelper.ChangeCursor(button, InputSystemCursor.Create(InputSystemCursorShape.Arrow));
+ }
+ else if (Content is Panel panel)
+ {
+ foreach (var item in panel.Children)
+ {
+ GeneralHelper.ChangeCursor(item, InputSystemCursor.Create(InputSystemCursorShape.Arrow));
+ }
+ }
+ }
+ }
+}
diff --git a/dev/DevWinUI.Controls/Themes/Generic.xaml b/dev/DevWinUI.Controls/Themes/Generic.xaml
index b773647f..1f8b17bf 100644
--- a/dev/DevWinUI.Controls/Themes/Generic.xaml
+++ b/dev/DevWinUI.Controls/Themes/Generic.xaml
@@ -33,6 +33,7 @@ Themes\Styles\Controls\SelectorBarSegmented.xaml
Themes\Styles\Controls\SettingsGroup.xaml
Themes\Styles\Controls\Shield.xaml
Themes\Styles\Controls\SimpleSettingsGroup.xaml
+Themes\Styles\Controls\TextBox.xaml
Themes\Styles\Controls\Validation.xaml
Themes\Styles\Controls\WaveProgressBar.xaml
Themes\Styles\Converters.xaml
@@ -276,6 +277,61 @@ Themes\Styles\Win2D\Watermark.xaml
+
@@ -3940,6 +3996,181 @@ Themes\Styles\Win2D\Watermark.xaml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Visible
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Visible
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/DevWinUI.Gallery/Assets/Fluent/TokenizingTextBox.png b/dev/DevWinUI.Gallery/Assets/Fluent/TokenizingTextBox.png
new file mode 100644
index 00000000..91dd78f9
Binary files /dev/null and b/dev/DevWinUI.Gallery/Assets/Fluent/TokenizingTextBox.png differ
diff --git a/dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json b/dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json
index acfeff9c..f6713dfd 100644
--- a/dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json
+++ b/dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json
@@ -23,28 +23,24 @@
"UniqueId": "DevWinUIGallery.Views.TiledImageBrushPage",
"Title": "TiledImageBrush",
"Subtitle": "TiledImageBrush",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/watermark.png"
},
{
"UniqueId": "DevWinUIGallery.Views.OutlineTextControlPage",
"Title": "OutlineTextControl",
"Subtitle": "OutlineTextControl",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/frame.png"
},
{
"UniqueId": "DevWinUIGallery.Views.WatermarkPage",
"Title": "Watermark",
"Subtitle": "Watermark a Text or Image",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/watermark.png"
},
{
"UniqueId": "DevWinUIGallery.Views.BlurAnimationPage",
"Title": "Blur Animation Helper",
"Subtitle": "Blur Animation Helper",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/backdrop.png"
},
{
@@ -63,7 +59,6 @@
"UniqueId": "DevWinUIGallery.Views.TextBlockStrokeViewPage",
"Title": "TextBlock Stroke View",
"Subtitle": "TextBlock Stroke View",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/autoSuggestBox.png"
},
{
@@ -99,6 +94,13 @@
"ImagePath": "ms-appx:///Assets/icon.png",
"IsSpecialSection": false,
"Items": [
+ {
+ "UniqueId": "DevWinUIGallery.Views.TextBoxPage",
+ "Title": "TextBox",
+ "Subtitle": "TextBox with Content",
+ "IsNew": true,
+ "ImagePath": "ms-appx:///Assets/Fluent/TokenizingTextBox.png"
+ },
{
"UniqueId": "DevWinUIGallery.Views.TileControlPage",
"Title": "TileControl",
@@ -124,91 +126,78 @@
"UniqueId": "DevWinUIGallery.Views.ColorfulShimmingEffectPage",
"Title": "ColorfulShimmingEffect",
"Subtitle": "ColorfulShimmingEffect",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/morph.png"
},
{
"UniqueId": "DevWinUIGallery.Views.LongShadowTextBlockPage",
"Title": "LongShadowTextBlock",
"Subtitle": "LongShadowTextBlock",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/morph.png"
},
{
"UniqueId": "DevWinUIGallery.Views.CredentialHelperPage",
"Title": "CredentialHelper",
"Subtitle": "CredentialHelper",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/contentDialog.png"
},
{
"UniqueId": "DevWinUIGallery.Views.CompositionHelperPage",
"Title": "CompositionHelper",
"Subtitle": "CompositionHelper",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/backdrop.png"
},
{
"UniqueId": "DevWinUIGallery.Views.FlipSidePage",
"Title": "FlipSide",
"Subtitle": "FlipSide",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/autoScrollView.png"
},
{
"UniqueId": "DevWinUIGallery.Views.PagerControlPage",
"Title": "PagerControl",
"Subtitle": "PagerControl",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/pagerControl.png"
},
{
"UniqueId": "DevWinUIGallery.Views.AutoScrollViewPage",
"Title": "AutoScrollView",
"Subtitle": "AutoScrollView",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/autoScrollView.png"
},
{
"UniqueId": "DevWinUIGallery.Views.OpacityMaskViewPage",
"Title": "OpacityMaskView",
"Subtitle": "OpacityMaskView",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/backdrop.png"
},
{
"UniqueId": "DevWinUIGallery.Views.ProgressBarPage",
"Title": "Progress",
"Subtitle": "ProgressRing, WaveProgressBar",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/progressBar.png"
},
{
"UniqueId": "DevWinUIGallery.Views.DividerPage",
"Title": "Divider",
"Subtitle": "Divider",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/divider.png"
},
{
"UniqueId": "DevWinUIGallery.Views.ShieldPage",
"Title": "Shield",
"Subtitle": "Shield",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/shield.png"
},
{
"UniqueId": "DevWinUIGallery.Views.GravatarPage",
"Title": "Gravatar",
"Subtitle": "Gravatar",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/gravatar.png"
},
{
"UniqueId": "DevWinUIGallery.Views.GrowlPage",
"Title": "Growl",
"Subtitle": "Growl",
- "IsNew": true,
"ImagePath": "ms-appx:///Assets/Fluent/frame.png"
},
{
diff --git a/dev/DevWinUI.Gallery/ControlPagesSampleCode/Features/TextBox/TextBoxPage_Part1_xaml.txt b/dev/DevWinUI.Gallery/ControlPagesSampleCode/Features/TextBox/TextBoxPage_Part1_xaml.txt
new file mode 100644
index 00000000..3e913d3b
--- /dev/null
+++ b/dev/DevWinUI.Gallery/ControlPagesSampleCode/Features/TextBox/TextBoxPage_Part1_xaml.txt
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/dev/DevWinUI.Gallery/ControlPagesSampleCode/Features/TextBox/TextBoxPage_Part2_xaml.txt b/dev/DevWinUI.Gallery/ControlPagesSampleCode/Features/TextBox/TextBoxPage_Part2_xaml.txt
new file mode 100644
index 00000000..1e83b7a1
--- /dev/null
+++ b/dev/DevWinUI.Gallery/ControlPagesSampleCode/Features/TextBox/TextBoxPage_Part2_xaml.txt
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
diff --git a/dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs b/dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs
index 523305db..21603850 100644
--- a/dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs
+++ b/dev/DevWinUI.Gallery/T4Templates/NavigationPageMappings.cs
@@ -25,6 +25,7 @@ public partial class NavigationPageMappings
{"DevWinUIGallery.Views.WaveCirclePage", typeof(DevWinUIGallery.Views.WaveCirclePage)},
{"DevWinUIGallery.Views.BubblePage", typeof(DevWinUIGallery.Views.BubblePage)},
{"DevWinUIGallery.Views.GooeyPage", typeof(DevWinUIGallery.Views.GooeyPage)},
+ {"DevWinUIGallery.Views.TextBoxPage", typeof(DevWinUIGallery.Views.TextBoxPage)},
{"DevWinUIGallery.Views.TileControlPage", typeof(DevWinUIGallery.Views.TileControlPage)},
{"DevWinUIGallery.Views.PinBoxPage", typeof(DevWinUIGallery.Views.PinBoxPage)},
{"DevWinUIGallery.Views.SelectorBarSegmentedPage", typeof(DevWinUIGallery.Views.SelectorBarSegmentedPage)},
diff --git a/dev/DevWinUI.Gallery/Views/Pages/Features/TextBoxPage.xaml b/dev/DevWinUI.Gallery/Views/Pages/Features/TextBoxPage.xaml
new file mode 100644
index 00000000..0221d0cf
--- /dev/null
+++ b/dev/DevWinUI.Gallery/Views/Pages/Features/TextBoxPage.xaml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dev/DevWinUI.Gallery/Views/Pages/Features/TextBoxPage.xaml.cs b/dev/DevWinUI.Gallery/Views/Pages/Features/TextBoxPage.xaml.cs
new file mode 100644
index 00000000..39a29b1f
--- /dev/null
+++ b/dev/DevWinUI.Gallery/Views/Pages/Features/TextBoxPage.xaml.cs
@@ -0,0 +1,8 @@
+namespace DevWinUIGallery.Views;
+public sealed partial class TextBoxPage : Page
+{
+ public TextBoxPage()
+ {
+ this.InitializeComponent();
+ }
+}