@@ -449,46 +449,32 @@ private void UpdatePositionAndBorder()
449449
450450 if ( horizontalLine != null )
451451 {
452- horizontalLine . WidthRequest = canvasWidth ;
453-
454452 if ( LineExtents . Width > 0 )
455453 {
456- horizontalLine . X1 = LineExtents . Left ;
457- horizontalLine . X2 = LineExtents . Right ;
454+ horizontalLine . WidthRequest = LineExtents . Width ;
458455 }
459456 else
460457 {
461- horizontalLine . X1 = 0 ;
462- horizontalLine . X2 = canvasWidth ;
458+ horizontalLine . WidthRequest = canvasWidth ;
463459 }
464460
465- horizontalLine . Y1 = Position . Y ;
466- horizontalLine . Y2 = Position . Y ;
467-
468461 horizontalLine . TranslationY = Position . Y ;
469- horizontalLine . TranslationX = horizontalLine . X1 ;
462+ horizontalLine . TranslationX = LineExtents . Left ;
470463 }
471464
472465 if ( verticalLine != null )
473466 {
474- verticalLine . HeightRequest = canvasHeight ;
475-
476467 if ( LineExtents . Height > 0 )
477468 {
478- verticalLine . Y1 = LineExtents . Top ;
479- verticalLine . Y2 = LineExtents . Bottom ;
469+ verticalLine . HeightRequest = LineExtents . Height ;
480470 }
481471 else
482472 {
483- verticalLine . Y1 = 0 ;
484- verticalLine . Y2 = canvasHeight ;
473+ verticalLine . HeightRequest = canvasHeight ;
485474 }
486475
487- verticalLine . X1 = Position . X ;
488- verticalLine . X2 = Position . X ;
489-
490476 verticalLine . TranslationX = Position . X ;
491- verticalLine . TranslationY = verticalLine . Y1 ;
477+ verticalLine . TranslationY = LineExtents . Top ;
492478 }
493479
494480 Opacity = 1 ;
0 commit comments