You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
static ProportionalStackPanel(){AffectsParentMeasure<ProportionalStackPanel>(IsCollapsedProperty);AffectsParentArrange<ProportionalStackPanel>(IsCollapsedProperty);// Delete this two// AffectsParentMeasure<ProportionalStackPanel>(ProportionProperty);// AffectsParentArrange<ProportionalStackPanel>(ProportionProperty);}
...
ProportionalStackPanelSplitter.axaml.cs
...
private void SetTargetProportion(double dragDelta){varpanel= GetPanel();if(panel==null){return;}vartarget= GetTargetElement(panel);if(target isnull){return;}varchild= FindNextChild(panel);vartargetElementProportion= ProportionalStackPanel.GetProportion(target);varneighbourProportion= child is not null? ProportionalStackPanel.GetProportion(child):double.NaN;vardProportion=dragDelta/(panel.Orientation == Orientation.Vertical ? panel.Bounds.Height : panel.Bounds.Width);if(targetElementProportion+dProportion<0){dProportion=-targetElementProportion;}if(neighbourProportion-dProportion<0){dProportion=+neighbourProportion;}targetElementProportion+=dProportion;neighbourProportion-=dProportion;varminProportion= GetValue(MinimumProportionSizeProperty)/(panel.Orientation == Orientation.Vertical ? panel.Bounds.Height : panel.Bounds.Width);if(targetElementProportion<minProportion){dProportion=targetElementProportion-minProportion;neighbourProportion+=dProportion;targetElementProportion-=dProportion;}elseif(neighbourProportion<minProportion){dProportion=neighbourProportion-minProportion;neighbourProportion-=dProportion;targetElementProportion+=dProportion;}
ProportionalStackPanel.SetProportion(target, targetElementProportion);if(child is not null){
ProportionalStackPanel.SetProportion(child, neighbourProportion);}// Invalidate Measure and Arrange of the panel
panel.InvalidateMeasure();
panel.InvalidateArrange();}
...
I know that this bug isn't on your side and maybe it will disappear with new version of Avalonia, but it ruins the user experience and is very annoying for now.
Dock Version: 11.1.0.3
OS: Windows 11
The text was updated successfully, but these errors were encountered:
Technically, the bug was on my side, because Proportion is changed from MeasureOverride and InvalidateMeasure from within MeasureOverride is not allowed. Your solution works, but I think the ProportionProperty should stay "AffectsParentMeasure/Arrange", so that changes from the outside could trigger the relayout.
My idea: #367
While dragging splitter, application freezes with Layout cycling. You can see this behaviour on video:
Dock.freezes.mp4
Output log prints this:
After research of reason of this bug, I noticed that this behaviour starts after #322 pull request.
As solution for this bug is delete
AffectsParentMeasure
andAffectsParentArrange
in ProportionalStackPanel, and callInvalidateMeasure
andInvalidateArrange
of the panel in ProportionalStackPanelSplitter.SetTargetProportion method.Code:
ProportionalStackPanel.cs
ProportionalStackPanelSplitter.axaml.cs
I know that this bug isn't on your side and maybe it will disappear with new version of Avalonia, but it ruins the user experience and is very annoying for now.
Dock Version:
11.1.0.3
OS: Windows 11
The text was updated successfully, but these errors were encountered: