public void ScrollToLastColumn() { if (ScrollAnimation.Enabled) { return; } if (Columns.Count == 0) { return; } ScrollAnimation = new IntAnimation(); int start = ScrollPanel.HorizontalScroll.Value; int end = LastColumn.Right + ScrollPanel.HorizontalScroll.Value - ScrollPanel.Width; end = Math.Max(Math.Min(end, ScrollPanel.HorizontalScroll.Maximum), start); ScrollAnimation.Start(start, end).Tick += (_, value) => { ScrollPanel.HorizontalScroll.Value = value; }; ScrollAnimation.Complete += (_, e) => { if (end != start) { UpdateScrollMinSize(); } }; }
public ColumnView() { InitializeComponent(); Columns = new ObservableCollection <ColumnControl>(); ScrollAnimation = new IntAnimation(); Columns.CollectionChanged += Columns_CollectionChanged; }
public void SlideOpen() { if (animation.Enabled) { return; } animation = new IntAnimation(); animation.Start(0, 30).Tick += (_, value) => { this.Height = value; }; }
public void SlideClose() { if (animation.Enabled) { return; } FilterText = ""; animation = new IntAnimation(); animation.Start(30, 0).Tick += (_, value) => { this.Height = value; }; }
private void updateProgress(Tuple <int, string> t) { if (!progressAnimation.Enabled || t.Item1 == 100 || t.Item1 == 0) { progressAnimation.Stop(); progressAnimation = new IntAnimation(); progressAnimation.Start(this.Progress, t.Item1).Tick += (_, value) => { this.Progress = value; }; } if (t.Item2 != null) { this.DescriptionText = t.Item2; } }
public void UpdateSize() { if (animation.Enabled) { animation.Stop(); } int end = Math.Min(this.Items.Count, 3) * new ProgressControl().Height; if (end != 0) { end += headerLabel.Height; } animation = new IntAnimation(); animation.Start(this.Height, end).Tick += (_, value) => { this.Height = value; }; }
public void ScrollToFirstColumn() { if (ScrollAnimation.Enabled) { return; } if (Columns.Count == 0) { return; } ScrollAnimation = new IntAnimation(); int start = ScrollPanel.HorizontalScroll.Value; int end = 0; ScrollAnimation.Start(start, end).Tick += (_, value) => { ScrollPanel.HorizontalScroll.Value = value; }; ScrollAnimation.Complete += (_, e) => { Columns[0].Focus(); UpdateScrollMinSize(); }; }
public void ApplyIntToText(Text text) { IntAnimation intAnimation = ((IntAnimation)simpleAnimationsManager.GetAnimation("Int")); text.text = intAnimation.intToAnimate.ToString(); }