コード例 #1
0
        /// <summary>
        /// Called when a diagram item has been deselected.
        /// </summary>
        /// <param name="arg"></param>
        void OnSelectionDeselected(NSelectEventArgs <NDiagramItem> arg)
        {
            NShape shape = arg.Item as NShape;

            if (shape == null)
            {
                return;
            }

            // unhook move slaves property changed event
            shape.RemoveEventHandler(NShape.MoveSlavesProperty.ValueChangedEvent, new NEventHandler <NValueChangeEventArgs>(OnMoveSlavesPropertyChanged));

            // clear hightlights
            ClearHighlights();

            // destroy property editor
            m_PropertyEditorHolder.Content = null;
        }