Announcement

Collapse
No announcement yet.

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:	377
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

    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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 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
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X