Je suis actuellement en train de jouer avec WPF et maintenant je me demande quelle serait la disposition pour une fenêtre dataentry typique (plus de 20 textboxes et autres).WPF Meilleures pratiques pour la fenêtre DataEntry
atm i`m en utilisant un objet de grille comme celui-ci (échantillon de base)
<Grid Margin="2,2,2,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions >
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0">Vorname:</Label>
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=Surname, UpdateSourceTrigger=PropertyChanged}" ></TextBox>
<Label Grid.Row="1" Grid.Column="0">Nachname:</Label>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=ChristianName, UpdateSourceTrigger=PropertyChanged}"></TextBox>
<Label Grid.Row="2" Grid.Column="0">Strasse (Wohnsitz):</Label>
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Path=Street1, UpdateSourceTrigger=PropertyChanged}"></TextBox>
<Label Grid.Row="3" Grid.Column="0">Ort (Wohnsitz):</Label>
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Town1, UpdateSourceTrigger=PropertyChanged}"></TextBox>
<Label Grid.Row="4" Grid.Column="0">Postleitzahl (Wohnsitz):</Label>
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Path=PostalCode1, UpdateSourceTrigger=PropertyChanged}"></TextBox>
<Label Grid.Row="5" Grid.Column="0">Bundesland (Wohnsitz):</Label>
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Path=State1, UpdateSourceTrigger=PropertyChanged}"></TextBox>
<Label Grid.Row="6" Grid.Column="0">Land (Wohnsitz):</Label>
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding Path=Country1, UpdateSourceTrigger=PropertyChanged}"></TextBox>
<Label Grid.Row="7" Grid.Column="0">Zusatz (Wohnsitz):</Label>
<TextBox Grid.Row="7" Grid.Column="1" Text="{Binding Path=AdditionalAdrInfo1, UpdateSourceTrigger=PropertyChanged}"></TextBox>
</Grid>
En gros, cela répond à tous mes besoins de mise en page, mais si je veux changer quelque chose, comme l'ajout d'une nouvelle zone de texte dans la ligne 3 ?
actuellement je dois changer chaque propriété Grid.Row supérieure à 3, mais qui ne peut pas être la manière WPF prévue !?
Comment les autres mettent-ils en forme des fenêtres d'entrée de données complexes?
tia
wow, thats beaucoup plus j'espérais :) je vais essayer cela. –
Ce lien est mort ... – Matze
s'il vous plaît ne jamais juste lier le site qui contient la réponse, tout ce quota lié à la question – mkb