Windows Presentation Foundation Maximilian Knor Developer Evangelist Developer and Plattform Group Microsoft Österreich

Slides:



Advertisements
Similar presentations
Module 1: Creating an Application by Using Windows Presentation Foundation Overview of WPF Creating a Simple WPF Application Handling Events and Commands.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
The Microsoft Technical Roadshow 2006 Windows Presentation Foundation (WPF) Marcus Perryman
Introduction to Windows Presentation Foundation (WPF) Dr. Frank McCown COMP 445 – GUI Programming.
Data Binding in GUI Application Development Patrick O’Brien.
Dinko Jakovljević Microsoft Student Partner | BambooLab
Exploring Other FreeHand Features – Lesson 31 Exploring Other FreeHand Features Lesson 3.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Painter Application Introducing Graphics with Windows Presentation Foundation.
Michael Koester Designer Marketing Manager The World of Expression.
Windows Presetation Foundation (WPF) 1. Introduction.
1 Moderne GUI og Silverlight Windows Presentation Foundation.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Introduction & Welcome Marcus Perryman Mike Taulty
WPF 3rd Party Controls WPF = Windows Presentation Foundation
WinFX – A Lap Around the Windows Presentation Foundation Bart J.F. De Smet MVP Visual C#
WPF For PowerBuilder Developers
Web programmeringSilverlight NOEA / PQC 2007 Silverlight From: Gill Cleeren blog.n-technologies.be.
Doncho Minkov Telerik School Academy academy.telerik.com Technical Trainer
1 COS240 O-O Languages AUBG, COS dept Lecture 33 Building Apps Technologies C# (WPF part 1)
1 Introduction to WPFNoea / PQC Web Introduction to WPF Introduction to WPF Based on a Microsoft presentation.
A Jumpstart to WPF by Kevin Grossnicklaus ArchitectNow.
1 Intro XAML Attribute syntax & property syntax Panels Reusable resources Controls Data binding Steen Jensen, spring 2014.
V 1.1 Programming III. GUI APIs WPF Hello World Important UI elements UI elements / content models UI elements / inheritance.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University.
Windows Presentation Foundation Adam Calderon Principal Engineer Interknowlogy LLC
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
1 Metro Style Apps in C++ Karthick 8 th May 2012.
Basic WPF Controls Doncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer
LAYOUT CONTROLS. XAML Overview XAML : eXtensible Application Markup Language pronounced (ZAMEL) is a markup language used to design user interfaces XML-based.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
1 Introduction to WPFUCN / 2012 Introduction to WPF Introduction to WPF Based on a Microsoft presentation.
New Features Overview. Agenda Silverlight - Intro Silverlight 3 New Features Overview with Demos, Demos and Demos… RIA Services Overview Demos, Demos,
Adam Calderon – C# MVP Application Development Practice Lead Interknowlogy.
A Lap Around Windows Presentation Foundation. Why hasn’t UX taken off in software? It’s Difficult! Animation 2D 3D Documents Styled Controls Video Windows.
WPF – Windows Presentation Foundation what is it, what can you do with it and how do you get started.
Windows Presentation Foundation (WPF). Introduction Separates appearance of user interface from behavior Appearance usually specified by XAML Behavior.
C# kursus Rohde & Schwarz1 Moderne GUI Windows Presentation Foundation.
Chapter 3 ADOBE INDESIGN CS3 Chapter 3 SETTING UP A DOCUMENT.
Rujchai Ung-arunyawee Department of Computer Engineering Khon Kaen University.
Module 3 Designing and Developing a User Interface.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
© Copyright SELA software & Education Labs Ltd Baruch Hirsch St.Bnei Brak Israel
Module 4 Taking Control of the User Interface. Module Overview Sharing Logical Resources in an Application Creating Consistent User Interfaces by Using.
1 Välkommen till Sommarkollo Windows Presentation Foundation Per Östman ISV Developer Evangelist
.NET Framework 3.0 Windows Presentation Foundation Windows Communication Foundation Windows Workflow Foundation.
V 1.0 Programming III. Graphical possibilities Simple graphics (shapes)
V 1.0 Programming III. XAML Data Binding I.. V 1.0ÓE-NIK, 2014 XAML namespaces Namespaces define the allowed tags and attributes The one without the prefix.
Windows Presentation Foundation. User Experience: Recent Past Web HTML Sacrificed UX for portability, connectivity and simplicity 1997 – DHTML.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Windows Presentation Foundation Ruwan Wijesinghe.
Part of the Microsoft.NET Framework 3.0 Tomer Shamam.NET Technologies Expert Sela Group
Introduction to Avalon Mike Taulty Microsoft Ltd
Jeremy Boyd - Intergen MSDN Regional Director WinFX Managed APIs for Windows.
Introduction to Silverlight
Introducing WPF’s controls
Prashanth Vijayaraghavan
Windows Presentation Foundation Layout with Panels
Välkommen till Sommarkollo 2006
Introduction to Silverlight
XAML User Interface Creation in C#
WPF AKEEL AHMED.
INTRODUCTION TO ADOBE FLASH CS4
.NET and .NET Core 7. XAML Pan Wuming 2017.
Windows Presentation Foundation
11/27/2018 7:24 PM Тренинг Введение в разработку приложений на Windows Presentation Foundation Занятие 5 Элементы управления Роман Здебский
XAML Deep Dive for Windows & Windows Phone Apps Jump Start
04 | UI Presentation & XAML
Web Development Using ASP .NET
Windows Presentation Foundation
Presentation transcript:

Windows Presentation Foundation Maximilian Knor Developer Evangelist Developer and Plattform Group Microsoft Österreich

MSDN Briefings – Organisation Monthly technical briefings Currently released technology Your current needs Invitation / Registration / Feedback Well, what I am doing here?

Topics Windows Presentation Foundation Overview 2D Controls and Layout Styles, Templates & Resources Data Binding Animation Interop and Migration

Why WPF? Another UI Framework? Aren‘t these some classics App flickers on re-size Overlay controls and videos Themeing und styling What‘s the cause? Win32 has limits Graphics rendered by CPU

The WPF Approach Unify UI, Documents, Media Integrated development New Windows infrastructure Vector based graphics Use display hardware (D3D) Built-in UI patterns Designers and tools Bringing designers into the process Declarative programming models

.NET 3.0 Windows Presentation Foundation Windows Communication Foundation Windows Workflow Foundation Windows Card Space WPF User Experience WCF Unified Messaging WF Federated Workflow CS Federated Identity

WPF Programming Model Button b1 = new Button(); b1.Content = "OK"; b1.Background = new SolidColorBrush(Colors.LightBlue); b1.Width = new Length(100); OK HorizontalGradient= "White LtBlue" Dim b1 As New Button b1.Content = "OK" b1.Background = New SolidColorBrush(Colors.LightBlue) b1.Width = New Length(100) Separate UI and behavior Do you know ASP.NET Similar but more powerful XAML What, Not How! Creates object hierarchy

Designer Developer Developer Designer Collaboration

XAML Extensible Applications Markup Language

Properties as Attributes or Elements

Attached Properties

Markup Extensions

Topics Windows Presentation Foundation Overview 2D Controls and Layout Styles, Templates & Resources Data Binding Animation Interop and Migration

Shapes Elements of UI tree Just like controls and other elements Rectangle Ellipse Polyline Polygon Path

Demo 2D Shapes

Shapes Example

Shapes and Code Shapes accessible from code behind Just like any element Change appearance by setting properties Screen is automatically updated

Brushes Specifies how shape is filled Used for properties throughout WPF

Linear/RadialGradientBrush Fills across a range of colors Enables interesting visual effects

ImageBrush

Composability: DrawingBrush Fill with vector image Scalable

Composability: VisualBrush Fill with any UI element Makes certain design tricks easy Reflection of UI Use as 3D surface texture

OpacityMask Apply opacity to any visual using any Brush

Transformations Any element can be transformed Scaling, rotation, moving Optionally affects layout LayoutTransform RenderTransform Included into hit testing

Hit Testing Built in for all drawing elements Takes transformations into account Bubbling event model

Demo Transformations

Topics Windows Presentation Foundation Overview 2D Controls and Layout Styles, Templates & Resources Data Binding Animation Interop and Migration

Class Hierarchy

Dependency Property

Layout Controls StackPanel WrapPanel Canvas DockPanel Grid...

WPF Positioning Absolute Positioning X / Y, Width / Height Relative Positioning NO X/Y, Width/Height Margin Alignment

WPF Positioning - Alignment HorizontalAlignment Stretch, Left, Right, Center VerticalAlignment Stretch, Top, Center, Bottom

Simple Controls PasswordBox ScrollBar ProgressBar Slider TextBox RichTextBox...

Content Controls Button RepeatButton ToggleButton CheckBox RadioButton Label Frame ListBoxItem StatusBarItem ScollBarViewer ToolTip UserControl Window NavigationWindow...

Demo Controls

Events Routed Event Handling Routing Strategy Tunneling, Bubbling, Direct

Events Create Routed Events

Events Event notation PreviewXxx – Tunnelled Xxx - Bubbled Base Class RoutedEventArgs Attached Events

Demo Routed Event Handling

Headered Content Controls Content Control with additional header Expander MenuItem GroupBox TabItem Usw.

Items Controls Container for multiple items (list) ListBox ComboBox Menu ContextMenu StatusBar TreeView TabControl Usw.

Commands Controls define a command CommandBindings define the handler

Demo TabControl, Listbox, Toolbar, Commands

Topics Windows Presentation Foundation Overview 2D Controls and Layout Styles, Templates & Resources Data Binding Animation Interop and Migration

Designer Developer

Skeleton Prototype & Experiment Feedback from Customers Final Product Design Development Process Styling & Templates

Styles are about setting properties…

Setting Properties Trigger Animations Template Styles

Lookless Controls and Templates Control implies behaviour Probably supplies default look Designer free to supply new look

Styling and Resources Style rarely defined inline Tend to be reused for consistency Usually defined as resources

Resource Dictionaries Simple Key, Value collection FrameworkElement.Resources

Resource Hierarchy System Resources Application Resources Element Resources Element Resources Element Resources Window/Page Resources Window/Page Resources Element Resources Application Resources

Application Resources Styles and templates Shared graphics

Page/Window Resources Utility elements Data sources Converters Page-specific templates

Element-Specific Resources Locally-scoped Styles and templates

Automatic Styles/Templates Most resources must use x:Key Optional with Styles and Data Templates Can use TargetType or DataType instead Applied to target automatically – no reference required

Demo Styles

System Resources SystemColors – Colors and Brushes SystemFonts SystemParameters (sizes, settings)

Resources and Code-Behind FindResource SetResourceReference Change resource value with indexer someElem.Resources["foo"] = bar; Initializing from code-behind not so good Must set before referencing XAML loaded OK for app resources, less good otherwise