-5

次の画面にpocoクラスを使用していますが、この画面の上下に移動する要素をどのように実現するのか疑問に思っていますここに画像の説明を入力

ObservableCollection を使用してアイテムを相互リストに追加しています。質問は、どのように上に移動して下に移動するかです。いいえ、リアルタイムで poco クラスを変更する必要がありますが、これをどのように達成するかはわかりません

   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();

私のポコクラスは次のとおりです

 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; }

}
4

1 に答える 1