Answer the question
In order to leave comments, you need to log in
What is the best way to organize layout in WPF?
Hello!
I have minimal layout experience in WPF, i.e. Of course, I know how to draw a window, a grid-grid in it, and buttons on it, but exactly how to better layout a relatively complex interface is a problem with this.
Technically, I need a menu with many options - radio buttons, checkboxes, tabs, dropdowns, buttons.
At first, I drew all the buttons, checkboxes, etc. graphically. However, when I needed to move a group of elements, for some reason, when the frame was drawn, it was not the group of elements on the tab that began to stand out, but the tab itself. As a result, I began to draw stupidly in xaml, winding up a bunch of grids in which I stuffed the elements. However, in the end, I got a product that, apparently, will have to be further typeset in xaml
. For example, I made up such a misery.
Immediately questions:
was it right to do this, or was it worth it somehow differently?
A fragment of the code of one of the elements (everything is not inserted for some reason, 10 thousand characters limit)
<Grid Width="800" HorizontalAlignment="Left" Grid.Row="0" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
<RowDefinition Height="15*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="400"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Параметры одностороннего ОМП" Height="20" Grid.Row="0"/>
<TextBlock Text="Ток в месте КЗ определяется через" Height="20" Grid.Row="1"/>
<RadioButton Name="rbtn_setKf" Content="Kfав (чисто аварийный ток КЗ фазы)" Grid.Row="2" />
<RadioButton Name="rbtn_setKf1" Content="Kf1ав (чисто аварийный ток прямой последовательности)" Grid.Row="3"/>
<RadioButton Name="rbtn_setK2" Content="Kf2 (ток обратной последовательности)" Grid.Row="4"/>
<RadioButton Name="rbtn_setK0" Content="Kf0 (ток нулевой последовательности, возможна низкая точность)" Grid.Row="5"/>
<CheckBox Name="chbx_setMultipleShots" Content="ОМП по серии значений послеаварийного тока" Grid.Row="1" Grid.Column="1"/>
</Grid>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question