/// <summary> /// Attaches the Shell32 ImageList to the TreeView /// </summary> /// <param name="helper">Helper class to have access to managed TreeView instance</param> protected virtual void AttachSystemImageList(TreeViewFolderBrowserNodeFactory helper) { if (_checkboxMode != helper.TreeView.CheckBoxBehaviorMode | _systemImageList == null) { // checkboxes recreate the control internal if (this._systemImageList != null) { Raccoom.Win32.SystemImageListHelper.SetTreeViewImageList(helper.TreeView, _systemImageList, false); } // create on demand if (_systemImageList == null) { // Shell32 ImageList _systemImageList = new Raccoom.Win32.SystemImageList(Raccoom.Win32.SystemImageListSize.SmallIcons); Raccoom.Win32.SystemImageListHelper.SetTreeViewImageList(helper.TreeView, _systemImageList, false); } } _checkboxMode = helper.TreeView.CheckBoxBehaviorMode; }