The Businessobjects class has a design with the ACIdentifier "AppResourceDict". This design is a ResourceDictionary that contains many different styles. During the startup process, shortly before the main window is displayed, this ResourceDictionary is loaded into the global ResourceDictionary of the application. You can extend this "AppResourceDict" design in the development environment with your own styles in order to be able to adapt the "look and feel" of the entire application.
Globally adapting the styles of a control
If you want to set the style of a control globally, then you need the "Target Type" and "BasedOn" property with the "X: Type" - MarkupExtension set:
<Style TargetType="{x:Type vb:VBTextBlock}" BasedOn="{x:Type vb:VBTextBlock}">
<Style.Setters>
<Setter Property="FontSize" Value="16" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="#FFFF0000" />
</Style.Setters>
</Style>
Define a named style
If you occasionally need a certain style in your designs, then define the style using the "x: Key" attribute in the "AppResourceDict":
<Style x:Key="globalStyleHeadlineText"
TargetType="{x:Type vb:VBTextBlock}" BasedOn="{x:Type vb:VBTextBlock}">
<Style.Setters>
<Setter Property="FontSize" Value="16" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="#FFFF0000" />
</Style.Setters>
</Style>
You reference this style in your designs via StaticResource:
<vb:VBTextBlock VBContent="SelectedOutPointConfig\ACCaption"
Style="{vb:VBStaticResource globalStyleHeadlineText}" />
Optimization for touch screens
If your application created with iPlus should also be operated on touch screens, then certain controls must be displayed larger. Conversely, if a touchscreen is not used, the enlarged controls might be impractical because a lot of screen space is lost. However, so that you do not have to program two different designs, iPlus provides the Boolean property "TouchScreenMode" in the global ResourceDictionary. This property is true if the user has activated the "Touchscreen" checkbox in the login window.
You then only have to access this value in your designs via StaticResource. In the following example this is done with data triggers:
The minimum row height for datagrids was defined in the first data trigger. All child datagrids display its rows with at least 60 pixels so that the user can better hit the rows with his finger.
In the second data trigger, the buttons should be displayed with a height of 60 pixels.