Ales Sturala

1) Is it possible to hide Title text and Icon in my Window I want it visible in Tasmanager but not in Window caption bar. Is there some property (bool)IconVisible like in WinForms

2) How to Clear Focus on TextBox When my TextBox is Focused, I want to programaticaly remove that focus, is it posible There is only LostFocus event, I am looking for some method to clear focus.




Re: Windows Presentation Foundation (WPF) 2 questions on WPF

Eddie Li

(1) There is no property on Window object that allows you to hide the icon and title text only. You can remove the caption bar entirely by setting WindowStyle=None, but that would also remove the system buttons (min/max/close). You can create them by yourself via simple buttons and hook them up their functionlitys via WindowState property and Close mehtod.

(2) Maybe you can try to set focus on another controls (such as a button) or the Window object in your app inside the GotFocus event






Re: Windows Presentation Foundation (WPF) 2 questions on WPF

ZiggyShort

If you do set WindowStyle=None, how can you move the window on the screen

To move a window you normally have to grab the Title Bar.





Re: Windows Presentation Foundation (WPF) 2 questions on WPF

Moon Flower

1) I think this can help you:

http://blogs.msdn.com/wpfsdk/archive/2007/08/02/a-wpf-window-without-an-window-icon-the-thing-you-click-to-get-the-system-menu.aspx