BusyAnymation simply displays an animation (moving circles) when
IsRunning property is set to true. You can find WPF example in
ProjectRacker v3.6 in SVN. It is used in ProjectEdit.xaml for example.
Sergey Barskiy
Principal Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: ajj3085
[mailto:cslanet@lhotka.net]
Sent: Wednesday, October 01, 2008 4:46 PM
To: Sergey Barskiy
Subject: [CSLA .NET] BusyAnimiation... how to use?
Any examples on using the BusyAnimation in 3.6?
I'm trying something new in wpf applications... I want the UI to display as
quickly as possible, and let the loading go on while my user controls are
loading in the background. I'm hoping the BusyAnimation will help..
So.. anyone use this yet? What exactly does it do?
That is the easiest way. Tortoise SVN is one option.
Sergey Barskiy
Principal Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: ajj3085
[mailto:cslanet@lhotka.net]
Sent: Wednesday, October 01, 2008 4:58 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: BusyAnimiation... how to use?
Guess Ill need an svn client... :-)
You are correct about IsAsynch. Busy animation will never
show if there is a running process on main (UI) thread. This is just a
general UI rule though, not having much to do with busy animation. So, if
you want to show it for long running tasks, they must run on a background
thread. I am not sure why control would disappear, is there an exception
thrown at some point? I ran PT 3.6 this morning, and the animation does
appear if provider is set to asynch. I think I used Resources List? for
testing.
Sergey Barskiy
Principal Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: ajj3085
[mailto:cslanet@lhotka.net]
Sent: Thursday, October 02, 2008 9:32 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] RE: RE: BusyAnimiation... how to use?
Ok,
I must be missing something. The animation doesn't show, even if I put a
Thread.Sleep in the project's DataPortal_Update.
I think that's because IsAsyn was false on the CslaDataProvider... but when I
set it to true, the user control disappears when I click save.
So what does it do? Overload the user control and display a the circle
animation? That's pretty much what I'm looking for.. so if that's what it
does I can just backport it to my Csla version and get started.
Andy
The current ProjectList and ResourceList forms in PTWpf use BusyAnimation, maybe that'll help?
I had an issue where I couldn't see the control a couple days ago. Turned out it was two things. First, I didn't set a size, so it was essentially invisible. Second, my background is dark, and so is the animation, so it simply didn't have any contrast over the background.
You can change the style of the animation, or you can take the cheap way out (like I did) and put it inside a while container :)
In many cases, to get a form loading before the data arrives,
you can use IsAsynchronous=”True” on the data provider and let it
do the work. The form will display, and they’ll display data when
the async data load completes.
This also allows you to bind a BusyAnimation to the data
provider’s IsBusy property so the user knows something is happening.
The trick with WPF (and to some degree Silverlight) is to
realize that nearly everything is bindable – as a source and target.
Also, value converters are your friend because they allow you to change one (or
more) property values into some other value.
For example, convert a Boolean into a Visibility, thus making it
possible for a bool property to control whether the user sees entire parts of
your UI.
Rocky
Copyright (c) Marimer LLC