语言

Menu
Sites
Language
I'm using ElmSharp's button object. How do I change the font size?

I'm using ElmSharp's button object. How do I change the font size? 

I'm working on a Galaxy Watch widget.

Example code..

Button btn = new Button(Window)
btn = new Button(Window)
{
    Text = "test widget",
    AlignmentX = -1,
    AlignmentY = -1,
    WeightX = 1,
    WeightY = 1
}

https://developer.tizen.org/dev-guide/csapi/api/ElmSharp.Button.html

响应

1 回复
Tizen .NET

I'm sorry for the inconvenience caused by insufficient documentation.

You can change the font formatting with markup as follows:

btn = new Button(Window)
{
    Text = "<font_size=30>test widget</font_size>",
    AlignmentX = -1,
    AlignmentY = -1,
    WeightX = 1,
    WeightY = 1
}

Please check this out to get more information.