//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- #endregion #region --Misc Methods (Private)-- #endregion #region --Misc Methods (Protected)-- #endregion //--------------------------------------------------------Events:---------------------------------------------------------------------\\ #region --Events-- private void Main_nview_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args) { if (args.SelectedItem is Microsoft.UI.Xaml.Controls.NavigationViewItem item) { switch (item.Tag) { case "General": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, general_scp, false); break; case "MUC": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, muc_scp, false); break; case "Media": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, media_scp, false); break; case "OMEMO": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, omemo_scp, false); break; case "Spam": if (spam_scp.Visibility == Windows.UI.Xaml.Visibility.Visible) { ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, spam_scp, false); } break; } } }
private void Main_nview_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args) { if (args.SelectedItem is Microsoft.UI.Xaml.Controls.NavigationViewItem item) { switch (item.Tag) { case "General": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, general_scp, false); break; case "UI": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, ui_scp, false); break; case "Code": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, code_scp, false); break; case "Misc": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, misc_scp, false); break; case "Images": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, images_scp, false); break; } } }
//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- #endregion #region --Misc Methods (Private)-- #endregion #region --Misc Methods (Protected)-- #endregion //--------------------------------------------------------Events:---------------------------------------------------------------------\\ #region --Events-- private void Main_nview_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args) { if (args.SelectedItem == misc_navItem) { ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, misc_scp, false); } }
//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- #endregion #region --Misc Methods (Private)-- private void ScrollToSection(string section) { switch (section) { case "Logs": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, logs_scp, false); break; case "Cache": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, cache_scp, false); break; case "Analytics": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, analytics_scp, false); break; case "Misc": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, misc_scp, false); break; case "About": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, about_scp, false); break; } }
public void GetAlwaysScrollToEndReturnsProperBooleanValueWhenTrue() { ScrollViewer viewer = new ScrollViewer(); viewer.SetValue(ScrollViewerExtensions.AlwaysScrollToEndProperty, true); Assert.IsTrue(ScrollViewerExtensions.GetAlwaysScrollToEnd(viewer)); }
public void SetAlwaysScrollToEndSetsPropertlyToTrue() { ScrollViewer viewer = new ScrollViewer(); Assert.IsFalse(ScrollViewerExtensions.GetAlwaysScrollToEnd(viewer)); ScrollViewerExtensions.SetAlwaysScrollToEnd(viewer, true); Assert.IsTrue(ScrollViewerExtensions.GetAlwaysScrollToEnd(viewer)); }
//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\ #region --Set-, Get- Methods-- #endregion //--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\ #region --Misc Methods (Public)-- #endregion #region --Misc Methods (Private)-- #endregion #region --Misc Methods (Protected)-- #endregion //--------------------------------------------------------Events:---------------------------------------------------------------------\\ #region --Events-- private void Main_nview_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args) { if (args.SelectedItem is Microsoft.UI.Xaml.Controls.NavigationViewItem item) { switch (item.Tag) { case "Tasks": ScrollViewerExtensions.ScrollIntoViewVertically(main_scv, tasks_scp, false); break; } } }
internal bool SetFocusToItem(LegendItem item) { bool flag = false; if (item != null) { if (!item.IsInLegendVisibleArea(this)) { ScrollViewer scrollHost = ItemsControlExtensions.GetScrollHost((ItemsControl)this); if (scrollHost != null) { ScrollViewerExtensions.ScrollIntoView(scrollHost, (FrameworkElement)item, 0.0, 0.0, (Duration)TimeSpan.Zero.Duration()); } } flag = item.Focus(); } return(flag); }
public void SetAlwaysScrollToEndThrowsExceptionWithNull() { ScrollViewerExtensions.SetAlwaysScrollToEnd(null, true); }
public void GetAlwaysScrollToEndThrowsExceptionWithNull() { ScrollViewerExtensions.GetAlwaysScrollToEnd(null); }
public void GetAlwaysScrollToEndReturnsProperBooleanValueWhenFalse() { ScrollViewer viewer = new ScrollViewer(); Assert.IsFalse(ScrollViewerExtensions.GetAlwaysScrollToEnd(viewer)); }
private void OnJumpToBottom(object sender, MouseButtonEventArgs e) { ScrollViewerExtensions.ScrollToBottom(_scrollViewer); }