Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Editing the AddOn Framework form

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

    Editing the AddOn Framework form

    Hello,

    I downloaded and installed the NT8 AddOn Framework. I have been able to edit the code behind the various buttons, and use the things I've tried there in other projects.

    I am wondering how I might be able to edit the AddOn Framework form itself.

    To that end, I made sure Blend for Visual Studio was installed on my system and opened NinjaTrader.Custom.csproj in it. I am able to open AddOnFrameworkTab.xaml. I see text in the XAML (text) tab, but when I click the Design tab, it looks nothing like the form in NT, and there are many errors in the text tab.

    One thing I saw was that there was no reference to InfragisticsWPF4.v15.1, which I added, but I don't see what other references or xml namespaces to add to fix the remaining issues.

    Can someone let me know about these or explain what other approach I should use to edit AddOnFrameworTab.xaml? (And other forms that I and others would want to develop for NT AddOns)

    Thanks very much,
    -Bob

    #2
    Hello bob789,

    Thank you for your post.

    Please review the details at the following link on Visual Studio development for Add Ons: http://ninjatrader.com/support/helpG...t_overview.htm

    You will need to utilize the Visual Studio Solution for AddOn Development at the following link: http://ninjatrader.com/support/helpG...dOnProject.zip

    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Good stuff!

      I'm closer, but still not able to design XAML forms. I opened the solution in Blend for VS.

      Out of the box, the first line of AddOnPage.xaml throws an error: Cannot create an instance of "NTTabPage_0".

      First line of AddOnPage.xaml:

      <t:NTTabPage xmlns=http://schemas.microsoft.com/winfx/2...l/presentation

      However, the first line in AddOnFrameworkTab.xaml reads:

      <Page xmlns=http://schemas.microsoft.com/winfx/2...l/presentation

      So the first thing to try was to make the former like the latter, but when I do that then there are a ton of undefined element errors.

      I am guessing that there is some kind of reference issue, but rather than poking about, I figured I'd ask if there is a solution to my issue.

      What should I try next?

      Thanks,
      -Bob

      Comment


        #4
        I am glad we are making progress bob789. The add-on project was written with the code editor in mind, and working with the preview pane in Visual Studio (and thus, with Blend's preview) is not support at this time. I recommend collapsing the designer pane, and working with the XAML code alone.

        Blend can be an excellent code generation tool. You can import the code you generate in Blend into your Visual Studio project and then test your changes in NinjaTrader itself. I have prepared a short video where this is done.

        https://www.screencast.com/t/nl6lmLUSM
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Wow, this brings back memories. It hasn't been since around 1990 that I had to develop graphical interfaces using a text editor. (OS/2 Presentation Manager)

          I'm scratching my head as to why you guys can't get the design view and/or Blend to work.

          I see from the Add-On Framework example that the grid used there requires a design license, but other than that, what is the hold up allowing us to graphically design forms? This is something that was figured out a long time ago.

          How do you do it in house? Is there proprietary information that you don't want to release? Again, I'm scratching my head.
          Last edited by bob789; 01-27-2017, 03:06 AM.

          Comment


            #6
            I appreciate this feedback bob789.



            I have submitted a feature request to the product management team for the following feature :

            This user would like Add-On XAML Previews for the add-on demo supported in Visual Studio
            I will follow up with more information as soon as it's available. If the feature requests already exists, a vote will be added to it.


            Please let us know if there are any other ways we can help.
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Hi Jessica,

              Thanks for your reply. I hope you don't think I was being catty; I know bringing out so much new stuff in NT 8 is a big effort, and will take some time to iron out all the kinks and include all desired features. Still, being able to design forms graphically would be a good thing.

              At this point I only wanted to add that I googled "CSS equivalent for XAML" and long story short, found this relevant:

              https://msdn.microsoft.com/en-us/win...rce-references

              Perhaps if you guys could release a Resource Dictionary that allowed people to graphically design in Blend, at least for prototyping, that would 80/20 it for now. Just a thought.

              Take care,
              -Bob

              Comment


                #8
                The thought did not cross my mind. Our customers are our best innovators, and it's thanks to feedback like this that NinjaTrader 8 is the product that it is. Any notes we add to this thread will be made available to the product management team, including the suggestion that we support Blend as a lower effort to greater reward way of resolving this request. Thank you again for using NinjaTrader 8.
                Jessica P.NinjaTrader Customer Service

                Comment


                  #9
                  Hello bob789 ,

                  This feature is being reviewed by the product management team and has been assigned the following unique tracking ID


                  SFT-1886


                  Please let us know if there is any other way we can help.
                  Jessica P.NinjaTrader Customer Service

                  Comment


                    #10
                    please add my vote for this to track

                    Comment


                      #11
                      In the meantime while SFT-1886's fate is being decided, is there a resource dictionary buried in the NT namespaces we can point to via a xmlns? I've poked all through the NinjaTrader.Gui namespace and so far can't find anything but it's been my experience that resource dictionaries don't show themselves in intellisense. Does the NinjaTrader.Gui have a Themes/generic.xaml that we could coerce brushes and other resources out of? With the centralized theme NT8 uses, it's gotta be in there somewhere.

                      Comment


                        #12
                        While we can not share Ninja's source here on the forums, we are happy to answer any questions about theming that we may. I have included a NinjaScript add-on which demonstrates how to retrieve information from existing elements. Automation IDs were discovered using this advice

                        http://ninjatrader.com/support/forum...44&postcount=7
                        Attached Files
                        Last edited by NinjaTrader_JessicaP; 03-29-2017, 01:34 PM.
                        Jessica P.NinjaTrader Customer Service

                        Comment


                          #13
                          Theming Interim solution

                          I have been able to pull of at least an interim solution. See below

                          1) In Visual Studio, create a "Custom WPF Library" project. This type is important because VS will add the required items in AssemblyInfo.cs as well as the Themes/Generic.xaml
                          2) Add the proper NinjaTrader references from the Program Files bin or bin64 directories.
                          3) In Themes/Generic.xaml, add the following
                          Code:
                          <ResourceDictionary Source="pack://application:,,,/NinjaTrader.Gui;component/general.xaml" />
                          to your ResouceDictionary.MergedDictionaries.
                          4) Add a post build command to automatically place your assembly (I also add my .pdb) to the appropriate NinjaTrader 8/bin/Custom folder

                          Now when you build out your user control, it will apply the NinjaTrader styles at runtime. However, during design time, you'll still see the vanilla styles but they get picked up at runtime.

                          Note: The xaml designer definitely has some issues trying to resolve the NinjaTrader.Gui general.xaml resource dictionary. It has crashed my xaml designer multiple times but that does not affect the project's ability to build.
                          Attached Files

                          Comment


                            #14
                            Hello Jessica,

                            please let me know how I can add my vote (if at all possible) for this feature to be added.

                            Thank you,

                            Libor

                            Comment


                              #15
                              Hello liborc,

                              This feature is being reviewed by the product management team and has been assigned the following unique tracking ID


                              SFT-1886


                              Please let us know if there is any other way we can help.
                              Jessica P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by WHICKED, Today, 09:05 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post WHICKED
                              by WHICKED
                               
                              Started by luislag14, Today, 06:29 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post luislag14  
                              Started by Protech, Today, 11:08 AM
                              1 response
                              23 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Started by guilhem, Today, 02:09 PM
                              1 response
                              24 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by Hyper, Today, 12:20 PM
                              1 response
                              23 views
                              0 likes
                              Last Post NinjaTrader_Jim  
                              Working...
                              X