Articles in this section
Category / Section

What is the purpose of the IsEnableHotTracking property of the DockingManager?

1 min read

The IsEnableHotTracking property is a Boolean property that is used to enable and disable the MouseHover style that gives you different backgrounds for the selected DockPanel Header in the DockingManager.

When the IsEnableHotTracking property is set to True, the MouseHover Style is enabled for the selected DockPanel Header in the DockingManager.

When the IsEnableHotTracking property is set to False, the MouseHover Style is disabled for the selected DockPanel Header in the DockingManager.

The following is an example to show how the IsEnableHotTracking property of DockingManager enables and disables the MouseHover Style for the selected DockPanel Header using the Metro theme.

The following code example sets the IsEnableHotTracking property to True to enable the MouseHover Style for selected DockPanel Header of the DockingManager.

XAML

//Code used to explain how to set the IsEnableHotTracking Property for the DockingManager as true.
 <Window x:Class="DockingManager_IsEnabled.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        Title="MainWindow" Height="350" Width="400"
        syncfusion:SkinStorage.VisualStyle="Metro" >
    <Grid Name="Grid1">
      <syncfusion:DockingManager x:Name="dockingManager" HeaderMouseOverBackground="Brown" IsEnableHotTracking="True" UseDocumentContainer="True" >
               <ListBox BorderThickness="0" Name="ListBox1"
                     syncfusion:DockingManager.SideInDockedMode="Left"
                     syncfusion:DockingManager.State="Dock"
                     syncfusion:DockingManager.Header="Dock1"
                     syncfusion:DockingManager.DesiredWidthInDockedMode="200" >
          <ListBoxItem Margin="2,2,2,2">ListBox1</ListBoxItem>
        </ListBox>
     <ListBox BorderThickness="0" Name="ListBox2"         
                     syncfusion:DockingManager.SideInDockedMode="Right" 
                     syncfusion:DockingManager.State="Dock"
                     syncfusion:DockingManager.DesiredWidthInDockedMode="200"
                     syncfusion:DockingManager.TargetNameInDockedMode="ListBox1"
                     syncfusion:DockingManager.Header="Dock2" >
          <ListBoxItem Margin="2,2,2,2">ListBox2</ListBoxItem>
        </ListBox>
      </syncfusion:DockingManager>      
    </Grid>
</Window>

C#

//Code describes how to set the IsEnableHotTracking property for the DockingManager as True. 
using Syncfusion.Windows.Tools.Controls;
namespace DockingManager_IsEnabled
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml.
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            SkinStorage.SetVisualStyle(this, "Metro");
            DockingManager dockingManager = new DockingManager();
//Code shows the IsEnableHotTracking property set to true for the DockingManager
            dockingManager.IsEnableHotTracking = true;
            dockingManager.HeaderMouseOverBackground = Brushes.Brown;
            dockingManager.UseDocumentContainer = true;
            ListBox ListBox1 = new ListBox();
            DockingManager.SetHeader(ListBox1, "Dock1");
            DockingManager.SetState(ListBox1, DockState.Dock);
            DockingManager.SetSideInDockedMode(ListBox1, DockSide.Left);
            DockingManager.SetDesiredWidthInDockedMode(ListBox1, 200);
            ListBoxItem ListBoxItem1 = new ListBoxItem();
            ListBoxItem1.Margin = new Thickness(2, 2, 2, 2);
            ListBoxItem1.Content = "ListBox1";
            ListBox1.Items.Add(ListBoxItem1);
            ListBox ListBox2 = new ListBox();
            DockingManager.SetHeader(ListBox2, "Dock2");
            DockingManager.SetSideInDockedMode(ListBox1, DockSide.Left);
            DockingManager.SetTargetNameInDockedMode(ListBox2, "ListBox1");
            DockingManager.SetState(ListBox1, DockState.Dock);
            DockingManager.SetDesiredWidthInDockedMode(ListBox2, 200);
            ListBoxItem ListBoxItem2 = new ListBoxItem();
            ListBoxItem2.Margin = new Thickness(2, 2, 2, 2);
            ListBoxItem2.Content = "ListBox2";
            ListBox2.Items.Add(ListBoxItem2);
            dockingManager.Children.Add(ListBox1);
            dockingManager.Children.Add(ListBox2);
            Grid1.Children.Add(dockingManager);
                  }
    }
}

Output

The following output shows how the MouseHover Style enable for the selected DockPanel Header of the DockingManager, when the IsEnableHotTrackingProperty is set to True.

 

Figure 1: IsEnableHotTrackingProperty set as True

The following code example is to set the IsEnableHotTracking property as False, to disable the MouseHover Style for selected DockPanel Header of the DockingManager:

XAML

//Code describes how to set the IsEnableHotTracking property for the DockingManager as False.
<Window x:Class="DockingManager_IsEnabled.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        Title="MainWindow" Height="350" Width="400"
        syncfusion:SkinStorage.VisualStyle="Metro" >
    <Grid Name="Grid1">
      <syncfusion:DockingManager x:Name="dockingManager" HeaderMouseOverBackground="Brown" IsEnableHotTracking="False" UseDocumentContainer="True" >
               <ListBox BorderThickness="0" Name="ListBox1"
                     syncfusion:DockingManager.SideInDockedMode="Left"
                     syncfusion:DockingManager.State="Dock"
                     syncfusion:DockingManager.Header="Dock1"
                     syncfusion:DockingManager.DesiredWidthInDockedMode="200" >
          <ListBoxItem Margin="2,2,2,2">ListBox1</ListBoxItem>
        </ListBox>
        <ListBox BorderThickness="0" Name="ListBox2"                                                 
                     syncfusion:DockingManager.State="Dock"
                     syncfusion:DockingManager.DesiredWidthInDockedMode="200"
                     syncfusion:DockingManager.TargetNameInDockedMode="ListBox1"
                     syncfusion:DockingManager.SideInDockedMode="Right"                         
                     syncfusion:DockingManager.Header="Dock2" >
          <ListBoxItem Margin="2,2,2,2">ListBox2</ListBoxItem>
        </ListBox>
      </syncfusion:DockingManager>
    </Grid>
</Window>             

C#

//Code describes how to set the IsEnableHotTracking property for the DockingManager as false.
using Syncfusion.Windows.Tools.Controls;
namespace DockingManager_IsEnabled
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml.
    /// </summary>
    public partial class MainWindow : Window
    {
     public MainWindow()
        {
           InitializeComponent();
            SkinStorage.SetVisualStyle(this, "Metro");
            DockingManager dockingManager = new DockingManager();
//Code shows the IsEnableHotTracking property set to false for the DockingManager
            dockingManager.IsEnableHotTracking = false;
            dockingManager.HeaderMouseOverBackground = Brushes.Brown;
            dockingManager.UseDocumentContainer = true;
            ListBox ListBox1 = new ListBox();
            DockingManager.SetHeader(ListBox1, "Dock1");
            DockingManager.SetState(ListBox1, DockState.Dock);
            DockingManager.SetSideInDockedMode(ListBox1, DockSide.Left);
            DockingManager.SetDesiredWidthInDockedMode(ListBox1, 200);
            ListBoxItem ListBoxItem1 = new ListBoxItem();
            ListBoxItem1.Margin = new Thickness(2, 2, 2, 2);
            ListBoxItem1.Content = "ListBox1";
            ListBox1.Items.Add(ListBoxItem1);
            ListBox ListBox2 = new ListBox();
            DockingManager.SetHeader(ListBox2, "Dock2");
            DockingManager.SetSideInDockedMode(ListBox2, DockSide.Left);
            DockingManager.SetTargetNameInDockedMode(ListBox2, "ListBox1");
            DockingManager.SetState(ListBox1, DockState.Dock);
            DockingManager.SetDesiredWidthInDockedMode(ListBox2, 200);
            ListBoxItem ListBoxItem2 = new ListBoxItem();
            ListBoxItem2.Margin = new Thickness(2, 2, 2, 2);
            ListBoxItem2.Content = "ListBox2";
            ListBox2.Items.Add(ListBoxItem2);
            dockingManager.Children.Add(ListBox1);
            dockingManager.Children.Add(ListBox2);
            Grid1.Children.Add(dockingManager); 
} 
 }
}   

Output

The following output shows how the MouseHover Style is disabled for the selected DockPanel Header of the DockingManager when the IsEnableHotTracking property is set as False.

 

Figure 2: IsEnableHotTrackingProperty set as False

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied