Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator could not be serialized

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Indicator could not be serialized

    Trying to add a Font parameter, but this snipet causes "...could not be serialized".

    [Description("Font for Text Labels.")]
    [Category("Visual")]
    [Gui.Design.DisplayNameAttribute("Font for Text Labels")]
    public Font TextLabelFont
    {
    get { return textFont; }
    set { textFont = value; }
    }

    Tried adding the following, which appears to compile ok but apparently is otherwise incorrect:

    [Browsable(false)]
    public string TextFontSerialize
    {
    get { return NinjaTrader.Gui.Design.SerializableFont.ToString(t extFont); }
    set { textFont = NinjaTrader.Gui.Design.SerializableFont.FromString (value); }
    }

    What's the trick?

    #2
    This should make a difference

    [Description("Font for Text Labels.")]
    [Category("Visual")]
    [Gui.Design.DisplayNameAttribute("Font for Text Labels")]
    [XmlIgnore()]
    public Font TextLabelFont
    {
    get { return textFont; }
    set { textFont = value; }
    }

    Comment


      #3
      That was easy! Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      331 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      549 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X