private void OnShowAdvanceSearchControl(object sender, DoubleAnimationEventArgs e) { Messenger?.Send(CommandName.ShowAdvanceSearchControl, e); if (SearchCriteria != null && !SearchCriteria.EnabledAdvancedSearch) { LoadData(LoadingType.ChangedSearchCriteria); } }
private void ShowAdvanceSearchControl(DoubleAnimationEventArgs args) { enabledSaveSplitPosition = args.To > 0; int commonTime = (LeftColumn.ActualWidth - args.To) > 0 ? 300 : 200; int time = Math.Abs((int)((LeftColumn.ActualWidth - args.To) * commonTime / 110)); if (Math.Abs(lastWindth) < Epsilon) { lastWindth = args.To; } double to; if (Math.Abs(args.To) < Epsilon) { lastWindth = LeftColumn.ActualWidth; to = 0; } else { to = lastWindth; } var animation = new GridLengthAnimation { From = new GridLength(LeftColumn.ActualWidth, GridUnitType.Pixel), To = new GridLength(to, GridUnitType.Pixel), Duration = TimeSpan.FromMilliseconds(time) }; animation.Completed += delegate { SetSplitter(args.To); if (args.To > 0) { SaveSplitterPosition(); } }; LeftColumn.BeginAnimation(ColumnDefinition.WidthProperty, animation); }
private bool CanShowAdvanceSearchControl(DoubleAnimationEventArgs args) { return(args != null); }
private void SearchCriteria_EnabledEdvanceSearchChanged(object sender, DoubleAnimationEventArgs e) { LoadData(SearchCriteria.EnabledAdvancedSearch ? LoadingType.СhangedAdvancedSearch : LoadingType.ChangedSearchCriteria); }