Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I put my wpf user control behind the ChartTrader order/position lines?

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

    How can I put my wpf user control behind the ChartTrader order/position lines?

    I have an indicator that creates a WPF Grid with Buttons and a StackPanel with Labels, the Grid is added to the UserControlCollection.
    But as shown in the screenshot below it's on top of the chart, above the ChartTrader position and SL / TP orders markers.
    I would like it below these markers, because now the X close boxes of the markers are below my buttons.

    How can I change this?
    Can I change my Grid's Zindex within the Chart Window?
    Click image for larger version

Name:	change wpf grid zindex.png
Views:	368
Size:	75.2 KB
ID:	1124634
    Attached Files

    #2
    Hello wjadevries,

    I believe in this case you would need to avoid using a WPF control and instead use OnRender if it needs to be behind the X. You would otherwise need to not use that area and move your controls left. The UserControlCollection is an overlay on the chart panel so any controls will be above the chart and cannot be factored into the zordering of rendering/the charts existing controls that are above the rendering.

    One thought here would be to make the button transparent and then use OnRender for its visual. The click would still happen from the transparent button over that area. That would be far easier than trying to wire into the charts click events and trying to make sure you clicked within a rectangle if you were only using OnRender. However that will block the X so moving it left would still be advisable if you need to use the chart trader with this tool.

    I look forward to being of further assistance.

    Comment


      #3
      Sounds a lot of hussle for a simple issue.
      So I'll just move it a little bit to the left, thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X