This is a migrated thread and some comments may be shown as answers.
Get rid of blue highlight border in Office2019 theme.
4 Answers 7 Views
This is a migrated thread and some comments may be shown as answers.
Christoph
Top achievements
Rank 1
Christoph asked on 25 Nov 2020, 09:41 PM

Hello,

I have a very straight forward example:

<Window x:Class="TelerikWpfApp2.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
    <telerik:RadDocking x:Name="radDocking">
        <telerik:RadSplitContainer>
 
            <telerik:RadPaneGroup x:Name="Group1">
                <telerik:RadPane x:Name="Pane1" Header="Server Explorer" CanFloat="False"/>
                <telerik:RadPane x:Name="Pane2" Header="Server" CanFloat="False"/>
            </telerik:RadPaneGroup>
 
        </telerik:RadSplitContainer>
    </telerik:RadDocking>
</Window>

 

Using the Office2019 theme this gives a blue border for the active pane (see screenshot). The blue highlighted header is fine for me, but I'd like to get rid of the blue border and struggled to do so for the last 6 hours and am at a loss.

 

4 Answers, 1 is accepted

Sort by
0
Masha
Telerik team
answered on 26 Nov 2020, 09:20 AM

Hi Christoph,

The easiest way to achieve the desired approach is to modify ThemeHelper.CheckedBrush of RadPaneGroup style to be the same as default border brush. Please check the code snippet below:

 <Style TargetType="telerik:RadPaneGroup" BasedOn="{StaticResource RadPaneGroupStyle}">
         <Setter Property="helpers:ThemeHelper.CheckedBrush" Value="{telerik:Office2019Resource ResourceKey=MainBorderBrush}"/>
 </Style>

You could also remove the accent border modifying the control templates of RadGroupBottomStlye - RadPaneGroupDefaultControlTemplate, RadPaneGroupDocumentHostControlTemplate and RadPaneGroupTopControlTemplate. Inside them look for the following MultiTrigger condition:

<MultiTrigger.Conditions>
     <Condition SourceName="HeaderElement" Property="IsHighlighted" Value="True"/>
     <Condition Property="IsFocused" Value="True"/>
 </MultiTrigger.Conditions>

and delete setter where BorderBrush is set.

Please let me know if you need any further help.

Regards,
Masha
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Christoph
Top achievements
Rank 1
answered on 26 Nov 2020, 11:58 AM

Thank you very much for the quick response.

The first solution worke perfectly.

However I'd like to ask a question about the second solution you proposed since I'm sure I'll need to change some other styles of the default theme aswell.

I tried this approach: https://docs.telerik.com/devtools/wpf/styling-and-appearance/styling-apperance-modifying-default-styles#modifying-the-default-style-using-visual-studio

However the contextmenu of the RadPaneGroup doesn't show any of thetemplates you mentioned.

Is this not the intended way of doing this?

0
Accepted
Masha
Telerik team
answered on 26 Nov 2020, 12:37 PM

Hello Christoph,

If you want to extract the templates through the designer you need to extract- > Edit Bottom Template/ Edit Document Host Template/ edit Top Template. This will extract the desired ControlTemplate but you need to apply it inside RadGroupStyle as follow:

<Style TargetType="telerik:RadPaneGroup" BasedOn="{StaticResource RadPaneGroupStyle}">
  <!--<Setter Property="helpers:ThemeHelper.CheckedBrush" Value="{telerik:Office2019Resource ResourceKey=MainBorderBrush}"/>-->
   <Setter Property="BottomTemplate" Value="{StaticResource GeneratedBottomControlTemplate}"/>
   <Setter Property="TopTemplate" Value=""/>
   <Setter Property="DocumentHostTemplate" Value=""/>
 </Style>

I hope this helps.

Regards,
Masha
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Christoph
Top achievements
Rank 1
answered on 26 Nov 2020, 01:00 PM

Thank you very much, that helps alot.

I think I understand the concept now.

Asked by
Christoph
Top achievements
Rank 1
Answers by
Masha
Telerik team
Christoph
Top achievements
Rank 1
Share this question
or