@@ -154,7 +154,7 @@ public override void BringIntoView(UIElement element, RectangleF elementBounds)
154
154
if ( IsHorzCentering )
155
155
differenceX = CalculateCenteredScrollPos ( elementBounds . X , elementBounds . Width , ActualPosition . X , ActualWidth ) ;
156
156
else if ( _doScroll )
157
- differenceX = CalculateVisibleScrollDifference ( elementBounds . X , elementBounds . Width , ActualPosition . X , ActualWidth ) ;
157
+ differenceX = CalculateVisibleScrollDifference ( elementBounds . X , elementBounds . Width , ActualPosition . X , ActualWidth ) ;
158
158
159
159
if ( IsVertCentering )
160
160
differenceY = CalculateCenteredScrollPos ( elementBounds . Y , elementBounds . Height , ActualPosition . Y , ActualHeight ) - _actualScrollOffsetY ;
@@ -173,7 +173,7 @@ protected float CalculateVisibleScrollDifference(double elementPos, double eleme
173
173
{
174
174
double difference = 0.0f ;
175
175
if ( elementPos + elementSize > actualPos + actualSize )
176
- difference = - ( elementPos + elementSize - actualPos - actualSize ) ;
176
+ difference = - ( elementPos + elementSize - actualPos - actualSize ) ;
177
177
if ( elementPos + difference < actualPos )
178
178
difference = actualPos - elementPos ;
179
179
return ( float ) difference ;
@@ -260,7 +260,7 @@ public override void Render(RenderContext parentRenderContext)
260
260
{
261
261
if ( OpacityMask == null && ( TotalHeight > ActualHeight || TotalWidth > ActualWidth ) )
262
262
{
263
- SolidColorBrush brush = new SolidColorBrush { Color = Color . Black } ;
263
+ SolidColorBrush brush = new SolidColorBrush { Color = Color . Black } ;
264
264
OpacityMask = brush ;
265
265
_forcedOpacityMask = true ;
266
266
}
@@ -288,7 +288,7 @@ public override void SaveUIState(IDictionary<string, object> state, string prefi
288
288
base . SaveUIState ( state , prefix ) ;
289
289
state [ prefix + "/ScrollOffsetX" ] = _scrollOffsetX ;
290
290
state [ prefix + "/ScrollOffsetY" ] = _scrollOffsetX ;
291
- }
291
+ }
292
292
293
293
public override void RestoreUIState ( IDictionary < string , object > state , string prefix )
294
294
{
@@ -450,7 +450,7 @@ public bool FocusPageDown()
450
450
{
451
451
if ( currentElement . ActualPosition . Y + currentElement . ActualHeight + DELTA_DOUBLE > ActualPosition . Y + ActualHeight )
452
452
// Already at bottom
453
- limitPosition = ( float ) ( ActualPosition . Y + 2 * ActualHeight ) ;
453
+ limitPosition = ( float ) ( ActualPosition . Y + 2 * ActualHeight ) ;
454
454
else
455
455
limitPosition = ( float ) ( ActualPosition . Y + ActualHeight ) ;
456
456
}
@@ -526,7 +526,7 @@ public bool FocusPageRight()
526
526
{
527
527
if ( currentElement . ActualPosition . X + ActualWidth + DELTA_DOUBLE > ActualPosition . X + ActualWidth )
528
528
// Already at right
529
- limitPosition = ( float ) ( ActualPosition . X + 2 * ActualWidth ) ;
529
+ limitPosition = ( float ) ( ActualPosition . X + 2 * ActualWidth ) ;
530
530
else
531
531
limitPosition = ( float ) ( ActualPosition . X + ActualWidth ) ;
532
532
}
@@ -651,6 +651,11 @@ public bool IsViewPortAtRight
651
651
get { return TemplateControl == null || - _actualScrollOffsetX + ActualWidth + DELTA_DOUBLE >= TotalWidth ; }
652
652
}
653
653
654
+ public int NumberOfVisibleLines
655
+ {
656
+ get { return 0 ; /* As we are scrolling only by pixels here, we keep the default behavior */ }
657
+ }
658
+
654
659
#endregion
655
660
}
656
661
}
0 commit comments