Resize Controls When Form Resize

后端 未结 3 1541
时光说笑
时光说笑 2020-12-20 03:52

I just wondering about my windows Application. When i re-size windows form that time my Form controls should re-size. Can any body tell me how to do this I have Used Anchor

3条回答
  •  眼角桃花
    2020-12-20 04:31

    there are two ways to make a control automatically resize based on size changes of the :

    1. Set the Dock property of the control to DockStyle.Fill.
    2. Set the Anchor property to "Top, Bottom, Left, Right"

    But if you decide to use WPF GridLayout,it has a lot Capability for this target.

    Edited

    See this short tutorial Resizing controls with form: Anchor property Tutorial

提交回复
热议问题