How do you implement default text for a search box in WPF?

后端 未结 6 854
醉话见心
醉话见心 2021-01-05 07:09

I want to implement something exactly like \"Changing the Default Text in the Search Box\" for a WPF search TextBox. The box should show some greyed out \"Search..\" text wh

6条回答
  •  孤城傲影
    2021-01-05 07:48

    This style will show text using a the background property and a visualbrush. Once control gets focus the text is removed.

        
                
            
    

提交回复
热议问题