LoaderContainer with a long page?

1 Answer 126 Views
LoaderContainer
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Deasun asked on 30 Jan 2023, 08:39 PM

How does one move the text msg & animation higher up the page?

It seems to default to the center of the page.

Example:

I would like that animation and the text message up near the top of the page.

Code:

@* LoaderContainer with transparent panel *@
<TelerikLoaderContainer Class="no-panel"
                        ThemeColor="@ThemeConstants.Loader.ThemeColor.Dark" />
<style>
    .no-panel .k-loader-container-panel {
        background-color: transparent;
        border-width: 0;
    }
</style>
<TelerikGridLayout>  
    <GridLayoutColumns>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>    
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="7%"></GridLayoutColumn>
    </GridLayoutColumns>
    <GridLayoutRows>        
        <GridLayoutRow Height="100px"></GridLayoutRow>        
        <GridLayoutRow Height="100px"></GridLayoutRow>     
        <GridLayoutRow Height="100px"></GridLayoutRow>           
        <GridLayoutRow Height="100px"></GridLayoutRow>        
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>           
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>         
        <GridLayoutRow Height="400px"></GridLayoutRow>               
    </GridLayoutRows>

</TelerikGridLayout>

Those heights are to simulate my long page :).

 

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
commented on 01 Feb 2023, 12:07 PM

That did not fix the issue.

In fact it made it worse. :(

position: fixed; in the style area made the text msg and animation disappear!

@* LoaderContainer with transparent panel *@
<TelerikLoaderContainer 
    Class="no-panel"
    ThemeColor="@ThemeConstants.Loader.ThemeColor.Dark"/>
<style>
    .no-panel .k-loader-container-panel {
        background-color: transparent;
        border-width: 0;
        position: fixed;
    }
</style>
<TelerikGridLayout>  
    <GridLayoutColumns>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>    
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="6%"></GridLayoutColumn>
        <GridLayoutColumn Width="7%"></GridLayoutColumn>
    </GridLayoutColumns>
    <GridLayoutRows>        
        <GridLayoutRow Height="100px"></GridLayoutRow>        
        <GridLayoutRow Height="100px"></GridLayoutRow>     
        <GridLayoutRow Height="100px"></GridLayoutRow>           
        <GridLayoutRow Height="100px"></GridLayoutRow>        
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>           
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>          
        <GridLayoutRow Height="100px"></GridLayoutRow>         
        <GridLayoutRow Height="400px"></GridLayoutRow>               
    </GridLayoutRows>

</TelerikGridLayout>

 

Dimo
Telerik team
commented on 01 Feb 2023, 01:50 PM | edited

My suggestion was to apply position:fixed to the LoaderContainer class itself, and not on some internal elements. There is a big difference.

    div.no-panel {
        position: fixed;
    }
    .no-panel .k-loader-container-panel {
        background-color: transparent;
        border-width: 0;
    }

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 01 Feb 2023, 09:34 AM

Hi Deasun,

The default behavior of the LoaderContainer height is to match the viewport height.

If this is not the case on your side, maybe the page <body> has a position:relative style or something like that. In this case, apply a position:fixed style to the LoaderContainer.

Regards,
Dimo
Progress Telerik

Learn about the important changes coming in UI for Blazor 4.0 in January 2023!
Tags
LoaderContainer
Asked by
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Answers by
Dimo
Telerik team
Share this question
or