Skip to content

Instantly share code, notes, and snippets.

Created October 20, 2017 15:05
Show Gist options
  • Save anonymous/563f45e32e358f4eebea22f9f82a029f to your computer and use it in GitHub Desktop.
Save anonymous/563f45e32e358f4eebea22f9f82a029f to your computer and use it in GitHub Desktop.
private int position;
public int Position
{
get
{
return this.position;
}
set
{
if (value != this.position)
{
this.position = value;
OnPropertyChanged("Position");
}
}
public void ConfigurePosition(ObservableCollection<Chapter> ChapterCollection)
{
foreach(Chapter chapter in ChapterCollection)
{
chapter.Position = ChapterCollection.IndexOf(chapter) + 1;
}
}
<dxg:GridControl x:Name="SidePanel" AllowLiveDataShaping="True" SelectionMode="Cell" ItemsSource="{Binding}">
<dxg:GridControl.Columns>
<dxg:GridColumn Header="Position" ReadOnly="True">
<dxg:GridColumn.DisplayMemberBinding>
<Binding Path="Position"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment