Пример #1
0
        public void AddCondition()
        {
            DataBindingCondition <TLayerProperty, TProperty> condition = ConditionalDataBinding.AddCondition();

            // Find the VM of the new condition
            DataBindingConditionViewModel <TLayerProperty, TProperty> viewModel = Items.First(c => c.DataBindingCondition == condition);

            viewModel.ActiveItem.AddCondition();

            _profileEditorService.UpdateSelectedProfileElement();
        }
Пример #2
0
        private void ItemsOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (_updating || e.Action != NotifyCollectionChangedAction.Add)
            {
                return;
            }

            for (int index = 0; index < Items.Count; index++)
            {
                DataBindingConditionViewModel <TLayerProperty, TProperty> conditionViewModel = Items[index];
                conditionViewModel.DataBindingCondition.Order = index + 1;
            }

            ConditionalDataBinding.ApplyOrder();

            _profileEditorService.UpdateSelectedProfileElement();
        }