There are multiple "root" elements that you can use when designing a WPF application.
I want to talk about the "Grid" element.
This is pretty useful when you have a 'template' layout. When you know where UI elements are going to be, and/or you are sure that your screen will be resized, you can use the 'Grid' element as your root.
The Grid element is very similar to the Table element in HTML.
A specific question I came across, was "Can I make one row a fixed size, while the other rows grow as the user changes the size of the form?". This was an issue, because as the user changes the size of the form, the Grid cells, grow and shrink with the form.
Yes, you can set a specific row's height or a column's width.
There are 3 different ways you can set the height of a row.
row.Height = new GridLength(...
The three choices are:
Pixel - fixed. The value entered will be the amount of pixels exactly.
Auto - this will make the row the size needed by the content.
Star - takes as much as needed, or the amount in percent.
Just thought this was interesting.
Showing posts with label element. Show all posts
Showing posts with label element. Show all posts
Thursday, September 23, 2010
Thursday, June 24, 2010
DataTable Column Mapping for XML
This article will demonstrate how to determine or set a SYSTEM.DATA.DATATABLE.Column as different XML nodes.
// The user must include into their class:
using System.Data;
// ==========
// To determine if a column is an XML attribute after
// loading data
// --- after loading data into the dataset
// --- and finding the table needed
mytable.Columns[].ColumnMapping == MappingType.;
----> There are 4 types
Attribute
Element
Hidden
SimpleType
Columns.MappingType Gets or Sets the mapping type for the column.
Labels:
column,
columnmapping,
data,
datatable,
element,
hidden,
HTML attributes,
mapping,
mappingtype,
simple,
table,
type,
XML,
xml schema,
xsd
Subscribe to:
Posts (Atom)