Telerik Forums
UI for WPF Forum
0 answers
194 views

Hello.

First of all, my problem is that when the window is opened, the busy indicator appears after about 1-2 seconds.

 

The window is wrapped with a busy indicator.

I use async on Loaded Evenet to control the IsBsuy property.

<telerik:EventToCommandBehavior.EventBindings>
	<telerik:EventBinding EventName="Loaded" Command="{Binding OnEventLoadedCommand}"/>
</telerik:EventToCommandBehavior.EventBindings>
public ICommand OnEventLoadedCommand { get => new DelegateCommand(obj => Loaded(obj)); }
private async void Loaded()
{
    IsBusy = true;

        DataLoad . . . . (using async task)

    IsBusy = false;
}

 

In a simple sample project, it appears immediately.
However, in my actual project, it is a bit delayed.

 

This is my guess.
Before Loaded, my actual project contains a lot of controls.

The window contains navigation.

There are about 10 usercontrols.


<Window>
    <DataTemplate ....  dataconext = ViewModel> * 10
</Window>

<usercontrol> * 10
    <Many Controls Input Initial Setting>
</usercontrol>

ViewModel..cs => Read values ​​of many properties before constructor

 

User controls all share the window viewmodel (not separate, only the WindowViewModel).

I think this is the cause of the first creation, but what about it?


Is there any way to solve this? If not, what's the problem?

 

Thanks.

Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
 updated question on 10 Aug 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?