Control zieht sich nicht auseinander...

  • WPF

Es gibt 2 Antworten in diesem Thema. Der letzte Beitrag () ist von EugenIS.

    Control zieht sich nicht auseinander...

    Hallo Leute und danke fürs reinschauen...

    Kurz zu meinem Problem:
    Hab ein Control, der Control wird zur Laufzeit in einen StackPanel gesteckt:

    VB.NET-Quellcode

    1. control.Margin = New Thickness(0)
    2. sp.Children.Add(Me.control)


    Jetzt wenn ich das Fenster auseinander zieh, weis ich das das StackPanel mit auseinander gezogen wird. Hab ich extra überprüft. Das Control aber geht nur rechts mit. Unten bleibt es so wie es ist.

    Kennt jemand das Problem? Bin echt ratlos. ?( ?( ?(
    Danke, ich werde es probieren...

    This is an extremely common problem... the StackPanel does not resize its contents to fit the parent control like a Grid does. The solution is simple... don't use a StackPanel except for the simplest of lining up a few controls duties. Instead of this, use a Grid which will automatically fit all space provided by parent controls.


    alles super... hat geklappt.

    Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „EugenIS“ ()