Skip to content

ViewModelViewHost.StyleKeyOverride property

Defined in

Type: ViewModelViewHost Namespace: Avalonia.ReactiveUI Assembly: ReactiveUI.Avalonia.Autofac.dll

Applies to

netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0

protected override Type StyleKeyOverride { get; }

View source

Summary: Gets the type by which the element is styled.

Returns: Type

Remarks

        Usually controls are styled by their own type, but there are instances where you want
        an element to be styled by its base type, e.g. creating SpecialButton that
        derives from Button and adds extra functionality but is still styled as a regular
        Button. Override this property to change the style for a control class, returning the
        type that you wish the elements to be styled as.