0

I want to give one AvalonDock tab item a different color.

I've tried editing the theme and I've tried to find a property on the DockManager that might expose the TabItems but to no avail.

Laila
  • 53
  • 4

1 Answers1

1

I think you want to edit the LayoutDocumentTabItem or LayoutAnchorableTabItem style. You can get the original styles from the repository: wpftoolkit/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.AvalonDock/Themes/generic.xaml

Just modify them. To change the color of a single particular tab you have to trigger on the appropriate property of your view model. You get access to your ViewModel when in scope of those styles by following this data path in your bindings:

Path=LayoutItem.Model.(xcad:LayoutDocument.Content).(viewModels:YourViewModel.Property)

Good luck.

BionicCode
  • 1
  • 4
  • 28
  • 44
  • Thanks I got i t to work, mostly by binding to `Content.TitleBrush` and all sorts of variants of that :-) (where `TitleBrush` is a property on my viewmodel) – Laila Dec 31 '18 at 11:08