private void toolAddButton_Click(object sender, EventArgs e)
        {
            CaptionButtonSkin skin = new CaptionButtonSkin();

            ActiveSkin.AddCaptionButtonSkin(skin);

            treeView.Nodes[0].Nodes.Add(MapGenericCaptionButtonSkinToTreeNode(skin));
        }
        // OLD ONE -> replace with generic button
        private TreeNode MapCaptionButtonSkinToTreeNode(CaptionButtonSkin formButtonStyle, string propertyName)
        {
            TreeNode node = new TreeNode(propertyName);

            node.Tag = formButtonStyle;
            node.Nodes.Add(MapSerializableImageToTreeNode(formButtonStyle.NormalState, CaptionButtonSkinProperty.NormalState));
            node.Nodes.Add(MapSerializableImageToTreeNode(formButtonStyle.HoverState, CaptionButtonSkinProperty.HoverState));
            node.Nodes.Add(MapSerializableImageToTreeNode(formButtonStyle.ActiveState, CaptionButtonSkinProperty.ActiveState));
            node.Nodes.Add(MapSerializableImageToTreeNode(formButtonStyle.DisabledState, CaptionButtonSkinProperty.DisabledState));
            return(node);
        }
        private TreeNode MapGenericCaptionButtonSkinToTreeNode(CaptionButtonSkin skin)
        {
            TreeNode node = new TreeNode(skin.Key);

            node.Tag = skin;
            node.Nodes.Add(MapSerializableImageToTreeNode(skin.NormalState, CaptionButtonSkinProperty.NormalState));
            node.Nodes.Add(MapSerializableImageToTreeNode(skin.HoverState, CaptionButtonSkinProperty.HoverState));
            node.Nodes.Add(MapSerializableImageToTreeNode(skin.ActiveState, CaptionButtonSkinProperty.ActiveState));
            node.Nodes.Add(MapSerializableImageToTreeNode(skin.DisabledState, CaptionButtonSkinProperty.DisabledState));
            return(node);
        }
        private void propertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            if (e.ChangedItem.Label != "Key")
            {
                return;
            }

            //---- Change the skin key
            CaptionButtonSkin skin = treeView.SelectedNode.Tag as CaptionButtonSkin;

            skin.Key = e.ChangedItem.Value.ToString();
            treeView.SelectedNode.Text = skin.Key;
        }