ListView: Fix sticky group header overlapping top header
This commit is contained in:
Родитель
e87c0a5a5b
Коммит
436ea3617c
|
@ -59,7 +59,11 @@ namespace Telerik.UI.Xaml.Controls.Data.ListView.Model
|
|||
|
||||
this.strategy.RecycleAfterMeasure();
|
||||
this.model.View.ItemCheckBoxService.GenerateVisuals();
|
||||
this.strategy.GenerateFrozenContainers();
|
||||
|
||||
if (this.ShouldGenerateFrozenContainers())
|
||||
{
|
||||
this.strategy.GenerateFrozenContainers();
|
||||
}
|
||||
|
||||
return resultSize;
|
||||
}
|
||||
|
@ -186,6 +190,26 @@ namespace Telerik.UI.Xaml.Controls.Data.ListView.Model
|
|||
this.owner.UpdateService.RegisterUpdate((int)UpdateFlags.AffectsContent);
|
||||
}
|
||||
|
||||
private bool ShouldGenerateFrozenContainers()
|
||||
{
|
||||
if (this.headerModel == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var layoutSlot = this.headerModel.LayoutSlot;
|
||||
var scrollOffset = this.owner.ScrollOffset;
|
||||
|
||||
if (this.strategy.IsHorizontal)
|
||||
{
|
||||
return scrollOffset >= layoutSlot.Right;
|
||||
}
|
||||
else
|
||||
{
|
||||
return scrollOffset >= layoutSlot.Bottom;
|
||||
}
|
||||
}
|
||||
|
||||
private RadSize MeasureHorizontal(RadSize newAvailableSize)
|
||||
{
|
||||
var measureConstraints = newAvailableSize;
|
||||
|
|
Загрузка…
Ссылка в новой задаче