Can we set the width of minimized Telerik window?

1 Answer 55 Views
GridView Window
Manohar
Top achievements
Rank 1
Manohar asked on 21 Jun 2022, 12:29 PM

We have observed that minimized Telerik window/control is not showing few characters of title. We would like to see the few characters of window title even in minimized state. Do we have any property to control the width of minimized window?

Thanks in advance,

Manohar

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 24 Jun 2022, 11:47 AM

Hello Manohar,

Currently, the RadWindow control does not provide a way to control the width of the control when it is in Minimized state. However, the full title could still be shown by displaying it in a tooltip. To achieve this, you could create a new Style with TargetType="RadWindow" and add a Trigger for the WindowState property when its value is Minimized. Then, set this Style to the Style property of the RadWindow instance.

The following code snippets show this suggestion's implementation:

<Style x:Key="minimizedTooltipStyle" TargetType="telerik:RadWindow">
    <Style.Triggers>
        <Trigger Property="WindowState" Value="Minimized">
            <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Header}"/>
            <Setter Property="telerik:WindowHost.HitTestable" Value="True"/>
        </Trigger>
    </Style.Triggers>
</Style>
RadWindow radWindow = new RadWindow();
radWindow.Header = "very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong headeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeer";
radWindow.Style = this.Resources["minimizedTooltipStyle"] as Style;
radWindow.Show();

The result from the applied style is:

An important thing to consider is that, in order for the tooltip to show, the telerik:WindowHost.HitTestable property has to be set to True. This is because, by default, the RadWindow control's header handles various mouse inputs and as a result, it cannot display a tooltip. By setting the mentioned property to True, the tooltip will be present when the title is hovered by the mouse, however, the window will no longer be draggable.

In conclusion, could you give this suggestion a try?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView Window
Asked by
Manohar
Top achievements
Rank 1
Answers by
Stenly
Telerik team
Share this question
or