solved
in Windows1.xaml.cs
namespace xceed2
{
/// <summary>
/// Interaktionslogik für Window1.xaml
/// </summary>
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
this.FlowDirection = FlowDirection.RightToLeft;
ProvideData();
}
private void ProvideData()
{
DataGridControl control = new DataGridControl();
this.Content = control;
control.ItemsSource = new NameList();
control.FlowDirection = FlowDirection.RightToLeft;
//grid.ItemsSource = new NameList(); // wenns vom xaml kommt
}
}
}
own Namelist.cs file
using System;
using System.Collections;
using System.Collections.ObjectModel; //fuer ObservableCollection
namespace xceed_data
{
public class NameList : ObservableCollection<PersonName>
{
public NameList()
: base()
{
Add(new PersonName("Willa", "Cather", true, "Zwei"));
Add(new PersonName("Isak", "Dinesen", false, "Zwei"));
Add(new PersonName("Victor", "Hugo", true, "Zwei"));
Add(new PersonName("Jules", "Verne", false, "Zwei"));
}
}
public class PersonName
{
private string firstName;
private string lastName;
private bool bCheckB;
private string cdstring;
public PersonName(string first, string last, bool bcheckb, string cd)
{
this.firstName = first;
this.lastName = last;
this.bCheckB = bcheckb;
this.cdstring = cd;
}
public string FirstName
{
get { return firstName; }
set { firstName = value; }
}
public string LastName
{
get { return lastName; }
set { lastName = value; }
}
public bool CheckB
{
get { return bCheckB; }
set { bCheckB = value; }
}
public string CDString
{
get { return cdstring; }
set { cdstring = value; }
}
}
}