dotnet / dotnet/dotnet-api-docs
What cause the assignement of parent
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
I juggle with ToolstripItem between different ContextMenuStrip. I found when I add the first item (which come from another ContextMenuStrip) the GetGurrentParent() return null. When I add the second item, then the first item got a parent assigned but second not. Same now for second item, when a third item is added, the parent for second is assign.
So I add a fake item and removed it, but is there a good way to refresh the parent?
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 5ee4ee64-a4ad-e05a-e060-504f3b396e9c
* Version Independent ID: dbc0e190-e521-0d35-340e-8a44ca40c5fc
* Content: [ToolStripItem.Parent Property (System.Windows.Forms)](https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.toolstripitem.parent?view=netframework-4.7.2)
* Content Source: [xml/System.Windows.Forms/ToolStripItem.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Windows.Forms/ToolStripItem.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.