diff --git a/StyleFunctions/Textbox_Hint_Text.cs b/StyleFunctions/Textbox_Hint_Text.cs new file mode 100644 index 0000000..c101ea6 --- /dev/null +++ b/StyleFunctions/Textbox_Hint_Text.cs @@ -0,0 +1,18 @@ +class Textbox_Hint_Text + { + TextBox textboxs = new TextBox(); + private void textbox_MouseEnter(object sender, MouseEventArgs e) + { + textboxs.Text = ""; + textboxs.Foreground = Brushes.White; + } + + private void textbox_MouseLeave(object sender, MouseEventArgs e) + { + if (textboxs.Text.Length == 0) + { + textboxs.Text = "Search"; + textboxs.Foreground = Brushes.Gray; + } + } + } \ No newline at end of file