How to control Font Type and Size on the form at Runtime
It might be requested by users to have the ability to control the styling of text on the form at runtime. Specifically we might want to change the font type and also the font size on the controls. This can be done statically at design time, however in order to get it to happen at runtime for users we can add some additional configuration to get the desired behavior.
Before You Begin
- Establish what styles are currently possible and what is desired by your users.
- Read over the current documentation on conditional styles:
1. Create a static drop-down of desired styles. In this example we are configuring for font size and I want a small, default, and large size.
2. Create a relevant condition tied to when the drop-down contains a certain value. Note that this must be done on each control individually. For this example I am building the condition for when the drop-down will contain the value "Small" for when we want our text on this control to be a smaller font size.
3. Set the relevant style you would like on this control based on the drop-down's value. In this case I was configuring the small font size so I chose the smallest size of 6 pt.