Class Style
Contains property setters that can be shared between instances of a type.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public class Style : DependencyObject
Constructors
| Improve this Doc View SourceStyle()
Initializes a new instance of the Style class, with no initial TargetType and an empty Setters collection.
Declaration
public Style()
Style(Type)
Initializes a new instance of the Style class, with an initial TargetType and an empty Setters collection.
Declaration
public Style(Type targetType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The type on which the Style will be used. |
Properties
| Improve this Doc View SourceBasedOn
Style to base on
Declaration
public Style BasedOn { get; set; }
Property Value
Type | Description |
---|---|
Style |
IsSealed
Style mutability state
Declaration
public bool IsSealed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
A style is sealed when another style is basing on it, or, when it's applied
Setters
The collection of property setters for the target type
Declaration
public SetterBaseCollection Setters { get; }
Property Value
Type | Description |
---|---|
SetterBaseCollection |
TargetType
Type that this style is intended
Declaration
public Type TargetType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
Remarks
By default, the target type is FrameworkElement
Methods
| Improve this Doc View SourceSeal()
This Style is now immutable
Declaration
public void Seal()