Conversation
…esized The Description, Unsecure Configuration and Secure Configuration group boxes each used a different anchor set: Description anchored Top, Secure Configuration anchored Bottom, and Unsecure Configuration anchored neither, so it drifted to the vertical centre. Growing the Update Existing Step window therefore spread the three boxes apart and left large empty bands between them instead of enlarging the multiline fields. Host the three group boxes in a single-column TableLayoutPanel anchored to all four edges, with percentage rows (22/34/44) that reproduce the original proportions at the designer size and share any extra height between the three fields.
…nfig fields The Description field is normally a single line, so growing it with the window wasted the space the Unsecure/Secure Configuration editors need. Pin its row to its designer height (89px) and split all remaining height between the two configuration fields.
…fit its value grpGeneral had no Anchor at all, so the entire left column stayed 451x229 no matter how far the window was stretched, and the Filtering Attributes field clipped long attribute lists with WordWrap off, ScrollBars None and ReadOnly on - leaving no way to read the value except the selection dialog. Split the form horizontally with tlpMain (51.1%/48.9%) so both columns widen, with the left column's controls hosted in pnlLeftColumn and grpGeneral anchored Top|Left|Right. At the designer size the geometry is unchanged: grpGeneral is 451x229 at x=12 and the right column is 439 wide at x=466, exactly as before. Filtering Attributes now word-wraps and grows into the spare vertical space of the left column, bounded by what the value actually needs, with the rows below it and the group boxes under grpGeneral shifting down by the same amount. When there is no spare room it falls back to a vertical scrollbar. The "..." button no longer stretches with the field.
There was a problem hiding this comment.
Pull request overview
This PR improves the WinForms “Register New Step / Update Existing Step” dialog layout so both columns resize with the window and the Filtering Attributes field becomes readable for long attribute lists by wrapping and expanding vertically when space allows.
Changes:
- Restructures the form into a two-column
tlpMainand anchors/docks containers so both left and right columns can widen and the right column can grow vertically. - Adds runtime layout logic to grow
crmFilteringAttributesbased on measured content height and available spare height in the left column, shifting controls below accordingly. - Updates
CrmAttributeSelectionControlto expose aContentHeightmeasurement and adjusts the selector button anchoring to avoid stretching.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Xrm.Sdk.PluginRegistration/Forms/StepRegistrationForm.Designer.cs | Introduces tlpMain/pnlLeftColumn/tlpRightColumn and adjusts anchoring/docking to enable responsive two-column layout. |
| Xrm.Sdk.PluginRegistration/Forms/StepRegistrationForm.cs | Implements capture/apply logic to dynamically size the Filtering Attributes control and reposition dependent controls during resize/content changes. |
| Xrm.Sdk.PluginRegistration/Controls/CrmAttributeSelectionControl.Designer.cs | Updates the ... button anchoring so it no longer stretches vertically with the text field growth. |
| Xrm.Sdk.PluginRegistration/Controls/CrmAttributeSelectionControl.cs | Adds ContentHeight for measuring wrapped text height and supports the new resize behavior. |
Files not reviewed (2)
- Xrm.Sdk.PluginRegistration/Controls/CrmAttributeSelectionControl.Designer.cs: Generated file
- Xrm.Sdk.PluginRegistration/Forms/StepRegistrationForm.Designer.cs: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #169, covering the left-hand column of the same dialog. Builds on #170.
Important
Stacked on top of the right-column PR — please merge that one first.
The commit here moves
tlpRightColumn(introduced by that PR) into a newtlpMain, so it cannot stand alone onmaster. Because the base branch lives in a fork, this PR has to targetmasterdirectly and therefore shows the right-column commits as well. Once the right-column PR is merged, the diff here reduces to the single left-column commit.The left-column change on its own:
fix/step-form-right-column-layout...fix/step-form-left-column-layoutProblem
Two separate things, both visible when the window is stretched:
grpGeneralhad noAnchorat all, so it defaulted toTop, Leftand stayed frozen at 451x229 no matter how far the window was dragged — horizontally or vertically. Every field inside it already hadLeft, Rightanchors and was ready to widen; it just never got the chance. At 1400px wide there is roughly 500px of unused width sitting next to a clippedNamefield.Filtering Attributes clipped its value with no way to read it.
txtAttributesisMultilinebut was configuredWordWrap = false,ReadOnly = true, andScrollBars = None(set inStepRegistrationForm.cs). A 20-attribute list rendered asaccountnumber, accountratingcode, address1_city, addr...and could not be scrolled, wrapped, or selected past the edge. The only way to see the whole value was to open the...dialog.Fix
Both columns now widen. A new
tlpMainsplits the form 51.1% / 48.9%. The left column's controls are hosted in a newpnlLeftColumn, andgrpGeneralis anchoredTop, Left, Right. AnchoringgrpGeneralto the right on its own would not work — its right edge would follow the frame while the right column's left edge stayed put, and the two would overlap — so the width has to actually be split.Filtering Attributes grows to fit its value. It now word-wraps and expands into the spare vertical space of the left column, bounded by what the value actually needs. The rows below it and the group boxes under
grpGeneralshift down by the same amount. When there is no spare room it falls back to a vertical scrollbar.A new
ContentHeightproperty onCrmAttributeSelectionControlmeasures the height the value needs at the current width. The...button lost itsBottomanchor so it no longer stretches to the full height of the grown field.Before / after
Both captured at a client size of 1400x900, with a 20-attribute filtering list.
Tall and narrow, 907x1100 — the field wraps to more lines because the column is narrower:
Measured behaviour
grpGeneralTwo things worth reading off that table:
grpGeneralis 451x229 at x=12 and the right column is 439 wide at x=466.Testing
StepRegistrationForm.Designer.csandCrmAttributeSelectionControl.Designer.csof each branch, resized at runtime.Notes
DisabledMessageshown when the message/entity does not support filtered attributes) forces growth to0, so the field stays at its original height. That path was not rendered during testing.UpdatePluginEventHandlerControlscopiescmbPlugins.Location/.SizeontocmbWebhookandcmbServiceEndpoint. All three move together with the rest of the rows, so the three stacked combos stay in sync.