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

WPF Expander

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

    WPF Expander


    Hi, I have an expander in which is a grid with different content. How do I get it, that the contents of the expander are moved to the far left?
    The expander should be set to the full size of the stackpanel just like the existing grids:

    Click image for larger version  Name:	Screenshot_1.jpg Views:	0 Size:	31.3 KB ID:	1152559 Click image for larger version

Name:	Screenshot_2.jpg
Views:	297
Size:	32.3 KB
ID:	1152560

    the content should start at the yellow line, not at the red line

    Code:
    Expander expander = new Expander { FontFamily = ChartControl.Properties.LabelFont.Family, FontSize = PanelTextSize, //FontWeight = FontWeights.Bold, Foreground = PanelInactivTextColor, Header = "Setup/Entry Filter`s", ExpandDirection = ExpandDirection.Down, IsExpanded = true, Width = spStackPanelWith, HorizontalAlignment = HorizontalAlignment.Left, HorizontalContentAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Top, Margin = new Thickness(spStackPanelContentDistanceFromLeft, 0, 2, 0), };
    Last edited by sidlercom80; 04-21-2021, 05:08 AM.
    sidlercom80
    NinjaTrader Ecosystem Vendor - Sidi Trading

    #2
    Hi sidlercom80 , thanks for your question.

    You would need to test different values and explore the WPF options available to get the spacing correct. I'm not sure of the code that is being run here so I'm unable to give any specific direction. We have an example here that adds WPF elements to a chart window for reference:

    https://ninjatrader.com/support/foru...10#post1124507

    Best regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi Chris, that doesn't help me, but thank you for your answer.
      sidlercom80
      NinjaTrader Ecosystem Vendor - Sidi Trading

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by junkone, Today, 11:37 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by frankthearm, Yesterday, 09:08 AM
      11 responses
      42 views
      0 likes
      Last Post frankthearm  
      Started by quantismo, 04-17-2024, 05:13 PM
      5 responses
      35 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by proptrade13, Today, 11:06 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by love2code2trade, 04-17-2024, 01:45 PM
      4 responses
      35 views
      0 likes
      Last Post love2code2trade  
      Working...
      X