Hi i have two problems with the RadBusyIndicator...
i placed some controls in an RadBusyIndicator, something like this...
<RadWindow>
<RadBusyIndicator name="busyIndicator">
<Grid>
<... />
<TextBox name="textBox" />
<... />
</Grid>
</RadBusyIndicator>
</RadWindow>
after i changed the busyIndicator.IsBusy, the focuse of the textBox inside the BusyIndicator is lost.
to prevent this i tried to call...
busyIndicator.IsBusy=false;
textBox.Focus();
but the focus is still lost. i think because of the blending animation of the busyIndicator - it will release its focus after the animation - but when is the animation over (an event for that will be helpfull).
thats the first problem - loosing focus and impossible to "refocus" an control imediately after busyIndicator.IsBusy=false.
the second problem i have is, i changed the busyIndicator.DisplayAfter timespan to a higher value {e.g. TimeSpan.FromSeconds(1.23)}, with the result...
after busyIndicator.IsBusy = true; ... busyIndicator.IsBusy=false; ... the busyIndicator looks like an disabled control and all controls inside the busyIndicator are not accessable anymore... why ?!?!?!
see attached pictures...
"busyindicator_isbusy_true.png" - thats ok,
"busyindicator_isbusy_false_ok.png" - this is ok also (DisplayAfter is not touched),
"busyindicator_isbusy_false_fault.png" - thats with changed DisplayAfter value (>250ms)
(not possible to upload pictures ?!?!)
an other code fragment, how i use the IsBusy property...
private void xyz()
{
MyWebServiceClient client = new MyWebServiceClient();
client.MyMethodCompleted += (sender, e) =>
{
// here the called method of WebService is finished
busyIndicator.IsBusy = false;
...
};
busyIndicator.IsBusy = true;
// calling the WebService method
client.MyMethodAsync();
}
can anybody give me a solution...? {hopefully yes :)}
Dev. Env. / Project:
Telerik RadControls for Silverlight4 Q2 2010
Microsoft VS 2010
Microsoft Silverlight 4
i placed some controls in an RadBusyIndicator, something like this...
<RadWindow>
<RadBusyIndicator name="busyIndicator">
<Grid>
<... />
<TextBox name="textBox" />
<... />
</Grid>
</RadBusyIndicator>
</RadWindow>
after i changed the busyIndicator.IsBusy, the focuse of the textBox inside the BusyIndicator is lost.
to prevent this i tried to call...
busyIndicator.IsBusy=false;
textBox.Focus();
but the focus is still lost. i think because of the blending animation of the busyIndicator - it will release its focus after the animation - but when is the animation over (an event for that will be helpfull).
thats the first problem - loosing focus and impossible to "refocus" an control imediately after busyIndicator.IsBusy=false.
the second problem i have is, i changed the busyIndicator.DisplayAfter timespan to a higher value {e.g. TimeSpan.FromSeconds(1.23)}, with the result...
after busyIndicator.IsBusy = true; ... busyIndicator.IsBusy=false; ... the busyIndicator looks like an disabled control and all controls inside the busyIndicator are not accessable anymore... why ?!?!?!
see attached pictures...
"busyindicator_isbusy_true.png" - thats ok,
"busyindicator_isbusy_false_ok.png" - this is ok also (DisplayAfter is not touched),
"busyindicator_isbusy_false_fault.png" - thats with changed DisplayAfter value (>250ms)
(not possible to upload pictures ?!?!)
an other code fragment, how i use the IsBusy property...
private void xyz()
{
MyWebServiceClient client = new MyWebServiceClient();
client.MyMethodCompleted += (sender, e) =>
{
// here the called method of WebService is finished
busyIndicator.IsBusy = false;
...
};
busyIndicator.IsBusy = true;
// calling the WebService method
client.MyMethodAsync();
}
can anybody give me a solution...? {hopefully yes :)}
Dev. Env. / Project:
Telerik RadControls for Silverlight4 Q2 2010
Microsoft VS 2010
Microsoft Silverlight 4
8 Answers, 1 is accepted
0
Alexander
Top achievements
Rank 1
answered on 19 Aug 2010, 11:14 AM
one of the problems fixed! (the second one)
i moved the call of busyIndicator.IsBusy from
private void radWindow_Loaded(object sender, RoutedEventArgs e)
{
// at this place, all controls inside RadBusyIndicator are disabled and stay disabled (with changed DisplayAfter value >250ms)
// xyz();
}
to
private void radWindow_Opened(object sender, RoutedEventArgs e)
{
// at this place the controls inside RadBusyIndicator are enabled/disabled by the BusyIndicator like expect.
xyz();
}
ok... thats fixed...
but i have still the other problem with losing the focus - (i have no idea where to bring back the focus to the control after busyIndicator.IsBusy=false; imediately after that statement has no effect)
i moved the call of busyIndicator.IsBusy from
private void radWindow_Loaded(object sender, RoutedEventArgs e)
{
// at this place, all controls inside RadBusyIndicator are disabled and stay disabled (with changed DisplayAfter value >250ms)
// xyz();
}
to
private void radWindow_Opened(object sender, RoutedEventArgs e)
{
// at this place the controls inside RadBusyIndicator are enabled/disabled by the BusyIndicator like expect.
xyz();
}
ok... thats fixed...
but i have still the other problem with losing the focus - (i have no idea where to bring back the focus to the control after busyIndicator.IsBusy=false; imediately after that statement has no effect)
0
Accepted
Hello Alexander,
Teodor
the Telerik team
Thank you for contacting us.
We are glad you have resolved one of your issues. Let us address the first one.
Indeed, right after the change of the IsBusy property, the animation is still running and it seems impossible for the internal control to receive focus. Please refer to the attached project which features a workaround using an attached property bound to the IsBusyIndicationVisible property of the RadBusyIndicator. Since it is updated later than the IsBusy property, the focus is correctly set to the inside element.
Hope this will be of use. We will be glad to assist you further.
Teodor
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Alexander
Top achievements
Rank 1
answered on 20 Aug 2010, 01:53 PM
Hi Teodor...
thank you very much, your solution works perfect !!!
and thank you for the quick response... :D
(this thread is closed - for me)
thank you very much, your solution works perfect !!!
and thank you for the quick response... :D
(this thread is closed - for me)
0
Nick
Top achievements
Rank 2
answered on 27 Aug 2010, 01:40 AM
I noticed the same problem with the Disabled look and feel when setting IsBussy from _Loaded...
The standard Silverlight Client Window doens't have an Opened event.. is there a way to make this work like it should without changing to a RadWindow?
The standard Silverlight Client Window doens't have an Opened event.. is there a way to make this work like it should without changing to a RadWindow?
0
Alexander
Top achievements
Rank 1
answered on 27 Aug 2010, 06:55 AM
Hi Nick...
maybe you can try to inherit and override the OnOpernd method when you make your own ChildWindow...
and then you can handle your code directly inside the OnOpened method or you can distribute you own Opend event there to consume it from other places outside you class/control...
maybe you can try to inherit and override the OnOpernd method when you make your own ChildWindow...
and then you can handle your code directly inside the OnOpened method or you can distribute you own Opend event there to consume it from other places outside you class/control...
public
partial
class
MyWindow : ChildWindow
{
protected
override
void
OnOpened()
{
base
.OnOpened();
// fire your own Opened event
RaiseOpened();
// handle your code direct here
xyz();
}
#region my opened event
public
event
RoutedEventHandler Opened;
private
void
RaiseOpened()
{
RoutedEventHandler handler = Opened;
if
(handler !=
null
)
handler(
this
,
new
RoutedEventArgs());
}
#endregion
#region my direct busyIndicator handler
private
void
xyz()
{
MyWebServiceClient client =
new
MyWebServiceClient();
client.MyMethodCompleted += (sender, e) =>
{
// here the called method of WebService is finished
busyIndicator.IsBusy =
false
;
...
};
busyIndicator.IsBusy =
true
;
// calling the WebService method
client.MyMethodAsync();
}
#endregion
}
0
Nick
Top achievements
Rank 2
answered on 27 Aug 2010, 12:18 PM
Thanks; I forgot to check if there was an event I could override... I did the following:
Which works fine; I just need it in one window, not all of my Child windows :)
Thanks m8.
protected
override
void
OnOpened()
{
base
.OnOpened();
this
.IsLoading =
true
;
}
Thanks m8.
0
Nick
Top achievements
Rank 2
answered on 27 Aug 2010, 02:14 PM
Maybe you know this aswel...
I've ran into a problem where a specific style prevents the OnOpened override to fire... (http://forums.silverlight.net/forums/p/198353/462200.aspx#462200)
Any thoughts?
[Update]
Fixed. Problem was a Nesting Issue; VisualStateManager inside of a Canvas prevented the OnOpened even to fire. Changing te nesting fixed it.
[/Update]
I've ran into a problem where a specific style prevents the OnOpened override to fire... (http://forums.silverlight.net/forums/p/198353/462200.aspx#462200)
Any thoughts?
[Update]
Fixed. Problem was a Nesting Issue; VisualStateManager inside of a Canvas prevented the OnOpened even to fire. Changing te nesting fixed it.
[/Update]
0
Hi Nick,
Teodor
the Telerik team
We are glad you have found a solution to your issue.
Feel free to further share your experience with our controls.
Teodor
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items