private void Search_MouseEnter(object sender, MouseEventArgs e) { var anim = new DoubleAnimation(222, new Duration(TimeSpan.FromMilliseconds(111))); SearchBox.BeginAnimation(TextBox.WidthProperty, anim); SearchBox.Opacity = 1; SearchBox.Margin = new Thickness(7); }
private void Grid_GotFocus(object sender, RoutedEventArgs e) { if (ViewModels.Students.Instance.EnableAdvanceFilter) { return; } var anim = new DoubleAnimation(0, new Duration(TimeSpan.FromMilliseconds(111))); SearchBox.BeginAnimation(TextBox.WidthProperty, anim); SearchBox.Opacity = 0.7; SearchBox.Margin = new Thickness(0); }
private void SearchButton_MouseEnter(object sender, MouseEventArgs e) { SearchScopeBox.BeginAnimation(WidthProperty, _oc); SearchBox.BeginAnimation(WidthProperty, _oa); if (SearchScopeBox.HasItems) { return; } SearchScopeBox.Items.Add("робітники"); SearchScopeBox.Items.Add("відділення"); SearchScopeBox.Items.Add("посади"); SearchScopeBox.Items.Add("проекти"); }
private void SearchButton_MouseLeave(object sender, MouseEventArgs e) { var ob = new DoubleAnimation { From = SearchBox.Width, To = 0, Duration = TimeSpan.FromSeconds(0.2) }; var od = new DoubleAnimation { From = SearchScopeBox.Width, To = 0, Duration = TimeSpan.FromSeconds(0.2) }; SearchScopeBox.BeginAnimation(WidthProperty, od); SearchBox.BeginAnimation(WidthProperty, ob); }