Hi,
I have a WPF DataGrid control I am binding the objects of class Customer to DataGrid Rows using ObservableCollection at run time. I have set MinRowHeight="100" & I want the rows of DataGrid should be HorizontallyAligned at Center & Vertically at Left. Setting DataGrid properties VerticalContentAlignment="Center" HorizontalContentAlignment="Center" doesn't help.
Code :---
System.Collections.ObjectModel.ObservableCollection cust1 = new System.Collections.ObjectModel.ObservableCollection
{
new Customer{FirstName="Ulhas",LastName="TUSCANO",IsMember = true ,Email="
[email protected]",Status=OrderStatus.Processing },
new Customer{FirstName="
Neville",LastName="TUSCANO",IsMember = true ,Email="
[email protected]",Status=OrderStatus.Received },
new Customer{FirstName="Pascoal",LastName="TUSCANO",IsMember = true ,Email="
[email protected]",Status=OrderStatus.None },
new Customer{FirstName="Mary",LastName="TUSCANO",IsMember = true ,Email="
[email protected]",Status=OrderStatus.Received },
new Customer{FirstName="Mary",LastName="TUSCANO",IsMember = true ,Email="
[email protected]",Status=OrderStatus.Received },
new Customer{FirstName="Mary",LastName="TUSCANO",IsMember = true ,Email="
[email protected]",Status=OrderStatus.Received },
};
dataGrid1.ItemsSource = cust1;
public class Customer
{
public string FirstName{get;set;}
public string LastName { get; set; }
public string Email { get; set; }
public bool IsMember { get; set; }
public OrderStatus Status { get; set; }
}
Any help will be greatly appreciated,
Thanx