@@ -17,14 +17,16 @@ public partial class BreadcrumbBarLayout : NonVirtualizingLayout
1717 private Size _availableSize ;
1818 private BreadcrumbBarItem ? _ellipsisButton = null ;
1919 private WeakReference < BreadcrumbBar > ? _ownerRef ;
20+ private double _spacing = 0d ;
2021
2122 private bool _ellipsisIsRendered ;
2223 private uint _firstRenderedItemIndexAfterEllipsis ;
2324 private uint _visibleItemsCount ;
2425
25- public BreadcrumbBarLayout ( BreadcrumbBar breadcrumb )
26+ public BreadcrumbBarLayout ( BreadcrumbBar breadcrumb , double spacing )
2627 {
2728 _ownerRef = new ( breadcrumb ) ;
29+ _spacing = spacing ;
2830 }
2931
3032 protected override Size MeasureOverride ( NonVirtualizingLayoutContext context , Size availableSize )
@@ -54,16 +56,17 @@ protected override Size MeasureOverride(NonVirtualizingLayoutContext context, Si
5456
5557 protected override Size ArrangeOverride ( NonVirtualizingLayoutContext context , Size finalSize )
5658 {
57- float accumulatedWidths = 0f ;
59+ double accumulatedWidths = 0d ;
5860
5961 // Go through all items and arrange them
6062 foreach ( var item in context . Children )
6163 {
6264 if ( item is BreadcrumbBarItem breadcrumbItem )
6365 {
64- breadcrumbItem . Arrange ( new Rect ( accumulatedWidths , 0 , breadcrumbItem . DesiredSize . Width , finalSize . Height ) ) ;
66+ breadcrumbItem . Arrange ( new Rect ( accumulatedWidths , 0 , breadcrumbItem . DesiredSize . Width , breadcrumbItem . DesiredSize . Height ) ) ;
6567
66- accumulatedWidths += ( float ) breadcrumbItem . Width ;
68+ accumulatedWidths += breadcrumbItem . DesiredSize . Width ;
69+ accumulatedWidths += _spacing ;
6770 }
6871 }
6972
0 commit comments