How to add UI elements to the tabs of DocumentWindow?

SyntaxEditor for WPF Forum

Posted 7 months ago by Sunshine - Appeon
Version: 22.1.0
Avatar

Hi!

When the document is set to read-only, I want to add a lock mark to the document window tab, how can I achieve this effect?

Comments (4)

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The DocumentWindow.IsReadOnly property can be set to true.  That will show a lock icon.


Actipro Software Support

Posted 7 months ago by Sunshine - Appeon
Avatar

Hi

Can this content be customized?

We want to add some of our own elements to it.

In addition, which property can be set to display the icon of the "Toggle pin status" function of DocumentWindow on the tab?

Posted 7 months ago by Sunshine - Appeon
Avatar

By default, only the right-click tab and select "Pin Tab" will display the pin status on the DocumentWindow tab, and it will disappear after the mouse click is unlocked. I want to display this state on the tab permanently, and the user can click it to switch the state

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

You can add custom context content (e.g. other elements or buttons) in various locations using the features described in this documentation topic.  Some of this is demoed in our Custom Context Content QuickStart.

There isn't anything built-in to always show a pin button on tabbed MDI window tabs.  It only shows the button when the tab is already pinned or in a preview (purple, right-aligned) state.  If you wanted to alter this, you'd need to clone and alter the ControlTemplate used for AdvancedTabItem and put an updated Style with that Template in the TabbedMdiHost.TabItemContainerStyle property.  Since your company licenses WPF Studio, you can download our default styles/templates from your organization account page on our web site.

One thing to note, when you look our default TabbedMdiHost.TabItemContainerStyle Setter.Value in Generic.xaml, you'll see it has a couple Setters on the Style.  You'll need to clone that Style and add a BasedOn to (or at least merged with) another updated clone of the default AdvancedTabItem Style in Generic.xaml.


Actipro Software Support

The latest build of this product (v22.1.3) was released 20 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.