S
S
Sasha Pleshakov2016-08-15 00:41:28
WPF
Sasha Pleshakov, 2016-08-15 00:41:28

Why doesn't the horizontal StackPanel element stretch to fit?

<StackPanel>
    <Label Content="Выбрать папку с картинками"/>
    <StackPanel Orientation="Horizontal">
        <TextBox Margin="5,0,0,0"/>
        <Button Content="Обзор"/>
    </StackPanel>
</StackPanel>

But the textbox and the button do not stretch. What's the matter?
53bc08f54f3942bea165b7d661ba5e2b.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MonkAlex, 2016-08-15
@MonkAlex

professorweb.ru/my/WPF/base_WPF/level3/3_3.php
Используйте грид, чтобы рулить положением и заполнением самостоятельно.

Денис Блейк, 2016-08-24
@kyleabrock

Исполбзуйте свойство HorizontalAlignment кнопки и текстбокса и установите его в "по ширине"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question