private void btnPane_Click(object sender, RoutedEventArgs e) { try { if (((ScaleTransform)((TransformGroup)btnPane.GetValue(Button.RenderTransformProperty)).Children[0]).ScaleX == -1) { //this.BeginStoryboard((Storyboard)this.Resources["OnCloseClick"], HandoffBehavior.Compose, false); //rowDef1.Height = new GridLength(0); GridLengthAnimation objani = new GridLengthAnimation(); objani.From = new GridLength(35, GridUnitType.Pixel); objani.To = new GridLength(0, GridUnitType.Pixel); objani.Duration = new System.Windows.Duration(TimeSpan.FromSeconds(.50)); rowDef1.BeginAnimation(RowDefinition.HeightProperty, objani); btnPane.ToolTip = "Show ToolBar"; } else { //this.BeginStoryboard((Storyboard)this.Resources["OnOpenClick"], HandoffBehavior.Compose, true); //rowDef1.Height = new GridLength(34.0, GridUnitType.Pixel); GridLengthAnimation objani = new GridLengthAnimation(); objani.From = new GridLength(0, GridUnitType.Pixel); objani.Duration = new System.Windows.Duration(TimeSpan.FromSeconds(.50)); objani.To = new GridLength(35, GridUnitType.Pixel); rowDef1.BeginAnimation(RowDefinition.HeightProperty, objani); btnPane.ToolTip = "Hide ToolBar"; } ((ScaleTransform)((TransformGroup)btnPane.GetValue(Button.RenderTransformProperty)).Children[0]).ScaleX *= -1; } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "btnPane_Click()", "pgHome.xaml.cs"); } }
private void btnMExp_Click(object sender, RoutedEventArgs e) { try { if (blOpenMExp) { objAmit.Visibility = Visibility.Visible; objVMuktiGrid.FncControllPane(false); GridLengthAnimation gla = new GridLengthAnimation(); gla.To = new GridLength(230, GridUnitType.Pixel); gla.Duration = new System.Windows.Duration(TimeSpan.FromSeconds(.00)); rowModule.BeginAnimation(RowDefinition.HeightProperty, gla); blOpenMExp = false; } else { GridLengthAnimation gla = new GridLengthAnimation(); gla.From = new GridLength(230, GridUnitType.Pixel); gla.To = new GridLength(0, GridUnitType.Pixel); gla.Duration = new System.Windows.Duration(TimeSpan.FromSeconds(.00)); rowModule.BeginAnimation(RowDefinition.HeightProperty, gla); //rowModule.Height = new GridLength(0, GridUnitType.Pixel); blOpenMExp = true; } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "btnMexp_Click()", "pgHome.xaml.cs"); } }
void objAmit_entClosemodule() { try { GridLengthAnimation gla = new GridLengthAnimation(); gla.From = new GridLength(210, GridUnitType.Pixel); gla.To = new GridLength(0, GridUnitType.Pixel); gla.Duration = new System.Windows.Duration(TimeSpan.FromSeconds(.80)); rowModule.BeginAnimation(RowDefinition.HeightProperty, gla); } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "entClosemodule()", "pgHome.xaml.cs"); } }
void objBuddy_AnimateGrid(double From, double To) { GridLengthAnimation gla = new GridLengthAnimation(); gla.From = new GridLength(From, GridUnitType.Pixel); gla.To = new GridLength(To, GridUnitType.Pixel); gla.Duration = new System.Windows.Duration(TimeSpan.FromSeconds(.20)); colDef3.BeginAnimation(ColumnDefinition.WidthProperty, gla); }