This is a migrated thread and some comments may be shown as answers.

ToolWindow HeaderTemplate

2 Answers 139 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sébastien
Top achievements
Rank 1
Sébastien asked on 28 Mar 2017, 09:20 PM

Hi everyone,

For some reasons, I made some changes on Header for undocked/floating window (called ToolWindow) editing ToolWindow template and modifying it.

As you can see on attached file, I increased font size, header height (rectangle was 22, now 48), changed colors etc...

Everything look fine BUT I can only drag the window clicking on the upper part on the header (actually I think the first 22 pixels). The new header height value is not taken in account and I don t know what to do.

Here is my changes:

<Rectangle Grid.ColumnSpan="2" Fill="WhiteSmoke" Height="48"/>

<Border x:Name="HeaderElement" Background="Transparent">

     <ContentControl x:Name="Header" VerticalAlignment="Center" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}"     Foreground="Gray" FontSize="22" FontFamily="{DynamicResource {x:Static telerik:Windows8ResourceKey.FontFamilyLight}}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsTabStop="False" Margin="6,0"/>

 </Border>

Thanks in advance for your help

Seb

 

2 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 31 Mar 2017, 08:56 AM
Hello Seb,

You would also need to increase the CaptionHeight property of the ToolWindow in order to match the exact (actual) height of the header in order to be able to drag it from everywhere. The property identifies the extend of the top of the Window to be treated as caption and draggable area.

Hope this helps.

Regards,
Kalin
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Sébastien
Top achievements
Rank 1
answered on 31 Mar 2017, 01:26 PM

It works.

Thx a lot

Sebastien

Tags
Window
Asked by
Sébastien
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Sébastien
Top achievements
Rank 1
Share this question
or