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:	299
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 burtoninlondon, Today, 12:38 AM
      0 responses
      5 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      13 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      13 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,982 views
      3 likes
      Last Post jhudas88  
      Working...
      X