private void EditCurrent() { __layoutEdition.Items.Clear(); if (CurrentShape == null) { __layoutEdition.Visibility = Visibility.Collapsed; } else { // Editable components foreach (Base _component in CurrentShape.TypeInfo.EditableComponents) { ObjectEditControl _dataform = new ObjectEditControl(); _dataform.Object = _component; _dataform.ShowHeader = true; __layoutEdition.Items.Add(_dataform); } __layoutEdition.Visibility = Visibility.Visible; foreach (GraphShape _shape in __graph.Shapes) { if (_shape != CurrentShape) { Base _claimedComponent = CurrentShape.TypeInfo.GetClaimedComponentBy(_shape.TypeInfo); _shape.EditComponent(_claimedComponent); } } } }
private void initContent() { Content = __layout; __layout.Orientation = System.Windows.Controls.Orientation.Horizontal; __layout.Items.Add(__label); __objectEditControl = new ObjectEditControl(); __layout.Items.Add(__objectEditControl); __label.IsHitTestVisible = false; __layout.IsHitTestVisible = false; }