„StyleFunctions/Textbox_Hint_Text.cs“ hinzufügen
This commit is contained in:
parent
eb429dadfe
commit
fd7982c974
18
StyleFunctions/Textbox_Hint_Text.cs
Normal file
18
StyleFunctions/Textbox_Hint_Text.cs
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user