<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PaletteSet, Pallete and other classes relations in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632926#M28562</link>
    <description>&lt;P&gt;I'm OK with WPF -&amp;nbsp; going this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is inside FillData?&lt;/P&gt;&lt;P&gt;how specific command should look? As I suppose above - just regular elements with handle click and run declared command in document context?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2017 18:18:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-18T18:18:41Z</dc:date>
    <item>
      <title>PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7631940#M28555</link>
      <description>&lt;P&gt;Trying to figure out relationship in classes for managing tool palettes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PaletteSet - class to create dockabe panel.&amp;nbsp; Bbut i cant add Palette class into there only Visual or Control. it's only for&amp;nbsp; full custom&amp;nbsp; controls?&lt;/P&gt;&lt;P&gt;Is Palette class just definition of&amp;nbsp; already created Palettes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also&amp;nbsp;Found&amp;nbsp;&lt;A href="http://help.autodesk.com/view/OARX/2018/ENU/?guid=OREFNET-Autodesk_Windows_Palettes&amp;nbsp;" target="_blank"&gt;http://help.autodesk.com/view/OARX/2018/ENU/?guid=OREFNET-Autodesk_Windows_Palettes&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;what relation of this classes to&amp;nbsp; &amp;nbsp;above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;namespace Toolpalette have own Palette class, and it completely&amp;nbsp; different thing? Who is root for&amp;nbsp;showings them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also I seen&amp;nbsp; mentions about&amp;nbsp;PaletteGroup, but not find such class in reference&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 13:17:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7631940#M28555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-18T13:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632133#M28556</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PaletteSet and Toolpalette are two different things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PaletteSet is a class (Autodesk.AutoCAD.Windows.PaletteSet class) which defines a dockable modeless container for custom user controls (Autodesk.AutoCAD.Windows.Palette instances).&lt;/P&gt;
&lt;P&gt;The Autodesk.AutoCAD.Windows.Palette only exposes two properties: the name of the Palette (the PaletteSet tab name) and the PaletteSet it is part of&lt;/P&gt;
&lt;P&gt;A Palette instance is created by adding a user control either with the PaletteSet.Add() method (Winform) or the PaletteSet.AddVisual() one (WPF).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ToolPalette is a namespace (Autodesk.AutoCAD.Windows.ToolPalette namespace) which contains the classes and the interfaces used to manage the built-in AutoCAD tool palettes.&lt;/P&gt;
&lt;P&gt;You can see &lt;A href="http://through-the-interface.typepad.com/through_the_interface/2009/10/adding-items-to-an-autocad-tool-palette-using-net.html" target="_blank"&gt;here&lt;/A&gt; an example of adding items to an AutoCAD toll palette.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 14:06:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632133#M28556</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-12-18T14:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632193#M28557</link>
      <description>&lt;P&gt;and what is&amp;nbsp;&amp;nbsp;Autodesk.Windows.Palettes Namespace&lt;SPAN&gt;&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;it create different kind&amp;nbsp; of modals, not dockable&amp;nbsp; as I understand&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 14:25:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632193#M28557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-18T14:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632212#M28558</link>
      <description>&lt;P&gt;So&amp;nbsp;&amp;nbsp;&amp;nbsp;Using PaletteSet&amp;nbsp; I can implement own controls with&amp;nbsp; list of icons and execute command&amp;nbsp;on click like "block: some_cool_block"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saw example you mentioned. Not&amp;nbsp; able to&amp;nbsp; make it run.&amp;nbsp; Should I somehow register&amp;nbsp; lisp function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   [LispFunction("TP-CREATE")]
    public ResultBuffer CreateToolPaletteCommand(&lt;/PRE&gt;&lt;P&gt;it say that it's not found&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 14:30:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632212#M28558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-18T14:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632295#M28559</link>
      <description>&lt;P&gt;Also found example without LISP function&lt;BR /&gt;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2009/10/streamlined-quicksaveas-command-for-autocad-2010.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2009/10/streamlined-quicksaveas-command-for-autocad-2010.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 14:53:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632295#M28559</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-18T14:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632818#M28560</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;Trying to figure out relationship in classes for managing tool palettes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PaletteSet - class to create dockabe panel.&amp;nbsp; Bbut i cant add Palette class into there only Visual or Control. it's only for&amp;nbsp; full custom&amp;nbsp; controls?&lt;/P&gt;&lt;P&gt;Is Palette class just definition of&amp;nbsp; already created Palettes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also&amp;nbsp;Found&amp;nbsp;&lt;A href="http://help.autodesk.com/view/OARX/2018/ENU/?guid=OREFNET-Autodesk_Windows_Palettes&amp;nbsp;" target="_blank"&gt;http://help.autodesk.com/view/OARX/2018/ENU/?guid=OREFNET-Autodesk_Windows_Palettes&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;what relation of this classes to&amp;nbsp; &amp;nbsp;above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;namespace Toolpalette have own Palette class, and it completely&amp;nbsp; different thing? Who is root for&amp;nbsp;showings them?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also I seen&amp;nbsp; mentions about&amp;nbsp;PaletteGroup, but not find such class in reference&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think you're referring to the WPF-based PaletteSet, Palette, and related classes (including PaletteGroup), which lives in AdUiPalettes.dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;They are pure WPF-based alternatives to the existing/legacy PaletteSet and Palette classes, and offer some additional functionality (the user can drag palettes and dock them to any PaletteSet). Beyond that I can't tell you much as I've not used or experimented with them thus-far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ilspy.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/440533i7757D7FE20A5B3C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ilspy.png" alt="ilspy.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 17:43:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632818#M28560</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-12-18T17:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632897#M28561</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I do it like that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using Autodesk.AutoCAD.Windows;&lt;/PRE&gt;&lt;P&gt;Declare a paletteset object variable. The best way is to do that in that class where the initialize method is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;static public Autodesk.AutoCAD.Windows.PaletteSet ZFRegisterPalette = null;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a usercontrol (a Windows or WPF Control) which will include into the Palette and declare it in the same class. You must not use WPF, when you not familiar with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;static public ZF.CAD.Register.usrRegisterPalette USrRegisterPalette = null;&lt;/PRE&gt;&lt;P&gt;Then create a command which open a Palette.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if (ZF_CAD.ZFRegisterPalette == null)
 {

     USrRegisterPalette = new ZF.CAD.Register.usrRegisterPalette()
     {

     };
     USrRegisterPalette.FillData();


     ZF_CAD.ZFRegisterPalette = new PaletteSet("ZF-Register zeichnen");

     ZF_CAD.ZFRegisterPalette.Style = 
        PaletteSetStyles.NameEditable |
        PaletteSetStyles.ShowPropertiesMenu |
        PaletteSetStyles.ShowAutoHideButton |
        PaletteSetStyles.ShowCloseButton;
      ZF_CAD.ZFRegisterPalette.MinimumSize = new System.Drawing.Size(800, 400);

      ZF_CAD.ZFRegisterPalette.Add("ZF-Register zeichnen", USrRegisterPalette);
 }
 else
 {
      USrRegisterPalette.FillData();
}
ZF_CAD.ZFRegisterPalette.Visible = true;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Now the ZFRegisterpalette can be used as a normal AutoCAD Palette.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Jürgen&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 18:05:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632897#M28561</guid>
      <dc:creator>Juergen_Becker</dc:creator>
      <dc:date>2017-12-18T18:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632926#M28562</link>
      <description>&lt;P&gt;I'm OK with WPF -&amp;nbsp; going this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is inside FillData?&lt;/P&gt;&lt;P&gt;how specific command should look? As I suppose above - just regular elements with handle click and run declared command in document context?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 18:18:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632926#M28562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-18T18:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632932#M28563</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the filldata method only fills the usercontrol with the needed datas. Not so important for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the CommandMethod definition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("ZF_Register", CommandFlags.Session)]
public static void ZF_Register()
{


}&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Dec 2017 18:22:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7632932#M28563</guid>
      <dc:creator>Juergen_Becker</dc:creator>
      <dc:date>2017-12-18T18:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7633127#M28564</link>
      <description>&lt;P&gt;Here's the way I typically use.&lt;/P&gt;
&lt;P&gt;The CMD_PALETTE command shows the palette (it creates it if not already created).&lt;/P&gt;
&lt;P&gt;In this example, the palette owns 2 tabs (a user control defined with Winform: WinFormUserControl-, the other one with WPF: WpfUserControl) which should contains controls to interact with AutoCAD.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can read French, you can see &lt;A href="http://gilecad.azurewebsites.net/UserInterfaces.aspx" target="_blank"&gt;this tutorial&lt;/A&gt; about AutoCAD user interfaces (specifically the &lt;A href="http://gilecad.azurewebsites.net/UserInterfaces.aspx#paletteWinForm" target="_blank"&gt;Palette&lt;/A&gt; and &lt;A href="http://gilecad.azurewebsites.net/UserInterfaces.aspx#paletteWpf" target="_blank"&gt;Palette avec MVVM&lt;/A&gt; topics).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Windows;
using System;
using AcAp = Autodesk.AutoCAD.ApplicationServices.Application;

namespace AcadUISample.Palette
{
    public class Commands
    {
        static PaletteSet palette;
        static bool wasVisible;;
        
        [CommandMethod("CMD_PALETTE")]
        public void ShowPaletteSet()
        {
            if (palette == null)
            {
                palette = new PaletteSet(
                    "Palette", // the palette set name
                    "CMD_PALETTE", // the command name
                    new Guid("{1836C7AC-C70E-4CF7-AA05-F6298D257046}")); a GUID used by AutoCAD to restore the palettte state
                palette.Style =
                    PaletteSetStyles.ShowAutoHideButton |
                    PaletteSetStyles.ShowCloseButton |
                    PaletteSetStyles.ShowPropertiesMenu;
                palette.MinimumSize = new System.Drawing.Size(300, 300);
		// Add a palette using a class derived from System.Windows.Form.UserControl
                palette.Add("WinForm Palette", new WinFormUserControl());
		// Add a palette using a class derived from System.Windows.Controls.UserControl
		palette.AddVisual("WPF Palette", new WpfUserControl());
                
                // automatically hide the palette on 'no document state'.
                var docs = AcAp.DocumentManager;
                docs.DocumentBecameCurrent += (s, e) =&amp;gt; 
                    palette.Visible = e.Document == null ? false : wasVisible;
                docs.DocumentCreated += (s, e) =&amp;gt; 
                    palette.Visible = wasVisible;
                docs.DocumentToBeDeactivated += (s, e) =&amp;gt; 
                    wasVisible = palette.Visible;
                docs.DocumentToBeDestroyed += (s, e) =&amp;gt;
                {
                    wasVisible = palette.Visible;
                    if (docs.Count == 1)
                        palette.Visible = false;
                };
            }
            palette.Visible = true;
        }
    }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 19:38:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7633127#M28564</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2017-12-18T19:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: PaletteSet, Pallete and other classes relations</title>
      <link>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7633708#M28565</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;I'm OK with WPF -&amp;nbsp; going this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is inside FillData?&lt;/P&gt;&lt;P&gt;how specific command should look? As I suppose above - just regular elements with handle click and run declared command in document context?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In the very early versions of the AutoCAD API (pre-2008 or -2009, I believe), the PaletteSet class was &lt;EM&gt;sealed&lt;/EM&gt;, and you could not derive specializations from it. Then the ribbon and floating Layer properties palette came along, and Autodesk unsealed the PaletteSet class and made some of its methods/properties virtual so they can overridden in derived types. The ribbon is hosted by a class derived from PaletteSet, and all other managed PaletteSets that come in the box (like the Layer Palette) use specialized derived types that allow much greater control over the PaletteSet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unlike&amp;nbsp;the examples given by both&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;@&amp;nbsp;and&amp;nbsp;@Anonymous_Becke, I think it is better in the long-term to follow that same pattern and derive a class from the PaletteSet and create an instance of that rather than the base PaletteSet class. That gives you a way to initialize it internally in the constructor, so that it has no external dependence on the command that shows it. The command that shows your PaletteSet should &lt;EM&gt;do nothing&lt;/EM&gt; other than create an instance of the PaletteSet and call it's Visible method. The rest should be handled internally by the PaletteSet (in a derived type, just place all of the code that initializes it in the constructor). You don't want a UI component like a PaletteSet to have a dependence on a command method, or any other code for that matter, because you may want/need to create and show the PaletteSet from some other place or context, and you would need to replicate all of the Initialization code that is done in the commands shown in the examples from&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2144608"&gt;@Juergen_Becker&lt;/a&gt;&amp;nbsp;in any other place where you need to create/show the PaletteSet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just as we don't (and should not) use the System.Windows.Forms.Form class directly (Visual Studio creates a class derived from it when you add a Windows Form to your project), we also shouldn't do that with the PaletteSet either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see a very basic example of using a PaletteSet by deriving a class from it in &amp;gt;&lt;A href="https://forums.autodesk.com/t5/net/switching-contexts/m-p/7329038#M54890" target="_blank"&gt;this pos&lt;/A&gt;t&amp;lt;, which also shows how to run code in the document context from the click handler of a Button or other control on a PaletteSet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 00:53:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/paletteset-pallete-and-other-classes-relations/m-p/7633708#M28565</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-12-19T00:53:17Z</dc:date>
    </item>
  </channel>
</rss>

