customizing xaml skins for powerbuilder.net wpf applications dave fish, engineering evangelist

16
CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

Upload: corey-day

Post on 19-Dec-2015

228 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF

APPLICATIONS

DAVE FISH, ENGINEERING EVANGELIST

Page 2: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

2 – Company Confidential – April 18, 2023

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

Page 3: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

3 – Company Confidential – April 18, 2023

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

Page 4: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

4 – Company Confidential – April 18, 2023

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

Page 5: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

STYLES DEMONSTRATION

Page 6: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

6 – Company Confidential – April 18, 2023

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

Page 7: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

TEMPLATES DEMONSTRATION

Page 8: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

8 – Company Confidential – April 18, 2023

SKINS

• Not a distinct concept in WPF

• Use Dynamic Resources combined with Styles and Templates to create dynamic skinning

Page 9: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

9 – Company Confidential – April 18, 2023

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

Page 10: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

10 – Company Confidential – April 18, 2023

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

Page 11: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

11 – Company Confidential – April 18, 2023

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

Page 12: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

12 – Company Confidential – April 18, 2023

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

Page 13: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

SKINS DEMONSTRATION

Page 14: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

14 – Company Confidential – April 18, 2023

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

Page 15: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST

SKIN CUSTOMIZATION DEMONSTRATION

Page 16: CUSTOMIZING XAML SKINS FOR POWERBUILDER.NET WPF APPLICATIONS DAVE FISH, ENGINEERING EVANGELIST