Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Sujith Gokuladas
Infosys
Agenda Day - 1
• 2D & 3D Graphics
• Documents In WPF
• WPF Over The Web
• Microsoft SilverLight
• Overview of WCF, WF and CardSpace
• References
Microsoft .NET Framework 3.0
.NET At The Core
Windows Presentation Foundation
WPF Architecture
Windows Media
Foundation DirectX .NET Framework 2.0
Print Spooler
Illustrating the Problem
Advantages of WPF
Windows Forms/ Windows Media
Windows Forms PDF GDI+ Player Direct3D WPF
Graphical X X
interface,
e.g., forms
and
controls
On-screen X X
document
s
Fixed-format X X
document
s
Images X X
Video and audio X X
Two-dimensional X X
graphics
Three-dimensional X X
graphics
Extensible Application Markup Language (XAML)
Designer-Developer Productivity
• With XAML
Declarative designers
Programming &
through
developers
XAML can streamline
• their
Third Partycollaboration
Tools (e.g. Aurora by
Designers design Mobiform, ZAM 3D by ElectricDevelopers
Rain) add business logic
XAML
XAML C# VB.NET
<Button Width="100"> OK Button b1 = new Button(); Dim b1 As New Button
<Button.Background> b1.Content = "OK"; b1.Content = "OK"
LightBlue b1.Background = new b1.Background = New _
</Button.Background> SolidColorBrush(Colors.LightBlue); SolidColorBrush(Colors.LightBlue)
</Button> b1.Width = 100; b1.Width = 100
XAML Elements
• Root elements
• Windows and Page elements are the most common root elements
• Panel Elements
• These elements help you to lay out your user interface
• Control elements
• These elements define several types of controls in XAML and let you
put a control on your UI and customize it
• Geometric elements
• This kind of elements helps you to draw shapes and geometric
graphics on your UI
• Document elements
• Compare these elements with some HTML elements such as <p>,
<table> and <i>
The Root Element
• StackPanel
• Lays out your elements in a manner similar to a stack
• WrapPanel
• Positions child elements in sequential position from left to right,
breaking content to the next line at the edge of its containing box
• DockPanel
• Allows its child elements to be positioned along the edges of the panel
• Grid
• Allows positioning its children precisely on a grid using rows and
columns (Default Layout for VS2008)
• Canvas
• Allows a developer position its children freely anywhere within the
panel's boundaries
StackPanel
<Grid ShowGridLines="True">
<Grid.RowDefinitions>
<RowDefinition /><RowDefinition /><RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition /><ColumnDefinition /><ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox Background="Coral" Grid.Row="0" Margin="5" Grid.ColumnSpan="2">
Hello 1</TextBox>
<TextBox Background="Plum" Grid.Row="0" Grid.Column="2" Margin="5">Hello 2
</TextBox>
<TextBox Background="Aquamarine" Grid.Row="1" Grid.Column="0" Margin="5"
Grid.RowSpan="2">Hello 3</TextBox>
<TextBox Background="Teal" Grid.Row="1" Grid.Column="1" Margin="5">Hello 4
</TextBox>
<TextBox Background="LawnGreen" Grid.Row="2" Grid.Column="2"
Margin="5">Hello 5 </TextBox>
</Grid>
* Root element is ignored
Canvas
<Canvas>
<TextBox Background="Coral" Grid.Row="0" Grid.Column="0"
Canvas.Top="10" Canvas.Left="20">
Hello 1 </TextBox>
<TextBox Background="Plum" Grid.Row="0" Grid.Column="1"
Canvas.Bottom="60“ Canvas.Left="40">
Hello 2 </TextBox>
<TextBox Background="Aquamarine" Grid.Row="1" Grid.Column="0"
Canvas.Top="80" Canvas.Right="110">
Hello 3</TextBox>
<TextBox Background="Teal" Grid.Row="1" Grid.Column="1"
Canvas.Bottom="95" Canvas.Right="30">
Hello 4</TextBox>
</Canvas>
Styles and Templates
<Style x:Key="ButtonStyle">
<Setter Property="Control.Background" Value="Red"/>
<Setter Property="Control.FontSize" Value="16"/>
</Style>
3D Graphics
WPF support for 2D and 3D graphics, and imaging
ASMX .NET
Remoting
Interop Extensibility
with other Location
platforms transparency
Attribute- Message-
Based Oriented
Programming WS-* Programming
Protocol
Enterprise Support
System.Messaging
Services
WSE
• WCF extends the .NET Framework
• Services are built in Visual Studio
2005 using any .NET programming
language
Windows Workflow Foundation
Workflow
• www.netfx3.com
• www.windowsclient.net
• www.microsoft.com/silverlight
• www.microsoft.com/expression
• www.msdn.microsoft.com/netframework
References
• www.msdn2.microsoft.com/en-us/library/aa663364.aspx
• www.beta.channel9.msdn.com/Media/209137/?CommentID=
• www.msdn2.microsoft.com/en-us/library/aa480198.aspx
• www.msdn2.microsoft.com/en-us/library/aa480223.aspx
• www.weblogs.asp.net/scottgu/archive/tags/WPF/default.aspx
• www.msdn.microsoft.com/msdnmag/issues/07/08/WPF
Thank You…