Extraneous MouseDown when resizing rafted windows

Docking/MDI for WPF Forum

Posted 9 years ago by John Dunn
Version: 10.1.0521
Platform: .NET 3.5
Environment: Windows 7 (32-bit)
Avatar
When I resize a rafted window which is over top of another Control, the Control below will get a MouseDown when releasing the mouse after resizing the rafted window.

Steps to reproduce
  1. Launch app
  2. Pull off last tab so it's 'rafted'
  3. Move rafted window so right edge of window is over another Canvas contained in the main tab host
  4. Click on the right edge of rafted window and move to the left
  5. Release mouse when still over Canvas below
  6. Canvas will get a MouseDown event and print something to the Console

<Window x:Class="TestApps.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dock="clr-namespace:ActiproSoftware.Windows.Controls.Docking;assembly=ActiproSoftware.Docking.Wpf351"
    Loaded="Window_Loaded"
    Title="Window1" Height="300" Width="300">
  <Grid>
    <dock:DockSite x:Name="_DockSite">
      <dock:Workspace>
        <dock:TabbedMdiHost>
          <dock:TabbedMdiContainer>
          </dock:TabbedMdiContainer>
        </dock:TabbedMdiHost>
      </dock:Workspace>
    </dock:DockSite>
  </Grid>
</Window>
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using ActiproSoftware.Windows.Controls.Docking;

namespace TestApps
{
  public partial class Window1 : Window
  {
    public Window1()
    {
      InitializeComponent();
    }

    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
      for (int ix = 0; ix < 4; ix++)
      {
        Canvas canvas = new Canvas() { Background = Brushes.Chartreuse };
        canvas.MouseDown += (s, e2) => { Console.WriteLine("Canvas Mouse Down"); };
        canvas.MouseUp += (s, e2) => { Console.WriteLine("Canvas Mouse Up"); };
        DocumentWindow doc = new DocumentWindow(_DockSite) { Content = canvas, Header = "test", CanRaft = true };
        doc.Activate();
      }
    }
  }
}

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi John,

Thanks for reporting this and we've corrected the issue for the next maintenance release.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.