摘要:
Described is a system and method for declaring a resource element in markup that is intended to be instantiated lazily only upon use at run-time rather than always at markup load time. In one embodiment, the invention provides a parent resources tag that encloses resource elements that may be any type of markup element. On compile, a specially prepared compiler/parser identifies the Resource tag and creates definitional information sufficient to describe the resource elements in such a manner that the resource elements are defined but not created at run-time when the markup is first loaded, and are created only upon use at run-time. A resource may be defined to be shared or non-shared. If shared, the resource is instantiated only once and that same instance is handed out each time the resource is accessed. If non-shared, a new instance of the resource is always created and handed out on each access of the resource.
摘要:
The present invention is directed to a method and system for compiling a markup language file into an executable application or library dll. The system may also compile a code-behind file associated with the markup language file. The compiling system may include a parser for parsing the markup language file and providing the compiling system with detailed token information to the compiling system. This token information could be user code snippets or non-code token information such as tags, properties or events in the markup. The compiling system may also include a binary file generator for generating a binary file from the non-code token information, wherein the binary file contains one record for each non-code token. Additionally, the system may include a code generator for generating a language-independent tree of code expressions based on the token information, wherein the code expressions represent the markup language file as a class. A compiler may compile the binary files and code files to create an executable application.
摘要:
Described is a system and method for declaring a resource element in markup that is intended to be instantiated lazily only upon use at run-time rather than always at markup load time. In one embodiment, the invention provides a parent resources tag that encloses resource elements that may be any type of markup element. On compile, a specially prepared compiler/parser identifies the Resource tag and creates definitional information sufficient to describe the resource elements in such a manner that the resource elements are defined but not created at run-time when the markup is first loaded, and are created only upon use at run-time. A resource may be defined to be shared or non-shared. If shared, the resource is instantiated only once and that same instance is handed out each time the resource is accessed. If non-shared, a new instance of the resource is always created and handed out on each access of the resource.
摘要:
Described is a system, method, and data structure that enables an executable assembly associated with a subclass to be generated from a subclass definition within a markup document. In accordance with the invention, the subclass definition is written based on a schema. The schema may be XML-based. The schema includes a subclass tag for defining a name for the subclass. The name is associated with a type for an object that is instantiated when the executable assembly executes. The schema further includes one or more hints, such as for specifying a programming language to compile the subclass definition, for specifying a superclass from which the subclass derives, for specifying actions to perform when the object becomes instantiated, for creating an event definition and event handler for the subclass, and for specifying a property that becomes a member within the object when the object is instantiated.
摘要:
A method and system for validating access to a group of related elements are described. The elements within the group access a security context associated with a markup domain when a call is made to an element. An authorized call to an element is enabled such that the markup domain is navigated to a new web page. However, an unauthorized call is prevented so that the navigation to the new web page is not permitted. After the markup domain has been navigated, the security context associated with the markup domain is invalidated. A new security context is generated and associated with the markup domain. The elements associated with the web page navigated from are inaccessible after navigation of the markup domain to the new page. The association of the new security context with the markup domain prevents an unauthorized user from accessing any element that references the previous security context.
摘要:
Aspects of the subject matter described herein relate to directing focus to elements of a graphical user interface in response to focus events. In aspects, a program may include multiple focus scopes each of which may include elements capable of receiving keyboard input. When an element receives keyboard focus, information regarding the element is updated to indicate that the element has or had keyboard focus. Thereafter, focus scope may be changed to a focus scope other than the one including the element. When changing the focus scope back to the focus scope that includes the element, the information may be used to give the element keyboard focus.
摘要:
Various technologies and techniques improve the process for creating and displaying context menus and tooltips. Procedures for listening for events, enabling, retrieving and displaying context menus and tooltips reside in a central service model. The developer accesses the central service model and specifies content for a context menu or tooltip. Rich media content such as audio, video, and graphic output can be included in context menus and tooltips. Shapes and effects of displayed content can also be customized.
摘要:
Theme changes for a custom graphical element are facilitated by providing a mechanism for storing theme specific data for the custom graphical element, providing a software object, independent of the custom graphical element, that monitors theme change events and, in response to a new theme being selected, the software object causing the custom graphical element to be redrawn according to the new theme. The custom graphical element may be graphical portions of a custom control, or a custom control itself. Switching to a new theme for an integrated graphical unit may be provided by marking for redrawing all of the graphical elements of the integrated graphical unit, traversing the elements, and redrawing each element that is marked. There may be provided a directory of theme files and, in each theme file, theme specific information indicating visual appearance of graphical elements.
摘要:
Described is a system and method for declaring a resource element in markup that is intended to be instantiated lazily only upon use at run-time rather than always at markup load time. In one embodiment, the invention provides a parent resources tag that encloses resource elements that may be any type of markup element. On compile, a specially prepared compiler/parser identifies the Resource tag and creates definitional information sufficient to describe the resource elements in such a manner that the resource elements are defined but not created at run-time when the markup is first loaded, and are created only upon use at run-time. A resource may be defined to be shared or non-shared. If shared, the resource is instantiated only once and that same instance is handed out each time the resource is accessed. If non-shared, a new instance of the resource is always created and handed out on each access of the resource.
摘要:
The visual appearance of a user interface element can be specified in a visual style document divorced from its semantic implementation. The visual style document can be used to specify a visual style including a set of sub-elements used for composing composite user interface element. Selected properties of the sub-elements may be exposed as properties of the composite element itself such that values specified for properties of the composite user interface element can be consumed by corresponding properties of the sub-elements. The style document can also be used to specify values for selected visual properties described in a named resource that may be independent of the style document. Changes in functional aspects of selected sub-elements of composite user interface elements can be used to drive changes in properties of the composite user interface element or other sub-elements by triggering commands that the other elements may be responsive to.