WPF Web Based

WPF Examples

WPF

WPF Projects

WPF Project

adplus-dvertising
UniFormGrid Control in WPF Web Base
Previous Home Next

In this Tutorial I introduce the UniformGrid Control. The uniformgrid Control arranges content in its area so that all the cells in the grid have the same dimension. It represents a perfect solution if someone prefers to prevent the headache of ordering or arrange controls within an ordinary Grid.

First, the Uniform grid belongs to the System.Windows.Controls. Primitives. It could be found in the tool box at the bottom. A UniformGrid show child elements or control in columns and rows of the same size. Or we can say The number of cells is adjusted to accommodate the number of controls.

Example:

.XAML.CS CODE

<Page x:Class="WpfBrowserApplication5.Page15"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Page15" Loaded="Page_Loaded">
    <Grid>
    <UniformGrid Margin="15,15,15,15" Name="uniformGrid1">
    <Image Source="user-admin.png" MouseDown="img1_MouseDown" Name="img1" ></Image>
    <Image Source="user-admin.png"  Name="img2" ></Image>
    <Image Source="user-admin.png" Name="img3"  ></Image>
    <Image Source="user-admin.png"  Name="img4" ></Image>
    <Image Source="user-admin.png"  Name="img5" ></Image>
    <Image Source="user-admin.png"  Name="img6" ></Image>
    <Image Source="user-admin.png" Name="img7" ></Image>
    <Image Source="user-admin.png"  Name="img8" ></Image>
    <Image Source="user-admin.png"  Name="img9" ></Image>
    </UniformGrid>
    </Grid>
</Page>
Output:
Previous Home Next
WPF Examples

WPF

WPF

WPF

WPF

WPF

WPF

WPF

WPF