.NET WPF supported?

 I´m .NET developer on AutoCad and I would like to start developing with BricsCad
Now I´m using PaletteSet.AddVisual() to start WPF controls but as I can see this feature is not yet supported in BricsCad.

Is there another way to include WPF controls?
It is intended to support WPF soon?

Comments

  • WPF works fine with Bricscad.  I've been using it since v13.  Check the API \dotNet directory for info and examples to get you started.
  • Hello,

    An ElemetHost needs to be used.
    See example code for a palette in BricsCAD.

            #region PalettesetWpf
            public static _AcWnd.PaletteSet ps_wpf = null;
            public static WPF Palette_WPF = null;
            public static ElementHost host = new ElementHost();

            [CommandMethod("PaletteWPF")]
            public static void CreatePaletteWPF()
            {
                if (ps_wpf == null)
                {
                    ps_wpf = new _AcWnd.PaletteSet("WPF");
                    Palette_WPF = new WPF();
                    ElementHost host = new ElementHost();
                    host.AutoSize = true;
                    host.Dock = DockStyle.Fill;
                    host.Child = Palette_WPF;
                    ps_wpf.Add("Add ElementHost", host);
                    ps_wpf.Visible = true;
                    host.Refresh();
                }
                else
                {
                    ps_wpf.Visible = true;
                }
            }
            #endregion PalettesetWpf

This discussion has been closed.