Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

XAML Converter Exception

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

    XAML Converter Exception

    Hello,

    If I declare a type in the Page's Resources section of the XAML (for example to use a Converter), I get an exception when the Add-On is loaded.

    For the demonstration of the error I will use an Add-On written by you. I highlight the new lines of code in yellow.

    In this example I use a Converter whose purpose is to convert a BarsPeriod to String. The steps to follow are:

    1.- In the AddOnFramework.cs add the class.



    2.- In the AddOnFramework.xaml declare the resource. Although initially intellisense recognizes the namespace and finds the type, then it shows the error that appears.





    3.- When the Add-On is compiled and then executed, an exception occurs (in this example the Add-On is empty and the exception is raised when the Add-On is closed).
    Note that I do not even use the converter, I only declare it.

    This procedure works correctly in standard WPF applications, and I do not understand why the error is due.

    Thanks.
    Attached Files

    #2
    Hello cls71,

    Thanks for your post.

    As our office is closing soon, we will investigate your inquiry tomorrow during our normal business hours.

    Thanks in advance for your patience.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hello cls71,

      Thanks for your post.

      As our office is closing soon, we will investigate your inquiry tomorrow during our normal business hours.

      EDIT:

      The basic AddOnFramework example will load XAML files but, these aren't compiled and linked with code. We can use the more complex Visual Studio Advanced example to link in the XAML with the code-behind. I've attached an example that does not show this issue.

      Please let us know if we can be of further assistance.
      Attached Files
      JimNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      238 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      383 views
      1 like
      Last Post Gavini
      by Gavini
       
      Started by oviejo, Today, 12:28 AM
      0 responses
      1 view
      0 likes
      Last Post oviejo
      by oviejo
       
      Started by pechtri, 06-22-2023, 02:31 AM
      10 responses
      125 views
      0 likes
      Last Post Leeroy_Jenkins  
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Working...
      X