Unplanned
Last Updated: 18 Apr 2020 11:38 by ADMIN
Uluç
Created on: 18 Apr 2020 11:37
Category: Window
Type: Feature Request
2
Allow text in Window Actions
Is it possible to add a button that has text to the window action section?
1 comment
ADMIN
Marin Bratanov
Posted on: 18 Apr 2020 11:38

I would imagine that the action would either be able to take a RenderFragment (like you can add HTML/Text content to a <TelerikButton>), or there would be a Text (and maybe a Class) parameter on the action.

For the time being, you could hack the text through the icon class:

 

<style>
    .myIconClass::before{
        content:"some text";
    }
</style>
<TelerikWindow Visible="true">
    <WindowActions>
        <WindowAction Name="MyAction" Title="the tooltip" IconClass="myIconClass" />
    </WindowActions>
    <WindowTitle>
        Optional title
    </WindowTitle>
    <WindowContent>
        Lorem ipsum dolor sit amet.
    </WindowContent>
</TelerikWindow>

 

Another approach would be to use the WindowTitle which is a RenderFragment and can take HTML already. THe key difference is that the window will no longer position such buttons together with the actions and you may want to add some styling of your own. If you also use the built-in actions, you may want to consider moving them to custom buttons as well so they are grouped together.

<TelerikWindow Visible="true">
    <WindowTitle>
        Optional title <span style="padding-left: 30px;"><TelerikButton Icon="@IconName.Gear">more text</TelerikButton></span>
    </WindowTitle>
    <WindowContent>
        Lorem ipsum dolor sit amet.
    </WindowContent>
</TelerikWindow>

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.