I am using a poco class for the following screen but im just wondering how I would achieve the move up and down elements of this screen
I am using ObservableCollection to add my items to a mutual list my question is how would I achieve the move up and move down. I no I would need to change the poco class in real time but not sure how I would achieve this
private void AddColumn(object sender, RoutedEventArgs e)
{
if (this.WizardData == null)
return;
if (this.WizardData.ConcreteCustomColumnsProxy == null)
this.WizardData.ConcreteCustomColumnsProxy = new ObservableCollection<CustomColumnsModel>();
this.WizardData.ConcreteCustomColumnsProxy.Add(new CustomColumnsModel() { CustomColumnsDisplayName = txtDsiplayName.Text
, CustomColumnsOrder = 1, CustomColumnsWidth = Convert.ToInt32(txtWdith.Text) });
this.listView1.ItemsSource = this.WizardData.ConcreteCustomColumnsProxy;
this.listView1.UnselectAll();
this.listView1.Items.Refresh();
My Poco class is as follows
public event PropertyChangedEventHandler PropertyChanged;
public const string IdPropertyName = "CustomColumnsID";
private Guid _Id = Guid.Empty;
public Guid CustomColumnsID
{
get { return _Id; }
set
{
if (_Id == value)
return;
_Id = value;
NotifyPropertyChanged(IdPropertyName);
}
}
public string CustomColumnsDisplayName { get; set; }
public int CustomColumnsWidth { get; set; }
public int CustomColumnsOrder { get; set; }
protected void NotifyPropertyChanged(string key)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(key));
}
}
public EnterpriseManagementObject ActualData { get; private set; }
}