Question

How to override brushes

Posted 2 years ago by Avatar Samuele Gantner

Hi,

I spent a couple of hours trying to override some brushes, but with no success...

Here is an example (see the part in bold). What I get is a compilation error: Type 'themes:AssetResourceKeys' was not found.

What's the correct definition?

 

Thanks,
Sam

 

<Window.Resources>

<Style TargetType="{x:Type docking:AutoHideHost}"><Setter Property="Padding" Value="0" /></Style>

<LinearGradientBrush x:Key="{x:Static themes:AssetResourceKeys.TabbedMdiContainerTabItemBackgroundActiveSelectedBrushKey}">

<LinearGradientBrush.GradientStops>

<GradientStopCollection>

<GradientStop Color="#9D9DA1" Offset="0" />

<GradientStop Color="#D9D9E1" Offset="1" />

</GradientStopCollection>

</LinearGradientBrush.GradientStops>

</LinearGradientBrush>

</Window.Resources>

<docking:DockSite x:Name="dockSite" CanDocumentWindowsRaft="True" Padding="0,0,0,1" >

<docking:SplitContainer>

<docking:Workspace >

<docking:TabbedMdiHost IsImageOnTab="true">

<docking:TabbedMdiContainer x:Name="TabsGroup" TabOverflowBehavior="Menu" >

<docking:DocumentWindow Title="WelcomeDocument.rtf" Description="Rich-text document"

FileName="C:\Users\Actipro\My Documents\WelcomeDocument.rtf">

</docking:DocumentWindow>

<docking:DocumentWindow Title="AnotherDoc" Description="Rich-text document"

FileName="C:\Users\Actipro\My Documents\WelcomeDocument.rtf" />

</docking:TabbedMdiContainer>

</docking:TabbedMdiHost>

</docking:Workspace>

</docking:SplitContainer>

</docking:DockSite>


Comments (2)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Samuele,

Did you include this at the top of your XAML file?

xmlns:themes="http://schemas.actiprosoftware.com/winfx/xaml/themes"

 You need that sort of thing to declare what the "themes:" XML namespace is.


Actipro Software Support
Posted 2 years ago by Samuele Gantner

Actually I found out by myself. Was missing a reference to ActiproSoftware.Shared.Wpf :)

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

Add a Comment

Please log in to a validated account to post comments.