This project is read-only.

DockablePane Buttons / Template Styling

May 14, 2009 at 6:27 PM

I have been trying to remove the close button on a DockablePane. I am using Expression Blend. So I created a copy of the DockablePane template. Then before even trying to remove the button, I run the app. The tack button and docking style buttons no longer respond to a click.

May 16, 2009 at 4:08 PM
Edited May 16, 2009 at 4:11 PM

I had the same issue. The blend template copy seems to remove the command reference for those 2 buttons for some reason. You just need to add the command reference back in i.e.

Button x:Name="btnPinAutoHide" Command="AvalonDock:DockablePane.ToggleAutoHideCommand"

and

Button x:Name="PART_ShowContextMenuButton" Command="AvalonDock:DockablePane.ShowOptionsCommand"

for the buttons in the XAML.

 

 

 

May 27, 2009 at 11:17 PM

Thanks stereocheck!

That fixed some of my problem.

I also had to remove

 

 

<font size="2" color="#0000ff"><font size="2" color="#0000ff">

<

</font></font><font size="2" color="#0000ff">

 

</font>

Button.Command>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

 

<RoutedUICommand Text="S_how options"/>

</Button.Command>

This allowed me to remove the context menu and the close button. But now my problem is when I set the pin to autohide, the flyout pane still has the close and context buttons.

I am not sure if I can style this or not.

Any clue?