A
A
Anton_repr2019-11-06 17:41:37
WPF
Anton_repr, 2019-11-06 17:41:37

How to display different data in the same form?

There is a window for creating a recipe. By clicking on the "save" button, the following are recorded in the database: the name of the recipe, cooking time, description, instructions.
The main window has a DataGrid that displays the names of available recipes. By clicking on the corresponding button in the DataGrid, a form opens in which the data that was previously recorded (name, description, etc.) in the database should be displayed.
5dc2d9284f94e158312634.png
The form that opens on clicking the button:
5dc2d9814f372553271753.png
The problem is that I do not understand how to display the required information about the recipe in the form.
For example, here is the xaml:

TextBlock TextWrapping="Wrap" Text="" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="35,20,0,0" FontSize="12">
                            <Run Text="{Binding Path=timeRequiredHours}"/>
                                            <Run Text="hours" ToolTip="hours"/>
                                            <Run Text="{Binding Path=timeRequiredMinutes}"/>
                                            <Run Text="minutes" ToolTip="minutes"/>
                        </TextBlock>

There is a timeRequiredHours of a particular recipe. How can I display the cooking time for the recipe I need?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question