HypernovaDesktop Components · docs
Binarymission
WPF › Smart Info Panel › SmartInfoPanel

SmartInfoPanel

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Containers

A custom ContentControl class that provides a stylish way to present "flip" capable "double-sided" content.

public class SmartInfoPanel : ContentControl

Inherits from / implements: ContentControl

Remarks

Set up you content objects, and assign to the control's properties, and your content can be flipped back and forth.
The content object properties to set are:
1. RotatableContentFace
2. RotatableContentBack
3. NonRotatableContent

That is all to it. Your rotatable content is ready to flip back-and-forth.

Of course, you can set all other additional properties that are available in the control like border shadow, etc.

Members at a glance

AmbientLightColorGets or sets the color of the ambient light.
BorderDropShadowColorGets or sets the color of the border dropshadow.
BorderDropShadowSoftnessGets or sets the blur radius, in pixels, of the border's drop shadow.
BorderEdgeCornerRadiusGets or sets the border edge corner radius.
DirectionalLightColorGets or sets the color of the directional light.
IsBorderDropShadowEnabledGets or sets a value indicating whether the control's border is dropshadow enabled.
IsBorderEdgeCurvedGets or sets a value indicating whether teh control's border edge is curved.
IsFaceShowingGets a value indicating whether the face is the side currently on show.
IsRotatableContentDropShadowEnabledGets or sets a value indicating whether the control's rotatable content is dropshadow enabled.
NonRotatableContentGets or sets the data for the non-rotatable content.
RotatableContentBackGets or sets the "back" side of the rotatable content.
RotatableContentDropShadowColorGets or sets the color of the rotatable content dropshadow.
RotatableContentDropShadowSoftnessGets or sets the blur radius, in pixels, of the rotatable content's drop shadow.
RotatableContentFaceGets or sets the "face" side of the rotatable content.
RotateFlipTypeGets or sets the rotation flip style.
FlipTurns the rotatable content over, exactly as a click on it does, using the current RotateFlipType.
OnApplyTemplateFinds the presenter that shows the rotatable content in the current template.
OnPreviewMouseDownConnects the 3D surfaces to the face and back content before a click starts a flip.
AmbientLightColorPropertyIdentifies the AmbientLightColor dependency property.
BorderDropShadowColorPropertyIdentifies the BorderDropShadowColor dependency property.
BorderDropShadowSoftnessPropertyIdentifies the BorderDropShadowSoftness dependency property.
BorderEdgeCornerRadiusPropertyIdentifies the BorderEdgeCornerRadius dependency property.
DirectionalLightColorPropertyIdentifies the DirectionalLightColor dependency property.
IsBorderDropShadowEnabledPropertyIdentifies the IsBorderDropShadowEnabled dependency property.
IsBorderEdgeCurvedPropertyIdentifies the IsBorderEdgeCurved dependency property.
IsRotatableContentDropShadowEnabledPropertyIdentifies the IsRotatableContentDropShadowEnabled dependency property.
NonRotatableContentPropertyIdentifies the NonRotatableContent dependency property.
RotatableContentBackPropertyIdentifies the RotatableContentBack dependency property.
RotatableContentDropShadowColorPropertyIdentifies the RotatableContentDropShadowColor dependency property.
RotatableContentDropShadowSoftnessPropertyIdentifies the RotatableContentDropShadowSoftness dependency property.
RotatableContentFacePropertyIdentifies the RotatableContentFace dependency property.
RotateFlipTypePropertyIdentifies the RotateFlipType dependency property.

Properties

AmbientLightColor

public Color AmbientLightColor

Gets or sets the color of the ambient light.

Value. The colour; the default is a dark grey, which is the light that reaches the side of the model the directional light does not.

BorderDropShadowColor

public Color BorderDropShadowColor

Gets or sets the color of the border dropshadow.

BorderDropShadowSoftness

public double BorderDropShadowSoftness

Gets or sets the blur radius, in pixels, of the border's drop shadow.

Value. The blur radius; the theme's default is 12. Takes effect while IsBorderDropShadowEnabled is true.

BorderEdgeCornerRadius

public CornerRadius BorderEdgeCornerRadius

Gets or sets the border edge corner radius.

Value. The border edge corner radius.

DirectionalLightColor

public Color DirectionalLightColor

Gets or sets the color of the directional light.

Value. The colour; the default is a near-white grey. It lights the face the user is turning, so a colour here tints the picture as it moves.

This colour and AmbientLightColor are added per channel and the result is clipped at white, so two bright lights together wash out any colour in either.

IsBorderDropShadowEnabled

public bool IsBorderDropShadowEnabled

Gets or sets a value indicating whether the control's border is dropshadow enabled.

IsBorderEdgeCurved

public bool IsBorderEdgeCurved

Gets or sets a value indicating whether teh control's border edge is curved.

IsFaceShowing

public bool IsFaceShowing

Gets a value indicating whether the face is the side currently on show.

Value. true while the face is up, false once the panel has been turned over. A panel with no flip template yet reports true .

IsRotatableContentDropShadowEnabled

public bool IsRotatableContentDropShadowEnabled

Gets or sets a value indicating whether the control's rotatable content is dropshadow enabled.

NonRotatableContent

public Object NonRotatableContent

Gets or sets the data for the non-rotatable content.

RotatableContentBack

public Object RotatableContentBack

Gets or sets the "back" side of the rotatable content.

RotatableContentDropShadowColor

public Color RotatableContentDropShadowColor

Gets or sets the color of the rotatable content dropshadow.

RotatableContentDropShadowSoftness

public double RotatableContentDropShadowSoftness

Gets or sets the blur radius, in pixels, of the rotatable content's drop shadow.

Value. The blur radius; the theme's default is 12. Takes effect while IsRotatableContentDropShadowEnabled is true.

RotatableContentFace

public Object RotatableContentFace

Gets or sets the "face" side of the rotatable content.

RotateFlipType

public FlipType RotateFlipType

Gets or sets the rotation flip style.

Value. One of the values from FlipType.

Methods

Flip

public void Flip()

Turns the rotatable content over, exactly as a click on it does, using the current RotateFlipType.

OnApplyTemplate

public override void OnApplyTemplate()

Finds the presenter that shows the rotatable content in the current template.

OnPreviewMouseDown

protected override void OnPreviewMouseDown(MouseButtonEventArgs e)

Connects the 3D surfaces to the face and back content before a click starts a flip.

e
The event data.

Fields

AmbientLightColorProperty

public static readonly DependencyProperty AmbientLightColorProperty

Identifies the AmbientLightColor dependency property.

BorderDropShadowColorProperty

public static readonly DependencyProperty BorderDropShadowColorProperty

Identifies the BorderDropShadowColor dependency property.

BorderDropShadowSoftnessProperty

public static readonly DependencyProperty BorderDropShadowSoftnessProperty

Identifies the BorderDropShadowSoftness dependency property.

BorderEdgeCornerRadiusProperty

public static readonly DependencyProperty BorderEdgeCornerRadiusProperty

Identifies the BorderEdgeCornerRadius dependency property.

DirectionalLightColorProperty

public static readonly DependencyProperty DirectionalLightColorProperty

Identifies the DirectionalLightColor dependency property.

IsBorderDropShadowEnabledProperty

public static readonly DependencyProperty IsBorderDropShadowEnabledProperty

Identifies the IsBorderDropShadowEnabled dependency property.

IsBorderEdgeCurvedProperty

public static readonly DependencyProperty IsBorderEdgeCurvedProperty

Identifies the IsBorderEdgeCurved dependency property.

IsRotatableContentDropShadowEnabledProperty

public static readonly DependencyProperty IsRotatableContentDropShadowEnabledProperty

Identifies the IsRotatableContentDropShadowEnabled dependency property.

NonRotatableContentProperty

public static readonly DependencyProperty NonRotatableContentProperty

Identifies the NonRotatableContent dependency property.

RotatableContentBackProperty

public static readonly DependencyProperty RotatableContentBackProperty

Identifies the RotatableContentBack dependency property.

RotatableContentDropShadowColorProperty

public static readonly DependencyProperty RotatableContentDropShadowColorProperty

Identifies the RotatableContentDropShadowColor dependency property.

RotatableContentDropShadowSoftnessProperty

public static readonly DependencyProperty RotatableContentDropShadowSoftnessProperty

Identifies the RotatableContentDropShadowSoftness dependency property.

RotatableContentFaceProperty

public static readonly DependencyProperty RotatableContentFaceProperty

Identifies the RotatableContentFace dependency property.

RotateFlipTypeProperty

public static readonly DependencyProperty RotateFlipTypeProperty

Identifies the RotateFlipType dependency property.