-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine PropertyGrid tab information.
Combine tab related data into a record for clarity and safety. Use a List<> instead of an array to avoid complicated insert logic. Maintain tab selection as an instance instead of an index. Move error handling to CreateTab so thrown exceptions with messages (missing a bitmap / name for the tab) are actually thrown instead of a silent failure.
- Loading branch information
1 parent
55b1274
commit 73bfe7e
Showing
4 changed files
with
219 additions
and
273 deletions.
There are no files selected for viewing
This file contains 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
19 changes: 19 additions & 0 deletions
19
src/System.Windows.Forms/src/System/Windows/Forms/PropertyGrid.TabInfo.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
#nullable disable | ||
|
||
using System.ComponentModel; | ||
using System.Windows.Forms.Design; | ||
|
||
namespace System.Windows.Forms | ||
{ | ||
public partial class PropertyGrid | ||
{ | ||
private record TabInfo(PropertyTab Tab, PropertyTabScope Scope, ToolStripButton Button) | ||
{ | ||
public Type TabType => Tab.GetType(); | ||
} | ||
} | ||
} |
Oops, something went wrong.