Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

WPFPropertyGrid and custom PropertyEditor

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

    WPFPropertyGrid and custom PropertyEditor

    I am studying the WPFPropertyGrid control included in System.Windows.Controls.WpfPropertyGrid.dll to create my own PropertyGrids.

    The original version of the control in GitHub has a PropertyEditorAttribute attribute that allows you to create custom property editors.
    However the version included in the installation of NinjaTrader does not have this attribute although the assembly is the same.

    It seems that NinjaTrader has its own attribute NinjaTrader.Gui.PropertyEditorAttribute but I could not find any clues to create the custom PropertyEditor from here.
    Please would be possible to provide some guidelines to create a custom PropertyEditor from NinjaTrader.Gui.PropertyEditor.

    Thanks.

    #2
    Anything new about this problem?

    I have developed a button in my indicator to open a properties dialog. I want this dialog looks like NinjaTrader's properties dialogs therefore I must reference to System.Windows.Controls.WpfPropertyGrid.dll.
    Some properties require of custom EditorTypes. This is achieved with PropertyEditorAttribute that is present in the original file dll (located in GitHub repository).

    But In my code I have to reference to WpfPropertyGrid.dll installed in NinjaTrader instead of the original dll because I will have a name conflict. However that file doesn't contain the attribute mentioned above (althoug both files have the same name, same assembly version, same token, ... ).

    Please, any solution ?

    Thanks very much.

    Comment


      #3
      Hello cls71,

      Thank you for your patience.

      We are looking into this and will respond when we have further information.
      Patrick H.NinjaTrader Customer Service

      Comment


        #4
        Hello,

        We use our own custom version of the WpfPropertyGrid were we've modified it for NT use. For example this property is now located here: NinjaTrader.Gui.PropertyEditoryAttribute.

        Unfortunately there are limitations in code which prevent you from being able to make your own property editors since glue code needed to link the editor to the property grid display just isn't expandable.

        Which means you would have to roll your own property grid for now. I'll get on the list for internal discussion support property grid. (Custom editors and Use).
        BrettNinjaTrader Product Management

        Comment


          #5
          Hello,

          I am constrained to use the custom version of wpgpropertygrid from ninjatrader. This object has not scrollbars, so I have to put it inside a scrollviewer control. But some fields are displayed misplaced.

          If I dont use the scrollviewer the wpgpropertygrid is displayed correctly but it is not scrollable.

          I dont know if the problem is in my ignorance about wpf or in the custom version of wpgpropertygrid from ninjatrader.

          Thanks in advance for your help.
          Attached Files

          Comment


            #6
            Originally posted by cls71 View Post
            Hello,

            I am constrained to use the custom version of wpgpropertygrid from ninjatrader. This object has not scrollbars, so I have to put it inside a scrollviewer control. But some fields are displayed misplaced.

            If I dont use the scrollviewer the wpgpropertygrid is displayed correctly but it is not scrollable.

            I dont know if the problem is in my ignorance about wpf or in the custom version of wpgpropertygrid from ninjatrader.

            Thanks in advance for your help.

            With the original version of the control, this bug doesn't happen. Only happens with the customized version from ninjatrader.

            Any help would be appreciated.

            Comment


              #7
              Hy cls71,

              Maybe this could help... or not
              System.Windows.Forms.Integration.WindowsFormsHost

              Comment


                #8
                Originally posted by Optiondreamer View Post
                Hy cls71,

                Maybe this could help... or not
                System.Windows.Forms.Integration.WindowsFormsHost
                Thanks but I think that isn't useful for this issue. El wpg control is already a wpf control.

                Comment


                  #9
                  Hello cls71,

                  You would need to create or use your own propertygrid as the custom NinjaTrader asset does not provide the function you are looking for.
                  Patrick H.NinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_PatrickH View Post
                    Hello cls71,

                    You would need to create or use your own propertygrid as the custom NinjaTrader asset does not provide the function you are looking for.
                    Hello,

                    I would use the unmodified original control: http://wpfpropertygrid.codeplex.com/, already has all the features I need.
                    But I can not because it causes a name conflict with your customized version that is on the NinjaTrader folder.

                    What surprises me is that your customized control has not been renamed and retain the name and other attributes of the original control but obviously not the same.

                    The right thing would have been that NinjaTrader create his own propertygrid.

                    Comment


                      #11
                      Hello cls71,

                      I have forwarded this request to our Product Management team.
                      Patrick H.NinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by NinjaTrader_PatrickH View Post
                        Hello cls71,

                        I have forwarded this request to our Product Management team.

                        Thanks so much Patrick.
                        Finally I had to develop my own control. Although it does not look like the skin at least I will not have any functional or integration problems in the future.

                        Attached Files

                        Comment


                          #13
                          Originally posted by cls71 View Post
                          Finally I had to develop my own control. Although it does not look like the skin at least I will not have any functional or integration problems in the future.
                          Looks Good.. Nice Job There..


                          -=Edge=-
                          NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

                          Comment


                            #14
                            Hello cls71,

                            Your suggestion is being tracked under SFT-655.
                            Patrick H.NinjaTrader Customer Service

                            Comment


                              #15
                              Hello everyone,
                              any updates to this?
                              I'm trying to to make custom property editor for type
                              public class VolumeColor
                              {
                              public long Volume { get; set; }
                              public System.Windows.Media.Brush Color { get; set; }
                              ....
                              }
                              I was able to do this in NT7 with custom ExpandableObjectConverter and UITypeEditor.
                              It seems ExpandableObjectConverter works fine with NT8 property grid but not the UITypeEditor.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by soyjesus, Today, 05:27 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post soyjesus  
                              Started by JarodB, Today, 04:44 AM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Jason  
                              Started by mahmud999, Today, 04:54 AM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Marco  
                              Started by leonardo3381, Today, 01:58 AM
                              3 responses
                              21 views
                              0 likes
                              Last Post NinjaTrader_Marco  
                              Started by Mindset, Today, 02:16 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X