Skip to content

Commit 966c1e8

Browse files
Remove debug output
1 parent eb5d42d commit 966c1e8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/MaterialDesignThemes.Wpf/Behaviors/Internal/TabControlHeaderScrollBehavior.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ protected override void OnDetaching()
128128

129129
private void AssociatedObject_ScrollChanged(object sender, ScrollChangedEventArgs e)
130130
{
131-
Debug.WriteLine($"ContentHorizontalOffset: {AssociatedObject.ContentHorizontalOffset}, HorizontalOffset: {e.HorizontalOffset}, HorizontalChange: {e.HorizontalChange}, ViewportWidth: {e.ViewportWidth}, ExtentWidth: {e.ExtentWidth}");
132131
TimeSpan duration = TabAssist.GetScrollDuration(TabControl);
133132
if (duration == TimeSpan.Zero)
134133
return;
@@ -137,19 +136,16 @@ private void AssociatedObject_ScrollChanged(object sender, ScrollChangedEventArg
137136

138137
double originalValue = desiredOffsetStart;
139138
double newValue = e.HorizontalOffset;
140-
141139
_isAnimatingScroll = true;
142140

143141
// HACK: Temporarily disable user interaction while the animated scroll is ongoing. This prevents the double-click of a tab stopping the animation prematurely.
144142
bool originalIsHitTestVisibleValue = TabControl.IsHitTestVisible;
145143
TabControl.SetCurrentValue(FrameworkElement.IsHitTestVisibleProperty, false);
146144

147145
AssociatedObject.ScrollToHorizontalOffset(originalValue);
148-
Debug.WriteLine($"Initiating animated scroll from {originalValue} to {newValue}. Change is: {e.HorizontalChange}");
149146
DoubleAnimation scrollAnimation = new(originalValue, newValue, new Duration(duration));
150147
scrollAnimation.Completed += (_, _) =>
151148
{
152-
Debug.WriteLine("Animation completed");
153149
_desiredScrollStart = null;
154150
_isAnimatingScroll = false;
155151

0 commit comments

Comments
 (0)