39
WPF For PowerBuilder Developers

WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

Embed Size (px)

Citation preview

Page 1: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

WPF For PowerBuilder Developers

Page 2: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

PowerBuilder Evolving with .NET

Page 3: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Windows Presentation Foundation

WPF is Microsoft's next generation presentation technology

Applications can have rich visual appearances 3D graphics High definition playback etc…

WPF uses vector-based graphics and is resolution-independent

Page 4: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

WPF Sample Contact Manager

Page 5: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

WPF Sample Text Editor

Page 6: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

WPF Feature Highlights

Broad Integration 3D graphics, video (HD), speech, rich document viewing ...with one technology

Resolution Independence Vector-based graphics render/resize to any screen

resolution

Hardware Acceleration Can take advantage of graphics card performance

…cont’d…

Page 7: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

WPF Feature Highlights

…cont’d…

Declarative Programming XAML for markup

Rich Composition Any control may “parent” another Eventual functionality like… …async video on each line of a DDLB!

Page 8: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Windows Presentation Foundation

XAML is the declarative markup language with which you may create complex WPF user interfaces

XAML allows separation of UI (markup) from runtime logic

XAML knowledge will not be required, just optional

Page 9: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Windows Presentation Foundation

The change is about the underlying presentation technology Windows Forms applications use GDI+ WPF application uses DirectX technology for rendering

DirectX can be rendered using hardware resources Performance may be improved

Page 10: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Object Models: Win32 / WinForm vs. WPF

WPF has a different object model from Win32 and WinForm

We’re working to preserve the PowerBuilder model while incorporating the WPF “style”

Drastically reduces your learning curve for WPF

Page 11: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Object Models: Win32 / WinForm vs. WPF

For example, WPF controls have a “content” property PowerBuilder will abstract that to the “Text” property PowerBuilder will extend WPF controls

<my:WPFButton Height="23" Margin="251,0,268,84" Name=“WPFButton1" VerticalAlignment="Bottom" Text="123" />

Page 12: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Object Models: Win32 / WinForm vs. WPF

WPF has introduced many different new concepts: Dependency Properties, Attached Properties, Commands,

Routed Events

A design goal of PowerBuilder 12 is to hide the details of these new concepts and keep the usage similar to existing PowerBuilder

Page 13: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Object Models: Win32 / WinForm vs. WPF

Our goal is to provide you with a “PowerBuilder Experience” when developing WPF applications

Page 14: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

PowerBuilder 12WPF Application Architecture

Assemblies of the WPF runtime library

WPF DataWindow engine

New Managed database drivers

Page 15: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

PowerBuilder WPF Window:Constraint on Controls

Win32 and WinForm Windows could be the parent of multiple controls

In WPF, a Window may have only one control

Workaround: Place a Panel, Grid or Canvas, in the Window We intend to put Canvas Panels in a migrated Window by

default

Page 16: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Default “Panel” in the PowerBuilder WPF Window class

By default, a Grid panel will be put inside a Window for new WPF applications

Again, Canvas will be used for migrated applications Approximating absolute positioning

Page 17: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Grid vs. Canvas

Grid: Can take more advantage of WPF auto sizing SizeToContent property is available Can automatically size controls to length of text for

localization/regionalization

Canvas: Supports positioning elements with explicit coordinates If we used Grid for migrated applications…position

information would not be accurate enough

Page 18: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

“InnerControl” Property

InnerControl Arguably, the most important newly-introduced WPF control

property

Allows reference to WPF control directly in PowerScript

Read Only (but properties like Content are writable)

In theory, WPF controls may be infinitely nested within any other WPF controls (one at a time)

Cb_1.InnerControl.Content = “Some Contents”;

Page 19: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Third Party Controls

Third party visual controls may now be used in a WYSIWYG fashion in design mode

Conditional code blocks are no longer required for interoperability

When placed on the painter, the IDE will trigger a process to create a proxy object for the control

The proxy will be analogous to traditional OLE/ActiveX interfaces to minimize your learning curve

Page 20: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

Layouts with Panels:

Canvas Grid WrapPanel StackPanel DockPanel

Page 21: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

Canvas:

Page 22: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

Grid:

Page 23: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

StackPanel:

Page 24: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

WrapPanel Variations:

Page 25: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

DockPanel:

Page 26: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

For the following controls, we may…

Create standard runtime controls

…or…

Support them though 3rd party controls (proxy objects)

…TBD

Page 27: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

Expander (collapsible GroupBox):

Page 28: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

Expander (collapsible GroupBox):

Page 29: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

MediaPlayer:

Built on top of Windows Media Player Formats:

WAV WMA MP3 Etc…

Page 30: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

Document Viewer (XPS or Print Preview):

Page 31: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

New Controls Courtesy of WPF

SpeechRecognizer:

Page 32: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Right-to-Left Support

FlowDirection Layout Property:

Page 33: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

Theme Support

Page 34: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

State of the DataWindow

New Features: From PowerBuilder 11.5

New background properties Support for PNG format Tooltips for all control and column types Rich Text Edit style

Support for 3rd party controls May be used with a data binding mechanism in the detail

band Must be consistent with the column’s data type

Expressions are not supported

Page 35: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

State of the DataWindow

New Features…

XML DataWindow syntax SRD syntax is still supported

Can run with limited security permissions New export formats

Excel 2007 XML paper specification (XPS)

Nested (and Composite) DataWindows Display in normal, not print preview mode

…cont’d…

Page 36: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

State of the DataWindow

New Features …(cont’d)… Grid style

Grid line color is a property Enablesort supports sorting the contents on a specific column

Label Displays in normal mode, not print preview mode

Managed DataSources in the new Data Source Interface

ADO .NET Web Services The classic data sources are still supported

The DataWindow will run as fully Managed Code

Page 37: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

DataWindow Painter (of the future)

In prototype

Page 38: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

State of the DataWindow

New Architecture:

Separation of Core functionality

DataWindow objects Presentation (rendering) functionality

DataWindow controls Data access

The new Data Source Interface

Page 39: WPF For PowerBuilder Developers. PowerBuilder PowerBuilder Evolving with.NET

PowerBuilder

WPF DataWindow Painter

WYSIWYG design surface for adding, moving, resizing, positioning of DataWindow elements

WYSIWYG Preview

Again, a familiar PowerBuilder experience

Support for 3rd party controls