Commit ee24994
committed
Fix AG_E_LAYOUT_CYCLE crash in widgets due to MinHeight exceeding MaxHeight
When rendering adaptive cards in widgets with fixed dimensions, setting
a MinHeight value greater than the MaxHeight constraint caused XAML to
throw AG_E_LAYOUT_CYCLE (0x802B0014), resulting in widget crashes.
Changes:
- XamlBuilder.cpp: Clamp card MinHeight to not exceed fixed height when
fixedDimensions are set, preventing impossible layout constraints
- AdaptiveCarouselRenderer.cpp: Apply same constraint validation for
carousel elements with HeightInPixels property
The fix ensures MinHeight never exceeds MaxHeight by automatically
clamping the value to the maximum allowed height, allowing cards to
render successfully without layout cycle errors.1 parent 368bb76 commit ee24994
File tree
2 files changed
+20
-3
lines changed2 files changed
+20
-3
lines changedLines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
102 | 111 | | |
103 | 112 | | |
104 | | - | |
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| |||
0 commit comments