So I've created a simplefont object, as a variable, and turned it into a user input. It works fine, but for some reason, it won't save under a template. So when reopening a template, it reverts back to its default value.
I am wondering if I am doing something wrong here.
At the class level, I declare a variable like this:
private SimpleFont myTextFont = new NinjaTrader.Gui.Tools.SimpleFont("Impact", 20);
In my onRender() block, I create a text format via:
SharpDX.DirectWrite.TextFormat textFormat = myTextFont.ToDirectWriteTextFormat();
In my properties section, I capture that user input via:
[XmlIgnore] [Display(ResourceType = typeof(Custom.Resource), Name = "Text Type", Description = "", GroupName = "Parameters", Order = 0)] public SimpleFont MyTextFont { get {return myTextFont;} set {myTextFont = value;} }
Is there something obvious I'm missing here? Is it due to me only manipulating this text layout in onRender(), that it just never gets stored anywhere? Does this somehow need to be initialized, or created in the state.configure block?
Comment