Update SearchBar.cs

This commit is contained in:
NaBian authored and GitHub committed 2019-03-07 10:31:34 +08:00
1 parent 411541d578
commit 56cccc2809
1 file changed
+2 -1
+2 -1
View File
@@ -47,6 +47,7 @@ namespace HandyControl.Controls
_textBox = GetTemplateChild(ElementTextBox) as WatermarkTextBox; _textBox = GetTemplateChild(ElementTextBox) as WatermarkTextBox;
if (_textBox != null) if (_textBox != null)
{ {
_textBox.Text = Text;
SetBinding(TextProperty, new Binding(TextProperty.Name) SetBinding(TextProperty, new Binding(TextProperty.Name)
{ {
Source = _textBox, Source = _textBox,
@@ -191,4 +192,4 @@ namespace HandyControl.Controls
return result.Data; return result.Data;
} }
} }
} }