GraffitiCard

View Categories

Images #

About #

GraffitiCard is a mobile implementation of popular web components meant to convey information in an encapsulated form with a call-to-action button.

Features:

  • Optional Title, Image, Header, Subheader, Content, and Button areas
  • Dark Mode aware
  • Text is fully customizable
  • Auto-height support for variable content

See Also #

This class has no related objects.

Enumerations #

NameValues
Alignments Left
Center
Right

Constants #

NameTypeValue

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
ButtonPressedNoneNoneRaised when the user clicks the card’s button.
HeightChangedNoneNoneRaised when the height of the card has changed. Only fires when the AutoHeight property is True.
TitleBackgroundPaintg as GraphicsNoneOverrides painting of title area background.
TitleTextPaintg as graphicsBooleanRaised when the title text is being drawn. Return True to override.

Methods #

DefinitionDescription
This class exposes no methods.

Properties #

NameTypeDefault ValueDescription
AutoHeightBooleanTrueWhen True the Card will resize vertically so that its content fills the entire area.
BackgroundColorColorGroupNilColor applied to card background.
BorderColorColorGroupNilColor applied to card border.
ButtonString“Button Text”When length = 0, button will not be shown.
ButtonBoldBooleanFalseFont weight of button.
ButtonBorderRadiusInteger8Border radius of button object.
ButtonColorColorGroupNilColor applied to button object’s background
ButtonFontFaceString“System”Font used for drawing button text.
ButtonFontSizeInteger16Font size applied to button text.
ButtonItalicBooleanFalseIf True button text will be italicized.
ButtonTextColorColorGroupNilColor applied to button object’s text.
ButtonUnderlineBooleanWhen True button text will be underlined. 
ContentString“Content”Text to be displayed in the content area of the card.
ContentAlignmentAlignmentsAlignments.LeftDrawing position of content.
ContentBoldBooleanFalseFont weight of content text.
ContentFontFaceString“System”Font face applied to content text.
ContentFontSizeInteger0Font size used for drawing content text.
ContentItalicBooleanFalseWhen True content text will be italicized.
ContentTextColorColorGroupNilColor applied to content text.
ContentUnderlineBooleanFalseIf True, applies an underline to content text.
CornerRadiusDouble12Determines the roundness of the cards’ corners.
HeaderString“Header Text”Text to draw in the header position of the card.
HeaderBoldBooleanFalseFont weight of header.
HeaderFontFaceString“System”Font face of header.
HeaderFontSizeInteger16Font size of header.
HeaderItalicBooleanFalseWhen True, makes header text italicized.
HeaderTextColorColorGroupNilColor applied to header text.
HeaderUnderlineBooleanFalseApplies underline to header text.
ImagePictureNilImage displayed below the title and above the header.
SubheaderString“Subheader”Text displayed below the header and above the content.
SubheaderBoldBooleanFalseFont weight of the subheader text.
SubheaderFontFaceString“System”Font face used for subheader text.
SubheaderFontSizeInteger14Font size used for subheader text.
SubheaderItalicBooleanFalseWhen True, subheader text will be italicized.
SubheaderTextColorColorGroupNilColor applied to subheader text.
SubheaderUnderlineBooleanFalseApplies underline to subheader text.
TitleString“Untitled”The title of the card. Appears above all other elements.
TitleBackgroundColorColorGroupNilBackground color of the titlebar.
TitleBoldBooleanFalseFont weight of title text.
TitleFontFaceString“System”Font face of title text.
TitleFontSizeInteger20Font size of title text.
TitleItalicBooleanFalseMakes the title text italicized.
TitleTextColorColorGroupNilApplies the specified color to the title text.
TitleUnderlineBooleanApplies underline to title text. 

Examples #

Conditionally Applying a Dark/Light Image #

Sub Open() Handles Open
  me.Image = demo_header_bg_light
 
  if GraffitiColors.SystemAware.IsDarkMode then
    me.Image = demo_header_bg_dark
  end if
 
End Sub

Notes #

This class currently has no notes.