Get your xaml on using powerbuilder s xaml editor
Download
1 / 59

Get your XAML on! : Using PowerBuilder’s XAML Editor - PowerPoint PPT Presentation


  • 274 Views
  • Uploaded on

Get your XAML on! : Using PowerBuilder’s XAML Editor. John Strano Technology Evangelist. A XAML Primer. Get your XAML on! : Using PowerBuilder’s XAML Editor. You do not need to learn XAML to use PowerBuilder .NET to develop WPF applications. XAML AND PowerBuilder .NET.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Get your XAML on! : Using PowerBuilder’s XAML Editor' - duncan


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Get your xaml on using powerbuilder s xaml editor

Get your XAML on! :Using PowerBuilder’s XAML Editor

John Strano

Technology Evangelist


A XAML Primer

Get your XAML on! :

Using PowerBuilder’s XAML Editor


You do not need to learn XAML to use PowerBuilder .NET to develop

WPF applications.

  • XAML AND PowerBuilder .NET


  • XAML AND PowerBuilder .NET


  • The Extensible Application Markup Language (XAML) optional knowledge to enable you to start down the road to taking full advantage of WPF.

    • Declarative

    • Formatted as XML

    • Markup that describes the GUI for WPF/Silverlight

    • Can declaratively specify behavior as well as look and feel

  • XAML Primer


  • XAML Primer


  • XAML Primer


  • XAML Primer


  • XAML primer

XAML as Declarative Programming


  • Since XAML is XML-based, it has “elements” “declarative” in that it has no procedural script.

    • Each element may have “attributes” which may be initialized with values

    • Each element in XAML represents a CLR class

    • An element does not need an identifier if it's not referred to in a script

  • XAML primer

Flavors of XAML Elements


  • Each element in XAML represents a CLR class “declarative” in that it has no procedural script.

    <Rectangle>

    <Rectangle.Effect>

    <BlurEffect/>

    </Rectangle.Effect>

    <Rectangle.OpacityMask>

    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

    <GradientStop Color="#00000000" Offset="0.30"/>

    <GradientStop Color="White" Offset="1"/>

    </LinearGradientBrush>

    </Rectangle.OpacityMask>

    </Rectangle>

  • XAML primer

Flavors of XAML Elements


  • XAML ELEMENT FLAVORS “declarative” in that it has no procedural script.

    • Root Elements

    • Panel Elements

    • Control Elements

    • Geometric Elements

  • XAML ELEMENT FLAVORS


  • Root Elements “declarative” in that it has no procedural script.

  • Window and Page are common root elements

  • For PowerBuilder .NET, “Window” and “UserObject” are the more common root elements

  • XAML ELEMENT FLAVORS

XAML Element Flavors


  • Root Elements “declarative” in that it has no procedural script.

  • The default namespace for WPF XAML files is…

    http://schemas.microsoft.com/winfx/2006/xaml/presentation

  • …and there is a secondary namespace…

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

  • …named or aliased as "x" and should be used for some declarations and classes that aren’t available in the default namespace.

  • XAML ELEMENT FLAVORS

XAML Element Flavors


  • Root Elements “declarative” in that it has no procedural script. (cont’d)

    • The PowerBuilder Control Namespace

      • Gives access to PowerBuilder subclasses of WPF base controls

        Sybase.PowerBuilder.WPF.Controls

  • XAML Primer

XAML Element Flavors


  • Root Elements “declarative” in that it has no procedural script. (cont’d)

    • The PowerBuilder Control Namespace

      • Gives access to PowerBuilder subclasses of WPF base controls

        Sybase.PowerBuilder.WPF.Controls

  • XAML Primer

XAML Element Flavors

<pbwpf:Windowx:Class="w_1"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:pbwpf="clr-namespace:Sybase.PowerBuilder.WPF.Controls;assembly=Sybase.PowerBuilder.WPF.Controls"

PBHeight="1640" PBWidth="1179" MinBox="True" MaxBox="True" ControlMenu="True" Uid="4" Height="410" Width="258" pbwpf:SkinManager.Skin=" ">

...

</pbwpf:Window>


  • XAML Primer

XAML Element Flavors


  • XAML Primer

XAML Element Flavors

  • <pbwpf:Window>

    • ...

    • xmlns:pbwpf="clr-namespace:Sybase.PowerBuilder.WPF.Controls;assembly=Sybase.PowerBuilder.WPF.Controls“

    • ...

    • <pbwpf:ListBox Margin="23”…

    • <pbwpf:CommandButton Height=…

    • <pbwpf:DataWindow Height=…

  • </pbwpf:Window>


  • Panel Elements “declarative” in that it has no procedural script.

  • Immediate parent to controls

    <Grid>

    </Grid>

  • Canvas

  • Grid

  • Stack Panel

  • Dock Panel

  • Wrap Panel

  • XAML Primer

XAML Element Flavors


  • Panel Elements “declarative” in that it has no procedural script.

  • Immediate parent to controls

    <Grid>

    </Grid>

  • Canvas

  • Grid

  • Stack Panel

  • Dock Panel

  • Wrap Panel

  • XAML Primer

XAML Element Flavors


  • Panel Elements “declarative” in that it has no procedural script.

  • Immediate parent to controls

    <Grid>

    </Grid>

  • Canvas

  • Grid

  • Stack Panel

  • Dock Panel

  • Wrap Panel

  • XAML Primer

XAML Element Flavors


  • Panel Elements “declarative” in that it has no procedural script.

  • Immediate parent to controls

    <Grid>

    </Grid>

  • Canvas

  • Grid

  • Stack Panel

  • Dock Panel

  • Wrap Panel

  • XAML Primer

XAML Element Flavors


  • Panel Elements “declarative” in that it has no procedural script.

  • Immediate parent to controls

    <Grid>

    </Grid>

  • Canvas

  • Grid

  • Stack Panel

  • Dock Panel

  • Wrap Panel

  • XAML Primer

XAML Element Flavors


  • Panel Elements “declarative” in that it has no procedural script.

  • Immediate parent to controls

    <Grid>

    </Grid>

  • Canvas

  • Grid

  • Stack Panel

  • Dock Panel

  • Wrap Panel

  • XAML Primer

XAML Element Flavors


  • XAML Primer

XAML Element Flavors


  • XAML Coding consideration:

  • Accelerator Characters


  • …cont’d… define the character that follows the underscore as an accelerator character for the control.

  • In XAML, the control label myCommandButton__1_x designates the character x as the accelerator for the control.

  • XAML Coding consideration:

  • Accelerator Characters


  • Geometric Elements define the character that follows the underscore as an accelerator character for the control.

    • Shapes, Lines

  • XAML Primer

XAML Element Flavors


  • Declared Resources


WPF/XAML have no concept of Visual Inheritance define the character that follows the underscore as an accelerator character for the control.

  • XAML Primer

No Visual Inheritance in WPF/XAML?


  • The powerbuilder .NET XAML Editor

  • Bringing Visual Inheritance to the XAML World


  • The powerbuilder .NET XAML Editor

  • Bringing Visual Inheritance to the XAML World


  • The powerbuilder .NET XAML Editor

  • Bringing Visual Inheritance to the XAML World


  • The powerbuilder .NET XAML Editor

  • Bringing Visual Inheritance to the XAML World

w_ancestor.srw.xaml

<pbwpf:Window x:Class="w_ancestor"

xmlns:pbwpf="clr-namespace:Sybase.PowerBuilder.WPF.Controls;assembly=Sybase.PowerBuilder.WPF.Controls"

…Uid="7">

<Grid>

<pbwpf:CommandButton Height="28" …Name="cb_1" TabOrder="10" Text="_Close" TextSize="-10" VerticalAlignment="Top" PBHeight="112" PBWidth="402" X="1883" Y="80" HorizontalAlignment="Right" Width="88" />

</Grid>

</pbwpf:Window>


  • The powerbuilder .NET XAML Editor

  • Bringing Visual Inheritance to the XAML World

w_descendant.srw.xaml

<pbwpf:Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:pbwpf="clr-namespace:Sybase.PowerBuilder.WPF.Controls;assembly=Sybase.PowerBuilder.WPF.Controls" x:Class="w_descendant" Uid="10">

<Grid>

<pbwpf:CommandButton Height="28" … Name="cb_2" …

<pbwpf:CommandButton Height="28" … Name="cb_3" …

</Grid>

</pbwpf:Window>


  • Split View Bar Inheritance in XAML/WPF

    • Use the split view bar to control the relative sizes of the Design View and XAML View.

  • The XAML Editor


  • The XAML Editor

The Split View Bar


  • The XAML Editor

The Split View Bar


  • The XAML Editor


  • Tag Navigator currently selected item in the markup and in the design view.

    • You can move to any parent tag of the currently selected tag in the XAML View by using the tag navigator.

    • When you hover over a tag in the tag navigator, a thumbnail preview is displayed for that element.

  • The XAML Editor


  • The xaml editor


  • Syntax Highlighting currently selected item in the markup and in the design view.

    • Increases ease of reading XAML

  • The xaml editor


  • Syntax Highlighting currently selected item in the markup and in the design view.

    • Colors can be changes in Preferences

  • The xaml editor


  • Document Outline View currently selected item in the markup and in the design view.

  • The Document Outline View provides a hierarchical view of the XAML document underlying a WPF window.

  • Preview, select, or delete the window’s XAML elements.

  • The xaml editor


  • Document Outline View currently selected item in the markup and in the design view.

  • Access the Document Outline View by opening the View menu and selecting Document Outline, or by pressing CTRL+ALT+T.

  • Replaces the Control List View from the native PowerBuilder Window Painter.

  • The xaml editor


  • Z Order currently selected item in the markup and in the design view.

  • Controls added last are “on top”

  • “Final” Z Order is determined by a control’s order in the XAML

  • To change the Z Order…

    • Manipulate the XAML

    • Use the Context Menu

  • The xaml editor


  • Outlining currently selected item in the markup and in the design view.

  • Portions of the markup can be collapsed to increase readability

  • The xaml editor


  • Outlining currently selected item in the markup and in the design view.

  • Portions of the markup can be collapsed to increase readability

  • The xaml editor


  • Auto-Formatting currently selected item in the markup and in the design view.

    • Block Indentation

  • The xaml editor


  • Auto-Formatting currently selected item in the markup and in the design view.

    • Block Indentation

  • The xaml editor


  • Auto-Formatting currently selected item in the markup and in the design view.

    • Auto-Indentation

  • The xaml editor


  • Auto-Formatting currently selected item in the markup and in the design view.

    • Brace Matching

  • The XAML EDITOR


  • Capturing Events of currently selected item in the markup and in the design view.

  • Non-Visual XAML-DECLARED Classes


  • Capturing Events of currently selected item in the markup and in the design view.

  • Non-Visual XAML-DECLARED Classes





DEMO currently selected item in the markup and in the design view.

John Strano

Technology Evangelist


THANK YOU currently selected item in the markup and in the design view.

John Strano

Technology Evangelist


ad