WPF Databinding to the CommandLine Colors

by Fenton Webb

Using WPF databinding, you can actually bind your WPF colors to the CommandLine color settings.

This can be achieved using the Autodesk.AutoCAD.Windows.Data.DataBindings.ColorSettings ObserveableCollection.

The possible color settings property names are:

  • CommandLineForeground
  • CommandLineBackground

  • CommandLineHistoryForeground
  • CommandLineHistoryBackground
  • CommandLineTempPromptForeground
  • CommandLineTempPromptBackground
  • CommandLineKeywordHighlight
  • CommandLineKeywordBackground
  • CommandLineKeywordHover
  • If you want a good example of how to use the Autodesk.AutoCAD.Windows.Data.DataBindings collections then check out this blog http://adndevblog.typepad.com/autocad/2012/03/using-autocad-wpf-data-binding-collection-properties-to-export-to-excel-in-vbnet.html and my Autodesk University class on WPF http://au.autodesk.com/?nd=material&session_material_id=5576


    Comments

    3 responses to “WPF Databinding to the CommandLine Colors”

    1. Tony Tanzillo Avatar
      Tony Tanzillo

      Hi Fenton.
      Allowing the user to configure the foreground and background colors of the command line essentially requires that they also be able to configure the foreground and background colors of selected text, which isn’t supported.

    2. Fenton Webb Avatar
      Fenton Webb

      Hi Tony
      it is supported, it’s just not WPF data-bound via this class at the moment. I’ll logged it as a wish list for you, obviously.

    3. Hi Fenton,
      What has happened to the AU class?
      Regards
      Craig

    Leave a Reply

    Discover more from Autodesk Developer Blog

    Subscribe now to keep reading and get access to the full archive.

    Continue reading