1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //----------------------------------------------------------------
4 namespace System.Activities.Presentation.Internal.PropertyEditing.Views
7 using System.Collections.Generic;
9 using System.Activities.Presentation.Model;
10 using System.Activities.Presentation.PropertyEditing;
12 using System.Activities.Presentation.Internal.PropertyEditing.Model;
13 using System.Activities.Presentation.Internal.PropertyEditing.Selection;
16 // Interface we use to wrap logic that determines how a set of properties
17 // will be categorized into categories.
19 internal interface IPropertyViewManager
23 // Gets a flag indicating whether the PropertyViewManager implementation
24 // supports category headers.
26 bool ShowCategoryHeaders
30 // Add a property into the correct category within the specified CategoryList.
32 // <param name="propertySet">Specified property (passed in as a set for multi-select scenarios)</param>
33 // <param name="propertyName">Name of the current property (perf optimization)</param>
34 // <param name="categoryList">CategoryList instance to populate</param>
35 // <returns>Wrapped ModelPropertyEntry for the specified propertySet</returns>
36 ModelPropertyEntry AddProperty(IEnumerable<ModelProperty> propertySet, string propertyName, CategoryList categoryList);
39 // Scans the list of categories in the specified CategoryList and returns a set of
40 // CategoryEditor types that should be present in the list based on the properties
43 // <param name="ownerType">Type of the currently displayed item</param>
44 // <param name="categoryList">CategoryList to examine</param>
45 // <returns>Set of expected CategoryEditor types</returns>
46 Dictionary<Type, object> GetCategoryEditors(Type ownerType, CategoryList categoryList);
49 // Figures out what property / category editor / category / ... we should select
50 // if the currently selected item does not define a default property.
52 // <param name="categoryList">CategoryList for reference</param>
53 // <returns>Thing to select (can be null) if no default property has been
54 // specified and we are trying to select something by default.</returns>
55 SelectionPath GetDefaultSelectionPath(CategoryList categoryList);
57 // Blend's CollectionEditor compatibility APIs
60 // Since Blend's API uses PropertyEntries instead of ModelProperties, we need
61 // to provide methods that consume those instead. Ideally, with the two code
62 // bases merged, we wouldn't need these at all.
66 // Gets the category name of the specified property
68 // <param name="property">Property to examine</param>
69 // <returns>Category name the property belongs to.</returns>
70 string GetCategoryName(PropertyEntry property);
73 // Adds the specified property into the specified category.
75 // <param name="property">Property to add</param>
76 // <param name="category">Category to populate</param>
77 void AddProperty(PropertyEntry property, ModelCategoryEntry category);