C1DockTabControl's MouseDoubleClick event cannot be triggered

Posted by: malishin on 26 April 2020, 6:14 am EST

    • Post Options:
    • Link

    Posted 26 April 2020, 6:14 am EST

    I added a MouseDoubleClick event to a C1DockTabControl in C1DockControl, but when the Dock mode of this C1DockTabControl changes or the layout position changes, the MouseDoubleClick event cannot respond, how can I keep the MouseDoubleClick event always available?

  • Posted 27 April 2020, 9:39 am EST

    Hi,

    When you drag a C1DockTabControl its new instance is created and that instance didn’t have your handler registered to its MouseDoubleClick event.

    Therefore you can alternatively use EventSetter inside xaml to register your event handler as follows:

     <Window.Resources>
          <Style x:Key="DockTabControlDoubleClick" TargetType="c1:C1DockTabControl">
               <EventSetter Event="MouseDoubleClick" Handler="dockTabControl1_MouseDoubleClick"></EventSetter>
          </Style>
    </Window.Resources>
    
    <c1:C1DockTabControl x:Name="dockTabControl1" Style="{StaticResource DockTabControlDoubleClick}">
         <c1:C1DockTabItem Header="Tab 1">
               <TextBlock FontSize="30" Margin="10" Text="70% Width"></TextBlock>
         </c1:C1DockTabItem>
    </c1:C1DockTabControl>
    
    

    I hope it helped.

    Regards,

    Basant

  • Posted 28 April 2020, 9:32 pm EST

    Thanks, it works well

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels