Posted 9 years ago
by Valéry Sablonnière
-
Staubli
Version: 15.1.0623
Platform: .NET 4.5
Environment: Windows 8 (64-bit)
Hi,
I have an issue when the focus is in a floating document window, if I call the Activate method of an auto-hide tool window, the tool window is not activated.
Here is the code to reproduce it:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking" x:Class="ActivationIssue.MainWindow"
Title="MainWindow" Height="350" Width="525">
<docking:DockSite CanDocumentWindowsRaft="True"
UseHostedAutoHidePopups="False" UseHostedDockGuides="False" UseHostedRaftingWindows="False" IsLiveSplittingEnabled="False">
<docking:SplitContainer>
<docking:Workspace>
<docking:TabbedMdiHost docking:Workspace.MdiTypeKey="{x:Type docking:TabbedMdiHost}">
<docking:TabbedMdiContainer>
<docking:DocumentWindow x:Name="DocumentWindow1" Title="My Document">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBox />
<Button Grid.Row="1" Content="Activate ToolWindow" Click="ButtonBase_OnClick" />
</Grid>
</docking:DocumentWindow>
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
<docking:ToolWindowContainer RenderTransformOrigin="0.5,0.5">
<docking:ToolWindow x:Name="ToolWindow1" Title="Tool Window 1">
<TreeView x:Name="TreeView" />
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
</docking:DockSite>
</Window>
code-behind:
using System.Windows;
namespace ActivationIssue
{
public partial class MainWindow
{
public MainWindow()
{
InitializeComponent();
DocumentWindow1.Float();
ToolWindow1.AutoHide();
}
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
ToolWindow1.Activate(true);
}
}
}
Click on the button and... nothing happens !!
Sometimes even if you click on the ToolWindow tiotle bar, the tool window is not opened.
Best regards,