View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001842 | NoesisGUI | C# SDK | public | 2020-11-26 00:30 | 2020-11-26 13:17 |
| Reporter | ai_enabled | Assigned To | sfernandez | ||
| Priority | normal | Severity | minor | ||
| Status | resolved | Resolution | no change required | ||
| Product Version | 3.0.6 | ||||
| Summary | 0001842: Text in Grid is not trimmed properly | ||||
| Description | Hi guys, here is a snippet for XamlToy:
Only (only!) if you replace Auto with * for the first column the text there will be trimmed properly. Regards! | ||||
| Platform | Any | ||||
|
Surprisingly, it's also failing in WPF as I've just tested. |
|
|
The workaround I've found: (works in both NoesisGUI and WPF)
Interestingly, if I swap elements (while keeping their DockPanel.Dock properties) the issue appears again. It seems the order of TextBlock inside the panel matters! |
|
|
In the case of the Grid the behavior is totally expected, you defined the first column to be Auto, allowing the first TextBlock to grow as much as it needs to fit all the text, so no trimming is possible. In the case of the DockPanel the behavior is also as expected because DockPanel allocates the space required by its children in order. You can achieve the same result as with the working DockPanel layout by using a Grid with the second column set to Auto: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
Thank you for a great explanation, Sergio! You can close this ticket unless you're planning to break WPF compatibility for the good! :-) |
|
|
We'll stick to WPF behavior :) |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2020-11-26 00:30 | ai_enabled | New Issue | |
| 2020-11-26 00:32 | ai_enabled | Note Added: 0006821 | |
| 2020-11-26 00:48 | ai_enabled | Note Added: 0006822 | |
| 2020-11-26 10:14 | sfernandez | Assigned To | => sfernandez |
| 2020-11-26 10:14 | sfernandez | Status | new => feedback |
| 2020-11-26 10:14 | sfernandez | Note Added: 0006823 | |
| 2020-11-26 12:30 | ai_enabled | Note Added: 0006825 | |
| 2020-11-26 12:30 | ai_enabled | Status | feedback => assigned |
| 2020-11-26 12:32 | ai_enabled | Note Edited: 0006825 | |
| 2020-11-26 13:17 | sfernandez | Status | assigned => resolved |
| 2020-11-26 13:17 | sfernandez | Resolution | open => no change required |
| 2020-11-26 13:17 | sfernandez | Note Added: 0006826 |