layout - New to WPF. Form not displaying correctly -


I am very new in WPF and my form may not seem to be displayed correctly. I hope to have 6 rows in the first three, they should have a button and the previous 3 has a grid forward. I was following the code from a NHibernate ebook but it does not appear to be correctly displayed by anyone looking at this code Can suggest any potential errors:

  & lt; Av: window x: orbit = "chapter 2. manwindo" xmlns = "http://schemas.microsoft.com/enfx/ 2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx / 2006 / xaml "xmlns: av =" http://schemas.microsoft.com/winfx/2006/xaml/production "title =" Product Inventory "MC: Ignorable =" d "xmlns: d =" http: // Schemas.microsoft.com/expression/blend/2008 "xmlns: mc =" http: //schemas.openxmlformats.org / markup-compatibility / 2006 "d: design hect =" 493 "D: designwith =" 566 "size to content = "Width endhit" & gt; & Lt; Av: Grid & gt; & Lt; Av: Grid.RowDefinitions & gt; & Lt; Av: roadfinion height = "auto" /> & Lt; Av: roadfinion height = "auto" /> & Lt; Av: roadfinion height = "auto" /> & Lt; Av: rhodidination height = "*" /> & Lt; Av: rhodidination height = "*" /> & Lt; Av: rhodidination height = "*" /> & Lt; / Av: Grid.RowDefinitions & gt; & Lt; Av: Button x: name = "btnCreateDatabase" content = "create database" click = "BTNCRATCSAssafietterClick" /> & Lt; Av: button x: name = "btnCreateSessionFactory" content = "create session factory" = "BtnCreateSessionFactoryClick" av: Grid.Row = "1" /> & Lt; Av: button x: name = "btn crt session" content = "click create session" = "click on btc credited session": grid Line = "2" /> & Lt; Av: grid x: name = "square grid" avi: grid. Rau = "3" margin = "0 10 0 0" & gt; & Lt; Av: Grid.ColumnDefinitions & gt; & Lt; Av: column width = "auto" /> & Lt; Av: column width = "*" /> & Lt; / Av: Grid.ColumnDefinitions & gt; & Lt; Av: Grid.RowDefinitions & gt; & Lt; Av: roadfinion height = "auto" /> & Lt; Av: roadfinion height = "auto" /> & Lt; Av: roadfinion height = "auto" /> & Lt; / Av: Grid.RowDefinitions & gt; & Lt; Av: text block text = "category name:" /> & Lt; Av: Text block text = "Category description:" av: Grid.Row = "1" /> & Lt; Av: text box x: name = "txtCategoryName" av: grid. Column = "1" /> & Lt; Av: text box x: name = "txtCategoryDescription" av: grid. Line = "1" av: grid. Column = "1" /> & Lt; Av: button x: name = "btnAddCategory" content = "add category" av: Grid.Row = "2" Click = "BtnAddCategoryClick" /> & Lt; / Av: grid & gt; & Lt; Av: grid x: name = "productgrid" margin = "1,0,1,131" av: grid. Rau = "4" & gt; & Lt; Av: Grid.ColumnDefinitions & gt; & Lt; Av: column width = "auto" /> & Lt; Av: column width = "*" /> & Lt; / Av: Grid.ColumnDefinitions & gt; & Lt; Av: Grid.RowDefinitions & gt; & Lt; Av: roadfinion height = "auto" /> & Lt; Av: roadfinion height = "auto" /> & Lt; Av: roadfinion height = "auto" /> & Lt; / Av: Grid.RowDefinitions & gt; & Lt; Av: text block text = "category name:" /> & Lt; Av: Text block text = "Category description:" av: Grid.Row = "1" /> & Lt; Av: text box x: name = "txtProductName" av: Grid.Column = "1" /> & Lt; Av: text box x: name = "txtProductDescription" av: Grid.Row = "1" av: Grid.Column = "1" /> & Lt; Av: Button x: name = "btnAddProduct" content = "Add product" av: Grid.Row = "2" Click = "BtnAddCategoryClick" /> & Lt; / Av: grid & gt; & Lt; Av: Grid X: Name = "LoadCategoryGrid" av: Grid. Line = "5" margin = "1,0, -1 0" & gt; & Lt; Av: Grid.ColumnDefinitions & gt; & Lt; Av: column width = "278" /> & Lt; Av: column width = "265" /> & Lt; / Av: Grid.ColumnDefinitions & gt; & Lt; Av: Grid.RowDefinitions & gt; & Lt; Av: roadfinion height = "auto" /> & Lt; / Av: Grid.RowDefinitions & gt; & Lt; Av: Button x: name = "BTN load credits" content = "load categories" vertical alignment = "top" click = "click download button" margin = "0,188,186,0" /> & Lt; Av: list box x: name = "lst ranges" margin = "52,188, -55, -10" av: grid. Column = "1" /> & Lt; / Av: grid & gt; & Lt; / Av: grid & gt;   

windows < / Code>

grid. In addition to the double definition of the grid, row = "5" and are defined .RowSpan = "2" is defined with only one line, both of which are now fixed, only other code All duplicate margins values ​​will affect the situation.

In addition, XAML looks okay.

Comments