-
Notifications
You must be signed in to change notification settings - Fork 263
Editing Data Properties
ATF provides several property editors that make it easy to edit data properties. The properties for each data type are the attributes defined in the data model. The steps for enabling property editing are described below.
When an item is selected, its property values appear in the property editors, and each attribute can be modified with an editor appropriate for its type. ATF handles selection events for you, so that property editors are automatically populated.
For a full discussion of properties in ATF, see Property Editing in ATF.
In the data model, define attributes for the properties you want to expose for each data type. In the ATF Simple DOM Editor Sample, the Type Definition topic shows an example of attributes defined for the "event" type: "name", "size", and "compressed".
ATF's property components allow you to display properties in several ways. For instance, the PropertyEditor
component displays the selected item's properties in a two-column control. For their description, see Property Editor Components. To import these components, simply include them in the MEF TypeCatalog
, as in this code from the Simple DOM Editor's Main
function:
var catalog = new TypeCatalog(
...
typeof(PropertyEditor), // property grid for editing selected objects
typeof(GridPropertyEditor), // grid control for editing selected objects
typeof(PropertyEditingCommands), // commands for PropertyEditor and GridPropertyEditor
...
);
You can use both styles of property editor components, as this samples does.
Property descriptors provide information that property editors need to display and edit property values. Such information includes the property name, and optionally, the type of editor to use to edit its value in the property editor. There are several kinds of property descriptors, but the most common is AttributePropertyDescriptor
that describes ordinary attribute properties.
To learn how the ATF Simple DOM Editor Sample defines descriptors, see Create Property Descriptors. For details on types of property descriptors and ways of creating them, see Property Descriptors in the Property Editing in ATF section.
Creating an Editor Application
- Designing the Application Data Model with the DOM: Define an application data model that works with the ATF DOM in a data definition language, such as an XML Schema.
- Creating Documents for Application Data: Develop classes that work with documents, using the ATF document interfaces.
- Editing and Selecting Data with Contexts: Create contexts with services for editing and selecting data.
- Creating Data Instances: Create new data instances with the instancing framework.
- Editing Data Properties: Edit properties of data types using property editor components.
-
Role Playing with Adaptation: DOM adapters allow
DomNode
s to play many roles.
- Home
- Getting Started
- Features & Benefits
- Requirements & Dependencies
- Gallery
- Technology & Samples
- Adoption
- News
- Release Notes
- ATF Community
- Searching Documentation
- Using Documentation
- Videos
- Tutorials
- How To
- Programmer's Guide
- Reference
- Code Samples
- Documentation Files
© 2014-2015, Sony Computer Entertainment America LLC