namespace sap.m.BackgroundHelper

Control sample: sap.m.BackgroundHelper
Visiblity: protected
Available since: N/A
Module: sap/m/library
Application Component: CA-UI5-CTR

Helper for rendering themable background.


Nodes Overview

Node Description

Methods Overview

Method Description
sap.m.BackgroundHelper.addBackgroundColorStyles

Adds CSS classes and styles to the given RenderManager, depending on the given configuration for background color and background image. To be called by control renderers supporting the global themable background image within their root tag, before they call openEnd, voidEnd, writeClasses() and writeStyles().

sap.m.BackgroundHelper.renderBackgroundImageTag

Renders an HTML tag into the given RenderManager which carries the background image which is either configured and given or coming from the current theme. Should be called right after the opening root tag has been completed, so this is the first child element inside the control.

sap.m.BackgroundHelper.addBackgroundColorStyles

Adds CSS classes and styles to the given RenderManager, depending on the given configuration for background color and background image. To be called by control renderers supporting the global themable background image within their root tag, before they call openEnd, voidEnd, writeClasses() and writeStyles().

Param Type DefaultValue Description
rm sap.ui.core.RenderManager

The RenderManager

sBgColor sap.ui.core.CSSColor

A configured custom background color for the control, if any

sBgImgUrl sap.ui.core.URI

The configured custom background image for the control, if any

sap.m.BackgroundHelper.renderBackgroundImageTag

Renders an HTML tag into the given RenderManager which carries the background image which is either configured and given or coming from the current theme. Should be called right after the opening root tag has been completed, so this is the first child element inside the control.

Param Type DefaultValue Description
rm sap.ui.core.RenderManager

The RenderManager

oControl sap.ui.core.Control

Control within which the tag will be rendered; its ID will be used to generate the element ID

vCssClass string string[]

A CSS class or an array of CSS classes to add to the element

sBgImgUrl sap.ui.core.URI

The image of a configured background image; if this is not given, the theme background will be used and also the other settings are ignored.

bRepeat boolean

Whether the background image should be repeated/tiled (or stretched)

fOpacity float

The background image opacity, if any