View Issue Details

IDProjectCategoryView StatusLast Update
0003451NoesisGUIC++ SDKpublic2026-04-27 12:17
ReporterFrancoisRecisio Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version3.2.3 
Target Version3.2.14 
Summary0003451: WrapPanel elements cannot be centered with multiple lines (or columns)
Description

Currently, the behavior of the wrap panel is the same as in WPF. However, it would be a nice addition to be able to center (or right-align) the children of a wrap panel when there are multiple lines.

To succeed, I simply duplicated the WrapPanel class and added a "float offset" argument to the ArrangeLine method. Then I do "Point(x + offset, y)" to arrange the child.
In offset, I send :
(finalSize.width - accumW) * 0.5f => to center the child
(finalSize.width - accumW) => to right-align

As I simply duplicated the current WrapPanel code, maybe it would be better to include this change in the source code directly, in a next version? With a property to enable it or not. It would be great!

Attached Files
current.png (87,757 bytes)   
current.png (87,757 bytes)   
fixed.png (93,498 bytes)   
fixed.png (93,498 bytes)   
PlatformAny

Activities

Demond

Demond

2024-07-03 15:40

reporter   ~0009737

Last edited: 2024-07-03 15:57

Good idea!
https://stackoverflow.com/questions/806777/wpf-how-can-i-center-all-items-in-a-wrappanel

Issue History

Date Modified Username Field Change
2024-07-03 11:16 FrancoisRecisio New Issue
2024-07-03 11:16 FrancoisRecisio File Added: current.png
2024-07-03 11:16 FrancoisRecisio File Added: fixed.png
2024-07-03 15:40 Demond Note Added: 0009737
2024-07-03 15:57 Demond Note Edited: 0009737
2024-07-04 13:43 jsantos Assigned To => sfernandez
2024-07-04 13:43 jsantos Status new => assigned
2024-07-04 13:43 jsantos Target Version => 3.2.5
2024-10-24 16:43 sfernandez Target Version 3.2.5 => 3.2.6
2024-11-22 18:18 jsantos Target Version 3.2.6 => 3.2.7
2025-01-20 17:43 jsantos Target Version 3.2.7 => 3.2.8
2025-06-06 12:52 jsantos Target Version 3.2.8 => 3.2.9
2025-10-02 00:48 jsantos Target Version 3.2.9 => 3.2.10
2025-10-20 18:25 jsantos Target Version 3.2.10 => 3.2.11
2026-01-20 19:32 jsantos Target Version 3.2.11 => 3.2.12
2026-03-04 00:39 jsantos Target Version 3.2.12 => 3.2.13
2026-04-27 12:17 jsantos Target Version 3.2.13 => 3.2.14