Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port DataGridviewDesigner to runtime #9677

Merged

Conversation

Epica3055
Copy link
Member

@Epica3055 Epica3055 commented Aug 7, 2023

Related to #4908

Proposed changes

  • Port DataGridviewDesigner to runtime

Customer Impact

  • DataGridviewDesigner can be designed in runtime

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

image

After

005

Test methodology

  • Manually (added DataGridviewDesigner to DemoConsole test app)

Test environment(s)

  • .Net 8.0.0-rc.1.23401.22
Microsoft Reviewers: Open in CodeFlow

@ghost ghost assigned Epica3055 Aug 7, 2023
@Epica3055 Epica3055 changed the title Issue 4908 port DataGridviewDesigner port DataGridviewDesigner to runtime Aug 7, 2023
@Epica3055 Epica3055 changed the title port DataGridviewDesigner to runtime Port DataGridviewDesigner to runtime Aug 7, 2023
@ghost ghost added the draft draft PR label Aug 7, 2023
@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch from d1d524b to 015e4d3 Compare August 8, 2023 00:55
Epica3055 added a commit to Epica3055/winforms that referenced this pull request Aug 10, 2023
@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch from 015e4d3 to 44a4d4e Compare August 10, 2023 01:56
Epica3055 added a commit to Epica3055/winforms that referenced this pull request Aug 10, 2023
@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch 2 times, most recently from 18b1fb8 to c048d14 Compare August 10, 2023 10:25
Epica3055 added a commit to Epica3055/winforms that referenced this pull request Aug 10, 2023
Epica3055 added a commit to Epica3055/winforms that referenced this pull request Aug 14, 2023
@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch from c048d14 to 5b02b83 Compare August 14, 2023 09:34
Epica3055 added a commit to Epica3055/winforms that referenced this pull request Aug 14, 2023
@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch 8 times, most recently from cf300d4 to f0c305a Compare August 17, 2023 06:17
Epica3055 added a commit to Epica3055/winforms that referenced this pull request Aug 17, 2023
@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch from f0c305a to 5fc4031 Compare August 17, 2023 07:02
@Epica3055 Epica3055 changed the base branch from feature/9.0 to main August 17, 2023 07:02
@Epica3055 Epica3055 marked this pull request as ready for review August 17, 2023 07:58
@Epica3055 Epica3055 requested a review from a team as a code owner August 17, 2023 07:58
@ghost ghost removed the draft draft PR label Aug 17, 2023
return true;
}

private class ListBoxItem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this class to a dedicated file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a small nested class, there are quite a few of this class in this PR.
Do really need to extract every one of them into a separate file?
Or did you mean: just extract every one of them out of the class but it still remain in the file? like this:
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these classes were nested before, they should stay nested. I meant extracting each small class into a small file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes , there are nested before.

Copy link
Member

@Tanya-Solyanik Tanya-Solyanik Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move these classes into dedicated files. You should name these new files like this - DataGridViewAddColumnDialog.ListBoxItem.cs. You will have to declare DataGridViewAddColumnDialog as partial class. See https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/ControlDesigner.ChildSubClass.cs for an example.

@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch from c091cc4 to 330d2a4 Compare September 1, 2023 06:07
lonitra
lonitra previously approved these changes Sep 1, 2023
Copy link
Member

@lonitra lonitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lonitra lonitra added the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Sep 1, 2023
@Tanya-Solyanik Tanya-Solyanik added 📭 waiting-author-feedback The team requires more information from the author and removed ready-to-merge PRs that are ready to merge but worth notifying the internal team. labels Sep 1, 2023
@ghost ghost removed the 📭 waiting-author-feedback The team requires more information from the author label Sep 5, 2023
@Epica3055 Epica3055 force-pushed the Issue_4908_Port_DataGridViewDesigner branch from 6a3790e to 95289e7 Compare September 5, 2023 07:25
Copy link
Member

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@@ -19,7 +19,7 @@ internal class TableLayoutPanelBehavior : Behavior
private BehaviorService behaviorService; //used for bounds translation
private IServiceProvider serviceProvider; //cached to allow our behavior to get services
private TableLayoutPanelResizeGlyph tableGlyph; //the glyph being resized
private DesignerTransaction resizeTransaction; //used to make size adjustements within transaction
private DesignerTransaction resizeTransaction; //used to make size adjustments within transaction
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Tanya-Solyanik Tanya-Solyanik added the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Sep 7, 2023
@Tanya-Solyanik Tanya-Solyanik merged commit 61b929a into dotnet:main Sep 7, 2023
9 checks passed
@ghost ghost removed the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Sep 7, 2023
@John-Qiao
Copy link
Member

Verified it in the main branch of Winforms repo for .Net 9.0, the DataGridviewDesigner can be designed in DemoConsole app runtime now.

9677-testresult

@ghost ghost locked as resolved and limited conversation to collaborators Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants