Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1590
Hiding docking indicators
posted

Hi, I'm trying to hide docking indicators when it is not possible to dock on a certain side. I started by copying the docking indicators as illustrated in the example "Customizing the DockIndicators" in the feature browser, so the code below closely resembles that. I already partly succeeded, but the center docking indicator is behaving strangely however. It is still showing the docking indicator untill at the moment the mouse enters the symbol, then it disappears. The following piece of code is not working as expected (I left out unimportant pieces):

 <!-- Left Indicator -->
<igWindows:CardPanel x:Name="PART_DockLeft" ...>
 <Grid x:Name="leftIndicatorIcon" IsEnabled="{TemplateBinding CanDockLeft}" ...>
  <Ellipse x:Name="leftIndicatorBorder" ... />
  <Viewbox ...>
   <Path x:Name="glyphLeft" ... />
  </Viewbox>
  <Grid.Style>
   <Style TargetType="Grid">
    <Style.Triggers>
     <DataTrigger Binding="{Binding Path=CanDockLeft, RelativeSource={RelativeSource Mode=TemplatedParent}}" Value="False">
      <Setter Property="Visibility" Value="Collapsed"/>
     </DataTrigger>
    </Style.Triggers>
   </Style>
  </Grid.Style>
 </Grid>
</igWindows:CardPanel>

 So basically I only added the style trigger. I also tried setting the Visibility property directly using a binding and a value converter, but that resulted in the same effect.

Parents
No Data
Reply
  • 12875
    posted

    Hi, 

    I'm not able to see any impact on the any of the docking indicator from the code snippet you provided.  

    Could you please provide an image of what you are seeing?    It would also be helpful if you could explain when “it is not possible to dock on a certain side”. 

    I’m attaching my sample where I have two forms, one is directly taken from the feature browser, the other has docking indicators that are a little less elaborate compared to the feature browser sample and I’ve added color to each indicator so that they are more visible.   I did incorporate the same DockingIndicator style into my sample form so we can work with either that seems most helpful. 

    As I understand what you provided, it looks like you applied the style trigger directly on the PART_DockLeft, which is an element of the centerIndicator controlTemplate.  I believe what you will need to do is add style triggers to the DockingIndicator style. 

    It may be most helpful if you could modify my sample to illustrate what you have done.

    WPF_xamDockManager_dockingIndicators.zip
Children