xtd 0.2.0
Loading...
Searching...
No Matches

◆ draw_button() [8/10]

static void xtd::forms::button_renderer::draw_button ( const style_sheets::style_sheet style_sheet,
xtd::drawing::graphics graphics,
const xtd::drawing::rectangle bounds,
xtd::forms::visual_styles::push_button_state  button_state,
bool  default_button,
const std::optional< xtd::drawing::color > &  back_color,
const xtd::ustring text,
const std::optional< xtd::forms::content_alignment > &  text_align,
const std::optional< xtd::drawing::color > &  fore_color,
const std::optional< xtd::drawing::font > &  font 
)
static

Draws a button in the specified bounds, button style, button state, background color, text, optional text flags, optional foreground color and optional font.

Parameters
graphicsThe xtd::drawing::graphics used to draw a button.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button.
button_stateThe visual state of a button that is drawn with visual styles.
default_buttonSets to tru if the buffon is default; otherwise false.
back_colorThe background color for the button control.
textThe text of the button control.
text_flagsContains the display and layout information for text strings.
fore_colorThe foreground color for the button control.
fontThe font of the text for the button control.
Remarks
The parameter back_color is set only if they are different from its default value; otherwise std::nullopt.