public static ToolStripItemReference ToReference(this IToolStripItem item) { IBinding itemBinding = new Binding() { Source = item }; if (item is FlexibleSpaceToolStripItem spaceRef) { return new ToolStripFlexibleSpaceReference() { [!ToolStripItemReference.TargetItemProperty] = itemBinding } } ; else { return new ToolStripItemReference() { [!ToolStripItemReference.TargetItemProperty] = itemBinding } }; } }
public void _setToolStripItem(IToolStripItem nToolStripItem) { mToolStripItem = nToolStripItem; }
public ToolStripItemAdapt() { mToolStripItem = null; mContain = null; mType = null; }