160 likes | 171 Views
Overview of customizing skins in PowerBuilder .NET using XAML for applications, windows, controls, and data windows. Learn about styles, templates, and themes for dynamic skinning.
E N D
Customizing XAML Skins for PowerBuilder.NET WPF Applications DAVE FISH, ENGINEERING EVANGELIST
AGENDA Overview of Styles, Templates, Skins and Themes Using Skins in PowerBuilder .NET Applications Skins for Applications, Windows, and Controls Skins for DataWindows Customizing Skins
terminology Styles: A simple mechanism for separating property values from user interface elements. The foundation for templates and skins Templates Powerful objects used to restyle controls in WPF Skins Application-specific collections of styles and/or templates, typically with the ability to be replaced dynamically
Styles Main function is to group together property values that could otherwise be set individually This group of values can be shared among multiple elements Serves a similar purpose to inheritance but can be much more powerful Styles can be shared among different kinds of elements (button, listbox, toolbar, tab control, etc.) Can be restricted to particular types of controls Can contain Triggers Property Triggers Data Triggers Event Triggers
Templates Collection of Styles WPF supports multiple types of templates Control Templates ItemsPanel Templates Data Templates Control templates are used with styles to create Skins
Skins Not a distinct concept in WPF Use Dynamic Resources combined with Styles and Templates to create dynamic skinning
Skins in PowerBuilder .NET PowerBuilder .NET has enhanced WPF to make applying skins easy Skins can be applied at the: Application level (application object property) Window level (Window property) Control level (control property) Skins can be applied at design time or at runtime PowerBuilder .NET includes 5 built-in skins You can customize these skins or create your own
PowerBuilder Skins Theme Skins: Classic (Generic) (Windows 2000 Look and Feel) Luna (Windows XP Look and Feel) Aero (Windows Vista and Windows 7 Look and Feel) Pre-defined Skins: Expression Dark Metal Rainer Orange Rough Green Shiny Dark Teal
PowerBuilder Skins Theme Skins: Embedded in Sybase.PowerBuilder.WPF.Controls Pre-defined Skins: Embedded in Sybase.PowerBuilder.WPF.Controls.Skins If you don’t select a skin, the theme skin for your operating system will be used
datawindow Skins The DataWindow Control also contains a Skin property Custom skin XAML files can be applied to the Preview Window in the DataWindow painter
Customizing Skins PowerBuilder skins can be customized The easiest way to do this is to take an existing PowerBuilder skin and modify it In-depth knowledge of WPF Styles and Templates helpful PowerBuilder 12.5 will make customization easier through an IDE feature called VisualStateManager