摘要:
An improved system and method for displaying a user interface object using an associated style is provided. To this end, an application may include style declarations that may associate a style resource with a user interface object. The style resource may define property values that may be selectively applied to a user interface object, may specify a visual representation for the user interface object, such as a visual subtree, and may specify additional property values to be conditionally applied to a user interface object. A styling engine may be provided for applying a style resource to a user interface object. A visual representation of the user interface objects with the applied property values may be generated and then a display representation may be rendered for presentation on a user interface display.
摘要:
The techniques and mechanisms described herein are directed at property management mechanisms that operate within an on-demand property system. The property management mechanisms support the caching of property values on an as needed basis, allow a plurality of object instances to utilize the same property via attached properties, overriding default information associated with a property on a per type basis, obtaining values for a property from an external source, and the like. In addition, the on-demand property system provides validation and control for each property instance. The property management mechanisms minimize the storage requirements and provide flexibility without requiring additional code from the developers.
摘要:
An inheritance context is created for a graphics primitive object that is a property of a visual element. The inheritance context can be used to make some element information (e.g., information in resource dictionaries, name dictionaries, and inheritable properties that reside in the element tree containing the visual element) available to the graphics primitive object.
摘要:
Aspects of the subject matter described herein relate to generating and propagating commands. In aspects, elements of a graphical user interface may include an input binding which associates a gesture with a command. When a gesture is received, the command is generated depending on which element has focus. In addition, elements of the graphic user interface may also define methods to call when commands are received. When an event or a command is received, a hierarchical data structure of elements representable on the graphical user interface may be traversed to respond to the event or command.
摘要:
The application programming interfaces described herein are directed at property management mechanisms that operate within an on-demand property system. The property management mechanisms support the caching of property values on an as needed basis, allow a plurality of object instances to utilize the same property via attached properties, overriding default information associated with a property on a per type basis, obtaining values for a property from an external source, and the like. In addition, the on-demand property system provides validation and control for each property instance. The property management mechanisms minimize the storage requirements and provide flexibility without requiring additional code from the developers.
摘要:
Described is a method and system in which storyboard objects coordinate the animation of multiple elements and/or media displayed on a computer graphics display. Storyboards relate properties of elements in an element tree to a timeline, such that the properties associated with a storyboard are animated/play together as a group by starting, stopping, seeking or pausing the storyboard. Triggers, such as controlled by user interaction with the displayed information, including property triggers that change values in response to a state change, and event triggers that fire events, may cause the storyboard to start, stop, pause and seek. Storyboards may be used in XAML-based programs, and may be directly associated with elements, or indirectly associated with elements via styles. Complex properties and changeables are supported. Media playback may be controlled via storyboards, and thereby coordinated with other media playback and/or animations.
摘要:
A method and system for mapping a tag in a markup language (ML) document to a class using namespaces is described. A parser in a computing system analyzes the tag in the ML document. A definition file location attribute related to the tag is referenced in the ML document. A definition file associated with definition file location attribute is retrieved. A namespace related to the tag is referenced within the definition file to determine the class associated with the tag. The class is located in an assembly such that the tag is mapped to the class.
摘要:
A method and system for mapping a tag in a markup language (ML) document to a class using namespaces is described. A parser in a computing system analyzes the tag in the ML document. A definition file location attribute related to the tag is referenced in the ML document. A definition file associated with definition file location attribute is retrieved. A namespace related to the tag is referenced within the definition file to determine the class associated with the tag. The class is located in an assembly such that the tag is mapped to the class.
摘要:
A system and related techniques accept extensible application markup language (XAML) inputs corresponding to object trees, such as those representing user interface elements, and map those inputs to a binary construct. The XAML inputs may illustratively include, for example, user interface elements such as dialog boxes having defined length, color, input sections and so forth. A mapping engine may generate tokenized binary outputs representing the XAML file input and ultimately the associated user interface or other object. The binary representation generated by the mapping engine may be optimized in multiple ways, including to encode dimension information such as length, width etc. of dialog boxes or other elements in the binary representation without a necessity for explicit definition. Other optimizations include the type indexing of data types when a novel instance of the type is first encountered, and embedding loader definitions to load the object or data reflected in the binary representation without having to do a lookup against loader lists. Because the resulting binary representation is more compact than the corresponding XAML input and is optimized for certain operations, operating system and application interfaces may load and present more quickly than conventional XML-type files. The binary representation may be exposed through APIs to calling application, operating system or other programs.
摘要:
Smooth transitions between rich media (e.g., animations of visual elements of a UI) are provided when a “second” animation is started on a property of a visual element for which a “first” animation is already running. When the second animation is started, an animation system causes a current value of the property that resulted from the running of the “first” animation (i.e., snapshot) to be stored, terminates or releases the first animation, and then causes the second animation to run using the snapshot as the “from” value of the property. Because the second animation “begins” at exactly the point at which the first animation ended, the transition between the first and second animation is smooth. An animation storage object can be created for a property for which an animation has been triggered to store base values and snapshots of the property while being animated.