Themes and styles

Editors for WPF Forum

Posted 10 years ago by Alex Drenea
Version: 9.1.0507
Avatar
Hello,
We are having a difficult time using themes on Actipro controls. We are trying to apply some styles to some controls and that seems to remove all theme styling.
Example : we have an "editors:TextBox" control, with the "Office2007Blue" theme. If we try and add a style to it, the office theme is gone (no blue border)

From my knoledge this is because any style applied on the control overrides other styles. The first solution I tought of was to create our style "basedOn" Actipro's styles but I can't seem to be able to find the style for a TextBox or a PopupButton like I saw done for some items in your demo application :
<Style x:Key="{x:Type Expander}" TargetType="{x:Type Expander}"
BasedOn="{StaticResource {x:Static themes:NavigationBarCommonDictionary.ExpanderStyleKey}}"> ( I only found the TextBoxInlineStyleKey without the Normal style Key in the EditorsCommonDictionary exposed by the Editors library)

To summarize the question, we are tryinng to combine Actipro theming with our own styles (mainly consisting of Margins, Paddings and other layout related style properties) but applying the style deletes the theming from the controls.

Any help will be appreciated.
Thank you
Alex

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Alex,

You should be able to base your implicit Style off of our default/implicit Style using BasedOn="{StaticResource {x:Type editors:TextBox}}".

We've also added component resource keys for the next maintenance release, for convenience.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.