Beispiel #1
0
        protected internal override void ApplyChangesFrom(DtoBaseViewModel otherBase)
        {
            base.ApplyChangesFrom(otherBase);
            var other = otherBase as DtoTableViewModel;

            DtoBuilder.Merge(this.Rows, other.Rows);
            DtoBuilder.Merge(this.Columns, other.Columns);
            DtoBuilder.Merge(this.Cells, other.Cells);
        }
Beispiel #2
0
        protected internal override void ApplyChangesFrom(DtoBaseViewModel otherBase)
        {
            base.ApplyChangesFrom(otherBase);
            var other = otherBase as DtoGroupedViewModel;

            this.AlternateBackground = other.AlternateBackground;
            var selectedIdx = other.Items.IndexOf(other.SelectedItem);

            DtoBuilder.Merge(this.Items, other.Items);

            if (selectedIdx >= 0 && selectedIdx < this.Items.Count)
            {
                this.SelectedItem = this.Items[selectedIdx];
            }
            else
            {
                this.SelectedItem = this.Items.FirstOrDefault();
            }
        }