Hi,
In last beta version of SIlverlight for outlookbar there was animated effect on Navigationpane collapse and expand, but now in 3.0 there is no support for storyboard provided by infragistic.
Could you please help me to achive smooth animated effect on Navigationpane collapse and expand.
Thanks
Samir
Hi Samir,
You could try using the Expanded and Minimized states in the MinimizedStates VisualStateGroup of the SelectedGroupContent TemplatePart of the XamWebOutlookBar.
For this you will have to re-template your XWOB.
If you don't know how how exactly can this be done, let us know and we will provide a sample.
HTH,
Thanks for your quick response.
It would be great if you can provide me sample code for same.
Hi Samir,You can do this from the application - that is easier.Storyboard _sbMinimizing = null, _sbMaximizing = null;DoubleAnimation _daMinimizing = new DoubleAnimation(), _daMaximizing = null;bool _skipMaximizing, _skipMinimizing;double _expandedWidth = double.NaN;private void xobW_NavigationPaneMinimizing(object sender, CancellableEventArgs e){ if (_sbMinimizing == null && xobW != null) { xobW.MinimizedWidth = 66; _daMinimizing.EasingFunction = new CubicEase(); _daMinimizing.Duration = new Duration(TimeSpan.FromMilliseconds(444)); _daMinimizing.FillBehavior = FillBehavior.HoldEnd; Storyboard.SetTarget(_daMinimizing, xobW); Storyboard.SetTargetName(_daMinimizing, xobW.Name); Storyboard.SetTargetProperty(_daMinimizing, new PropertyPath("Width")); _sbMinimizing = new Storyboard(); _sbMinimizing.Children.Add(_daMinimizing); _sbMinimizing.Completed += new EventHandler(_sbMinimizing_Completed); } if (_sbMinimizing == null || _skipMinimizing) return; _skipMinimizing = _skipMaximizing = true; xobW.AllowMinimized = false; // this will expand the outlookbar _daMinimizing.From = xobW.ActualWidth; _daMinimizing.To = xobW.MinimizedWidth; _expandedWidth = xobW.Width; // to restore the width in expanded mode _sbMinimizing.Begin();}void _sbMinimizing_Completed(object sender, EventArgs e){ _skipMinimizing = true; // this prevents minimizing storyboard to begin xobW.AllowMinimized = true; xobW.IsMinimized = true;// now, we can minimize the outlookbar _skipMinimizing = false;}private void xobW_NavigationPaneExpanding(object sender, CancellableEventArgs e){ if (_skipMaximizing) { _skipMaximizing = false; // this comes from minimizing storyboard return; } if (_sbMaximizing == null && xobW != null) { _daMaximizing = new DoubleAnimation(); _daMaximizing.EasingFunction = new CubicEase(); _daMaximizing.Duration = new Duration(TimeSpan.FromMilliseconds(444)); _daMaximizing.FillBehavior = FillBehavior.Stop; Storyboard.SetTarget(_daMaximizing, xobW); Storyboard.SetTargetName(_daMaximizing, xobW.Name); Storyboard.SetTargetProperty(_daMaximizing, new PropertyPath("Width")); _sbMaximizing = new Storyboard(); _sbMaximizing.Children.Add(_daMaximizing); _sbMaximizing.Completed += new EventHandler(_sbMaximizing_Completed); } if (_sbMaximizing != null) { _daMaximizing.From = xobW.ActualWidth; _daMaximizing.To = _daMinimizing.From ?? 333; _sbMaximizing.Begin(); }}void _sbMaximizing_Completed(object sender, EventArgse){ xobW.Width = _expandedWidth; // we need to restore previous width}
Marin
Thank you very much for sample Code, Marin.
Regards,Jagan