共用方式為


System.Windows Namespace

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Provides general "framework" presentation classes for the Silverlight client, as well as many Silverlight base classes for presentation features. These classes are often analogous to classes that exist in the Windows Presentation Foundation (WPF).

Classes

  Class Description
Public class Analytics Exposes read-only data about how an application is performing.
Public class Application Encapsulates a Silverlight application.
Public class ApplicationServiceContext Represents the initial state of a Silverlight application when application extension services are started.
Public class ApplicationUnhandledExceptionEventArgs Provides data for the Application.UnhandledException event.
Public class AssemblyPart An assembly part is an assembly that is to be included in a Silverlight-based application package (.xap).
Public class AssemblyPartCollection Stores a collection of AssemblyPart objects. Provides collection support for the Deployment.Parts property.
Public class CheckAndDownloadUpdateCompletedEventArgs Provides data for the Application.CheckAndDownloadUpdateCompleted event.
Public class Clipboard Provides static methods that facilitate transferring data to and from the system clipboard. In Silverlight 5, this access is limited to Unicode text strings.
Public class DataFormats Provides static, predefined format names for data objects. Use the named constants to identify the format of the data that you request from an IDataObject object.
Public class DataObject Provides a basic implementation of the IDataObject interface, which defines a format-independent mechanism for transferring data.
Public class DataTemplate Describes the visual structure of a data object.
Public class DataTemplateKey Represents the resource key for the DataTemplate class.
Public class DependencyObject Represents an object that participates in the Silverlight dependency property system. DependencyObject is the immediate base class of several other important Silverlight classes, such as UIElement, Geometry, FrameworkTemplate, Style, and ResourceDictionary.
Public class DependencyObjectCollection<T> Represents a collection of DependencyObject instances of a specified type.
Public class DependencyProperty Represents a dependency property that is registered with the Silverlight dependency property system. Dependency properties provide support for value expressions, data binding, animation, and property change notification.
Public class Deployment Provides application part and localization information in the application manifest when deploying a Silverlight-based application.
Public class DragEventArgs Provides data for drag-and-drop events in Silverlight.
Public class DurationConverter Provides type conversion support for the Duration structure.
Public class EventTrigger Represents a trigger that applies a set of actions (animation storyboards) in response to an event.
Public class ExceptionRoutedEventArgs Provides event data for exceptions that are raised as events by asynchronous operations, such as MediaFailed or ImageFailed.
Public class Expression Infrastructure. This type is not intended to be used from your code or to be derived from.
Public class ExtensionPart Represents a zip file containing assemblies used by application library caching.
Public class ExternalPart Defines a base class for specifying parts of a Silverlight application that are external to the application package (.xap file).
Public class ExternalPartCollection Represents a collection of ExternalPart instances that indicate parts of a Silverlight application that are external to the application package (.xap file).
Public class FontStretches Provides a set of predefined font stretches as static property values.
Public class FontStyles Provides a set of predefined font styles as static property values.
Public class FontWeights Provides a set of predefined font weights as static property values.
Public class FrameworkElement Provides a framework of common APIs for objects that participate in Silverlight layout. FrameworkElement also defines APIs related to data binding, object tree, and object lifetime feature areas in Silverlight.
Public class FrameworkTemplate Creates an element tree of elements.
Public class GpuInformation Represents details for graphics processor unit (GPU) information as reported by the system of the local computer.
Public class HierarchicalDataTemplate Represents a DataTemplate that supports HeaderedItemsControl objects, such as TreeViewItem.
Public class Icon Represents an icon that is used to identify an offline application.
Public class IconCollection Represents a collection of Icon instances.
Public class InBrowserSettings Represents information about an application that is configured for in-browser support.
Public class LayoutCycleException An exception that is thrown by the layout cycle.
Public class MediaFailedRoutedEventArgs Provides event data for media failed events.
Public class MessageBox Displays a message to the user and optionally prompts for a response.
Public class NotificationWindow Represents a notification area that is displayed in the system area. Notifications can only be enabled for an out-of-browser application; browser-hosted applications cannot access this notification area.
Public class NullableBoolConverter Converts Nullable<T> types (using the Boolean type constraint on the generic) from strings.
Public class OutOfBrowserSettings Represents information about an application that is configured for out-of-browser support.
Public class PresentationFrameworkCollection<T> Provides a common collection class for Silverlight collections.
Public class PropertyMetadata Defines certain behavior aspects of a dependency property, including conditions it was registered with.
Public class PropertyPath Implements a data structure for describing a property as a path below another property, or below an owning type. Property paths are used in data binding to objects, and in storyboards and timelines for animations.
Public class PropertyPathConverter Provides type conversion support for the PropertyPath type.
Public class ResourceDictionary Provides a dictionary that contains resources used by components of a Silverlight-based application.
Public class RoutedEvent Represents a routed event to the Silverlight event system.
Public class RoutedEventArgs Contains state information and event data associated with a routed event.
Public class RoutedPropertyChangedEventArgs<T> Provides data about a change in value to a dependency property as reported by particular routed events, including the previous and current value of the property that changed.
Public class SecuritySettings Represents the security configuration of an out-of-browser application.
Public class Setter Applies a value to a property in a Style.
Public class SetterBase Represents the base class for value setters.
Public class SetterBaseCollection Represents a collection of objects that inherit from SetterBase.
Public class SizeChangedEventArgs Provides data related to the SizeChanged event.
Public class StartupEventArgs Contains the event data for the Startup event.
Public class Style Contains property setters that can be shared between instances of a type.
Public class StyleTypedPropertyAttribute Represents an attribute that is applied to the class definition and reports the TargetType of the properties that are of type Style.
Public class SystemColors Contains system colors, system brushes, and system resource keys that correspond to system display elements.
Public class SystemParameters Contains properties that you can use to query system settings.
Public class TemplateBindingExpression Infrastructure. Supports template binding.
Public class TemplatePartAttribute Represents an attribute that is applied to the class definition to identify the types of the named parts that are used for control templating.
Public class TemplateVisualStateAttribute Specifies that a control can be in a certain state and that a VisualState is expected in the control's ControlTemplate.
Public class TextDecorationCollection Provides the value for the TextBlock.TextDecorations and Inline.TextDecorations properties.
Public class TextDecorations Implements a set of predefined text decorations.
Public class TriggerAction Serves as the base class for BeginStoryboard.
Public class TriggerActionCollection Represents a collection of BeginStoryboard objects.
Public class TriggerBase Serves as the base class for EventTrigger.
Public class TriggerCollection Represents a collection of EventTrigger objects.
Public class UIElement UIElement is a base class for most of the objects that have visual appearance and can process basic input in Silverlight.
Public class VisualState Represents the visual appearance of the control when it is in a specific state.
Public class VisualStateChangedEventArgs Provides data for the CurrentStateChanging and CurrentStateChanged events.
Public class VisualStateGroup Contains mutually exclusive VisualState objects and VisualTransition objects that are used to go from one state to another.
Public class VisualStateManager Manages states and the logic for transitioning between states for controls.
Public class VisualTransition Represents the visual behavior that occurs when the control transitions from one state to another.
Public class Window Represents an out-of-browser application window.
Public class WindowCollection Represents a collection of Window instances.
Public class WindowSettings Represents information about an out-of-browser application window.

Structures

  Structure Description
Public structure CornerRadius Describes the characteristics of a rounded corner, such as can be applied to a Border.
Public structure DependencyPropertyChangedEventArgs Provides data for a PropertyChangedCallback implementation.
Public structure Duration Represents the duration of time that a Timeline is active.
Public structure FontStretch Describes the degree to which a font has been stretched, compared to the normal aspect ratio of that font.
Public structure FontStyle Represents the style of a font face (for instance, as normal or italic).
Public structure FontWeight Refers to the density of a typeface, in terms of the lightness or heaviness of the strokes.
Public structure GridLength Represents the length of elements that explicitly support Star unit types.
Public structure Point Represents an x- and y-coordinate pair in two-dimensional space. Can also represent a logical point for certain property usages.
Public structure Rect Describes the width, height, and point origin of a rectangle.
Public structure Size Describes the width and height of an object.
Public structure Thickness Describes the thickness of a frame around a rectangle. Four Double values describe the Left, Top, Right, and Bottom sides of the rectangle, respectively.

Interfaces

  Interface Description
Public interface IApplicationLifetimeAware Defines methods that application extension services can optionally implement in order to respond to application lifetime events.
Public interface IApplicationService Defines methods that application extension services must implement in order to enable an application to start and stop the service.
Public interface IDataObject Provides a format-independent mechanism for transferring data.

Delegates

  Delegate Description
Public delegate CheckAndDownloadUpdateCompletedEventHandler Represents the method that will handle the Application.CheckAndDownloadUpdateCompleted event.
Public delegate DependencyPropertyChangedEventHandler Represents the method that will handle events raised when a DependencyProperty is changed on a particular DependencyObject implementation.
Public delegate DragEventHandler Represents the method that will handle the DragEnter, DragLeave, DragOver, and Drop events of a UIElement.
Public delegate ExceptionRoutedEventHandler Represents the method that will handle certain events that report exceptions. These exceptions generally come from asynchronous operations where holding up the UI thread for exception checking is not an option.
Public delegate MediaFailedRoutedEventHandler Represents the method that handles media failed events.
Public delegate PropertyChangedCallback Represents the callback that is invoked when the effective property value of a dependency property changes.
Public delegate RoutedEventHandler Represents the method that will handle routed events.
Public delegate RoutedPropertyChangedEventHandler<T> Represents methods that will handle various routed events that track property value changes.
Public delegate SizeChangedEventHandler Represents the method that will handle the SizeChanged event.
Public delegate StartupEventHandler Represents the method that will handle the Application.Startup event.

Enumerations

  Enumeration Description
Public enumeration CrossDomainAccess Defines values that specify the access that cross-domain callers have to a Silverlight-based application.
Public enumeration ElevatedPermissions Defines constants that indicate whether elevated permissions are required for an out-of-browser application.
Public enumeration FlowDirection Defines constants that specify the content flow direction for text and UI elements.
Public enumeration FontCapitals Describes the capital letter style for a Typography object.
Public enumeration FontEastAsianLanguage Provides a mechanism for the user to select font-specific versions of glyphs for a specified East Asian writing system or language.
Public enumeration FontEastAsianWidths Provides a mechanism for the user to select glyphs of different width styles.
Public enumeration FontFraction Describes the fraction style for a Typography object.
Public enumeration FontNumeralAlignment Describes the numeral alignment for a Typography object.
Public enumeration FontNumeralStyle Describes the numeral style for a Typography object.
Public enumeration FontVariants Defines access to registered OpenType font variants.
Public enumeration GridUnitType Describes the kind of value that a GridLength object is holding.
Public enumeration HorizontalAlignment Indicates where an element should be displayed on the horizontal axis relative to the allocated layout slot of the parent element.
Public enumeration InstallState Defines constants that indicate the installation state of an application that is configured to run outside the browser.
Public enumeration LineStackingStrategy Describes the mechanism by which a line box is determined for each line.
Public enumeration MessageBoxButton Specifies the buttons to include when you display a message box.
Public enumeration MessageBoxResult Represents a user's response to a message box.
Public enumeration TextAlignment Specifies whether text is centered, left-aligned, or right-aligned.
Public enumeration TextTrimming Describes how text is trimmed when it overflows the edge of its containing box.
Public enumeration TextWrapping Specifies whether text wraps when it reaches the edge of its container.
Public enumeration VerticalAlignment Describes how a child element is vertically positioned or stretched within a parent's layout slot.
Public enumeration Visibility Specifies the display state of an element.
Public enumeration WindowResizeEdge Defines constants that represent the edges and corners of a Silverlight out-of-browser application window.
Public enumeration WindowStartupLocation Defines constants that indicate how an out-of-browser application window is positioned at startup.
Public enumeration WindowState Defines constants that indicate the state of an out-of-browser application window.
Public enumeration WindowStyle Defines constants that indicate the appearance of the title bar and border of an out-of-browser application window.