O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – Adding a new category to the database

We want to add the possibility to add a new category to the main window of our application. For this we need two textboxes where the user can enter the category name and description, we also need a button to trigger the creation of the category.

  1. Add another row to the grid of the MainWindow; set the row height to *. This will be the fourth row so far. In this row, we define another grid called CategoryGrid, which will contain all the controls we need to create a new category. This new grid should look similar to the following code snippet:
    <Grid x:Name = "CategoryGrid" Grid.Row="3" Margin="0 10 0 0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required