File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -378,17 +378,17 @@ private void UpdateIndicator()
378
378
// Indicator size calculation should consider the ProgressBar's Padding property setting
379
379
if ( Orientation == Orientation . Horizontal )
380
380
{
381
- _indicator . Width = ( barSize . Width - _indicator . Margin . Left - _indicator . Margin . Right ) * percent ;
381
+ var width = ( barSize . Width - _indicator . Margin . Left - _indicator . Margin . Right ) * percent ;
382
+ _indicator . Width = width > 0 ? width : 0 ;
382
383
_indicator . Height = double . NaN ;
383
384
}
384
385
else
385
386
{
386
387
_indicator . Width = double . NaN ;
387
- _indicator . Height = ( barSize . Height - _indicator . Margin . Top - _indicator . Margin . Bottom ) *
388
- percent ;
388
+ var height = ( barSize . Height - _indicator . Margin . Top - _indicator . Margin . Bottom ) * percent ;
389
+ _indicator . Height = height > 0 ? height : 0 ;
389
390
}
390
391
391
-
392
392
Percentage = percent * 100 ;
393
393
}
394
394
}
You can’t perform that action at this time.
0 commit comments