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:	386
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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      151 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X