developer day deep dive into winrt-controls: flipview, listview, gridview and semanticzoom thomas...

31
Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG [email protected]

Upload: lulu-schipper

Post on 06-Apr-2015

104 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Developer Day

Deep Dive into WinRT-Controls:FlipView, ListView, GridView and SemanticZoom

Thomas Claudius HuberPrincipal Consultant, Trivadis [email protected]

Page 2: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Thomas Claudius HuberPrincipal Consultant @Trivadis Application DevelopmentTraining

Technologien im Fokus:WPF / WinRT / Windows 8

Mag Fussball, Sport, Motorräder und geniesst die freie Zeit mit der Familie und Freunden.

Page 3: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Trivadis solution portfolio and competences

IT SOLUTIONS, SERVICES & PRODUCTS

TECHNOLOGIES Microsoft, Oracle, IBM, Open Source

Integration, Application Performance Management, Security

InfrastructureEngineering

Application Development

Business Intelligence

Business Integration Services

Training

Managed Services

Page 4: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Trivadis facts & figures11 Trivadis locations with more than 600 employees

Financially independent and sustainably profitable

Key figures 2011

Revenue CHF 104 / EUR 84 Mio.

Services for more than 800 clients in over 1,900 projects

200 Service Level Agreements

More than 4,000 training participants

Research and development budget: CHF 5.0 / EUR 4 Mio.

Page 5: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Agenda

Agenda

Grundlagen & die FlipView ListView, GridView &

SemanticZoom Inkrementelles Laden

Page 6: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Grundlagen

Page 7: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Grundlagen

Kapitel 2, “Das Programmiermodell“

Kapitel 12, “EigeneControls und Komponenten”

Control

ProgressBar ScrollBar Slider

PanelShape

TextBlock

Range Controls

ButtonBase

AppBarScrollViewerFrameSelectorItem

Button HyperlinkButtonRepeatButton

RangeBase(abstract)

CheckBox RadioButton

Content Controls ContentControl

Items Controls

RichEditBox Kapitel 5, “Layout”Kapitel 15, “2D Grafik”

Page

ToggleButton

UserControl

ComboBox ListBox

ListView GridView

ToolTip

PasswordBoxTextBox

RichTextBlock

Viewbox

ToggleSwitch

UIElement

DependencyObject

Object

Text Controls

Sonstige Elemente

Image

FileOpenPicker FileSavePicker

FolderPicker

Popups

MessageDialog

PopupMenu

ItemsControl

Selector

FlipView ListViewBase

FrameworkElementPopup

Pickers

Kapitel 13, “Dateien und Verzeichnisse”

MediaElememt

Kapitel 21, “Media”

WebView

Page 8: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Grundlagen

Selector

FlipView

ItemsControl

ListViewBase

GridViewListView

Control

SemanticZoom

Page 9: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

ItemsControl

Objekte werden entweder zur Items-Property hinzugefügt oder eine ganze Collection der ItemsSource-Property zugewiesen

Sind die Objekte vom Typ UIElement, werden sie dargestellt, ansonsten wird das Ergebnis der ToString-Methode in einem TextBlock angezeigt.

Es sei denn, die DisplayMemberPath-Property ist gesetzt Oder die ItemTemplate-Property enthält ein DataTemplate

Page 10: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Die FlipView

Stellt genau ein Element einer Collection dar

Erlaubt das Blättern durch die Collection Definiert selbst keine öffentlichen

MitgliederDemo

Page 11: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Agenda

Agenda

Grundlagen & die FlipView ListView, GridView &

SemanticZoom Inkrementelles Laden

Page 12: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Die ListView

Page 13: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Die ListView

Stellt eine Liste von Elementen dar Wird häufig in der Snapped-View

verwendet Unterstützt semantisches Zoomen und

gruppierte Daten

Demo

Page 14: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Die GridView

Page 15: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Die GridView

Stellt Elemente in einer Art Raster dar Das typische Design für Windows Store

Apps Unterstützt semantisches Zoomen und

gruppierte Daten

Demo

Page 16: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Daten gruppieren

Page 17: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Daten gruppieren - CollectionViews Das Interface ICollectionView bietet eine

«Ansicht» auf eine Collection Mit der CurrentItem-Property weiss es, welches Element selektiert ist. Mit Methoden wie MoveCurrentToNext lässt sich durch die Collection

navigieren

Die ICollectionView ist die Basis für gruppierte Daten

Die WinRT besitzt keine öffentliche Implementierung von ICollectionView

Page 18: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Daten gruppieren - CollectionViewSource CollectionViewSource-Klasse erlaubt das

Erstellen von CollectionViews Der Source-Property wird die Collection zugewiesen Die View-Property enthält die ICollectionView

Sind die Daten gruppiert, wird die IsSourceGrouped-Property auf true gesetzt.

Wird von der ListView & GridView unterstützt

Page 19: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Daten gruppieren

Gruppierte Daten in der ListView und GridView

Demo

Page 20: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Semantischer Zoom

Page 21: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Semantischer Zoom

Kein optischer Zoom, sondern ein Zoom aus Datensicht

SemanticZoom-Control besitzt dazu die Properties ZoomedInView und ZoomedOutView

Beide sind vom Typ ISemanticZoomInformation

ListView und GridView lassen sich in beiden Properties nutzen

Ihre Basisklasse ListViewBase implementiert ISemanticZoomInformation

Page 22: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Semantischer Zoom

Demo

Page 23: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

ListView, GridView & Co. in FriendStorage

Demo

Page 24: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Agenda

Agenda

Grundlagen & die FlipView ListView, GridView &

SemanticZoom Inkrementelles Laden

Page 25: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Inkrementelles Laden

Page 26: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

ISupportIncrementalLoading

Das Interface wird von einer Collection implementiert, die inkrementelles Laden unterstützt.

Definiert nur zwei Mitglieder: Die Property HasMoreItems Die Methode LoadMoreItemsAsync

Optimal um Daten vom Web (Cloud ) dynamisch nachzuladen

Page 27: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

ISupportIncrementalLoading

Demo

Page 28: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Agenda

Agenda

Grundlagen & die FlipView ListView, GridView &

SemanticZoom Inkrementelles Laden

Page 29: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Fazit

FlipView, ListView und GridView machen viel vom Windows 8 Style aus. Jeder App-Entwickler muss diese Controls kennen und beherrschen

Mit etwas Wissen über DataTemplates und CollectionViews lassen sich die Controls einfach nutzen

Inkrementelles Laden ist insbesondere beim Anbinden von Web-/Cloud-Diensten spannend.

Page 30: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

Am Trivadis Stand

Signed by

Thomas Huber

1. Preis

2. Preis

3. Preis

Wettbewerb

Page 31: Developer Day Deep Dive into WinRT-Controls: FlipView, ListView, GridView and SemanticZoom Thomas Claudius Huber Principal Consultant, Trivadis AG thomas.huber@trivadis.com

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a

commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a

commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Slides/Samples are on:

www.thomasclaudiushuber.com/talks.php

Twitter: @thomasclaudiushMail: [email protected]