/// <summary> /// Gets the <see cref="WinFormsToolStripItemProvider"/> for this <see cref="ToolStripItem"/>. /// </summary> /// <param name="source">The source menu.</param> /// <returns>The <see cref="WinFormsToolStripItemProvider"/> for this <see cref="ToolStripItem"/>.</returns> public static ITreeMappingProvider GetTreeMappingProvider(this ToolStripItem source) { var controlProvider = source.Get <WinFormsToolStripItemProvider>(); // Assign the ToolStripItem source. controlProvider.Source = source; return(controlProvider); }