Thank you for providing that.
Going back to the prior post this comment is relevant to what you have provided:
<Frame Source="C:\Users\User\Documents\NinjaTrader 8\bin\Custom\AddOns\PageFrame.xaml"> </Frame> ?? <Frame x:Name= "MyFrame" Margin="0,100,0,0" Source="C:\Users\User\Documents\NinjaTrader 8\bin\Custom\AddOns\PageFrame.xaml">
You would need to use C# code instead of xaml to apply the frame contents to the frame.
It looks like you have a LoadFrame method, this is what would be needed or to load and parse the xaml into an object. After loading the frames contents, you could set it as the contents for the target frame. For this part you can search online for C# ways to apply frame contents programatically instead of by using Xaml. This is not something which is specific to NinjaScript so this is not going to be something we document or have samples for. Very likely you will need to set the frames Source property as that is what you were using in the xaml: Source=.
When loading Xaml in NinjaScript, because this is manually loaded you loose most of the features xaml has in regard to defining sources, binding, using event handlers or the xaml.cs code behind file. You will need to search online for alternative code only ways to execute your xaml ideas such as applying content to a frame programatically. I did a quick google search and found the following stackoverflow answer of changing a page programatically with a frame: https://stackoverflow.com/a/138315
Please let me know if I may be of further assistance.
Leave a comment: