WindowStateChange event for the ToolWindow or DockingWindow

Docking/MDI for WPF Forum

Posted 12 years ago by keshav bansal
Version: 11.2.0554
Avatar

Hi,

How to get the WindowStateChange event for the ToolWindow or DockingWindow .

For Example: My sample application consists of two toolwindows(toolwindow1,toolwindow2) and as float the toolwindow1 from the sample application then i should get the notification that my toolwindow1 state has been chaged to float state.and again  dock the floated  toolwindow1 into the sample application then i should get the notification that my toolwindow1 state has been chaged to docked.

My requirement is like

1. As i float the toolwindow1,titlebar for that toolwindow1 should be hidden .

2. As i dock that floated  toolwindow1, titlebar for that toolwindow1 should be visible.

Comments (1)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Keshav,

You can hook into the DockSite.WindowStateChanged event to determine when the window's state changes, but this is probably overkill for what you want. You can simply use an implicit Style in your application resources, like so:

<Style TargetType="docking:ToolWindow">
	<Style.Triggers>
		<Trigger Property="State" Value="Floating">
			<Setter Property="HasTitleBar" Value="False" />
		</Trigger>
	</Style.Triggers>
</Style>


Actipro Software Support

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.