Skip to content

Commit c27cc43

Browse files
Add TODO comment regarding destructive-read on TabScrollDirection AP
1 parent 7c0c9ee commit c27cc43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/MaterialDesignThemes.Wpf/Internal/BringIntoViewHijackingStackPanel.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ private void OnRequestBringIntoView(object sender, RoutedEventArgs e)
2323
if (e.OriginalSource is FrameworkElement child && child != this)
2424
{
2525
e.Handled = true;
26+
27+
// TODO: Consider making the "TabScrollDirection" a destructive read (i.e. reset the value once it is read) to avoid leaving a Backward/Forward value that may be misinterpreted at a later stage.
2628
double offset = TabScrollDirection switch {
2729
TabScrollDirection.Backward => -TabControlHeaderScrollBehavior.ScrollOffset,
2830
TabScrollDirection.Forward => TabControlHeaderScrollBehavior.ScrollOffset,

0 commit comments

Comments
 (0)