ISupportsFadingTState Interface
Represents a control that supports buffered fading animations based on a custom state type.
Namespace: KGySoft.WinFormsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
public interface ISupportsFading<TState> : IWin32Window
Public Interface ISupportsFading(Of TState)
Inherits IWin32Window
generic<typename TState>
public interface class ISupportsFading : IWin32Window
type ISupportsFading<'TState> =
interface
interface IWin32Window
end
- Implements
- IWin32Window
Type Parameters
- TState
- A type that represents the state of the object. It should be meaningfully equatable.
A
FadingPainterTState instance should be created along with the control.
Double buffering should be disabled, otherwise animations will not work. To avoid
flickering do not draw anything in the overridden
OnPaintBackground method.
Override
OnPaint, and call
FadingPainter<TState>.Paint
from there, which uses double buffering internally. That will invoke the
PaintState method implementation
where the control should be painted with the specified state.
| FadingAnimationDefaultSpeed |
Gets or sets the default fading animation speed, in milliseconds. 0 means immediate change.
|
| FadingAnimationsEnabled |
Gets or sets whether fading animations are enabled for the control.
Animations work on Windows Vista and above when visual styles are enabled.
|
| IsHandleCreated |
Gets whether the Handle property is available.
|
| State |
Gets the current state of the object. When it changes, the control should be invalidated.
When the control is repainted but there is no state difference, no animation will be performed.
|
| GetFadingAnimationSpeed |
Gets the speed of the animation between two specified states, in milliseconds.
|
| PaintState |
The implementer method should perform all painting operations here, using the provided state.
|