How to hide CloseButton on outer shell (?)

Aug 6, 2014 at 1:53 AM
Edited Aug 13, 2014 at 1:03 AM
This is WRT the Workplace theme. How can I hide the top, left close button? This is the close button in the outmost shell, I presume. I've tried various things and looking in source and resources to no avail. TIA.

ETA screenshot:

Image
Developer
Aug 6, 2014 at 1:50 PM
Hello Nancy,
I believe the code you are looking for is on line 26 of the Worplace-Shell.xaml file.
<mvvm:ViewActionStackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Stretch"
                     Model="{Binding}"
                     SelectedView="{Binding Path=SelectedItem, ElementName=OpenViews, Mode=OneWay}" />
I don't have a project I can run at the moment, but it looks like that is the code responsible for displaying the actions on the top header. If you bring in the Workplace-Shell.xaml file into your project, modify it, and make sure it is loaded you should be able to remove the top actions listing.

Jeff
Marked as answer by NancyFolsom on 8/12/2014 at 5:10 PM
Coordinator
Aug 11, 2014 at 4:07 PM
Actually, slight correction: This view action stack panel is for pinned actions of the currently open view. The close button is on line 36:
<controls:CloseButton/>
Just remove that line in your version/copy of the shell (you may have to create one if you don't have it already).


Markus
Aug 13, 2014 at 12:07 AM
Edited Aug 13, 2014 at 12:37 AM
(This is a rewrite of what I originally posted, which was just a brain fart due to Seattle heat wave.)

That's not the the close button I'm talking about. It's the one in the upper left corner, not the standard "x" close button next to the minimize, maximize buttons on the right. But, at least I was looking in the right place. I think there's another likely candidate I found. I'll look some more.
Aug 13, 2014 at 1:10 AM
Thanks, Jeff. That was the one I wanted to hide!