コード例 #1
0
        public CompoundObjectViewModel(
            TreeViewViewModel treeParent,
            CompoundObjectViewModel parentVm,
            MainViewModel mainVm,
            CompoundObject modelObject,
            bool enabled = true) :
            base(treeParent, parentVm, mainVm, enabled)
        {
            ModelObject = modelObject;

            Behaviour = new CoBehaviourViewModel(TreeParent, this, MainVm, ModelObject.Behaviour);

            SelectedBehaviourIndex = Behaviours.IndexOf(ModelObject.Behaviour.Type);

            ChildObjectsWithStates = new StateChildCollectionViewModel(treeParent, parentVm, MainVm);
        }