// <summary>
        // Creates an instance of SelectionPath to the specified property that
        // this class knows how to interpret.
        // </summary>
        // <param name="property">Property to create a path to</param>
        // <returns>A new instance of SelectionPath to the specified property</returns>
        public SelectionPath ConstructSelectionPath(PropertyEntry property)
        {
            StringBuilder path = new StringBuilder();

            path.Append(ModelUtilities.GetCachedSubPropertyHierarchyPath(property));
            return(new SelectionPath(PathTypeId, path.ToString()));
        }
コード例 #2
0
        // <summary>
        // Stores the current ActiveEditMode for the specified property
        // </summary>
        // <param name="property">Property to key off of</param>
        // <param name="editMode">ActiveEditMode value to store</param>
        public void StoreActiveEditMode(PropertyEntry property, PropertyContainerEditMode editMode)
        {
            string path = ModelUtilities.GetCachedSubPropertyHierarchyPath(property);

            // We only care about storing the ExtendedPinned state.  Everything
            // else is transitory and shouldn't be persisted.
            //
            if (editMode == PropertyContainerEditMode.ExtendedPinned)
            {
                _expandedPropertyEditors[path] = null;
            }
            else
            {
                _expandedPropertyEditors.Remove(path);
            }
        }
コード例 #3
0
 // <summary>
 // Gets the last stored ActiveEditMode for the specified property
 // </summary>
 // <param name="property">PropertyEntry to look up</param>
 // <returns>Last stored ActiveEditMode for the specified property</returns>
 public PropertyContainerEditMode GetActiveEditMode(PropertyEntry property)
 {
     return(_expandedPropertyEditors.ContainsKey(ModelUtilities.GetCachedSubPropertyHierarchyPath(property)) ?
            PropertyContainerEditMode.ExtendedPinned :
            PropertyContainerEditMode.Inline);
 }