SlideShare uma empresa Scribd logo
1 de 56
Baixar para ler offline
Designing XAML Apps
using Blend for Visual
Studio 2013
Fons Sonnemans
@fonssonnemans
Topics
 Blend
 Layout Controls
 Basic Controls
 AppBar & CommandBar
 Animation
 Behaviors
 Styling & Templating
 Data Binding
Fons Sonnemans
•Software Development Consultant
• Programming Languages
• Clipper, Smalltalk, Visual Basic, C#
• Platforms
• Windows Forms, ASP.NET (Web Forms, MVC), XAML
(Silverlight, Windows Phone, Windows 8)
• Databases
• MS SQL Server, Oracle
• Role
• Trainer, Coach, Advisor, Architect, Designer, App Developer
•More info: www.reflectionit.nl
My Apps
Windows 8
Windows Phone
http://reflectionit.nl/apps
Device Window
Visual Studio versus Blend
Visual Studio
• Code Editing
• XAML Editing
• IntelliSense
• Formatting (Ctrl+E, D)
• Code Snippets (new in VS2013)
• Debugging
• Project Properties
• TFS Explorer
• Data Binding
• IntelliSense
• including Path (new in VS2013)
• Set Build Actions
Blend
• UI Design
• Guides
• Animations
• Styling & Templating
• Visual States
• Data Binding
• TFS Check in/out
In-Box Controls
Button
Checkbox Radio Button
Hyperlink Combo Box
Context Menu Flyout
List BoxFlip View
App Bar
Panning Indicator
Grid View
List View Semantic Zoom
Text Box
Progress Ring Progress Bar
Clear ButtonSpell Checking
Password Reveal Button
Rating Radio Button
Scroll Bar
Toggle Switch Tooltip
<Layout Controls />
Layout Controls
 Canvas
 Simplest, placement relative to two edges
 Not scalable
 Supports the following attached properties
 Canvas.Top, Canvas.Left, Canvas.Zindex
 StackPanel
 Horizontal or vertical stacking
 Grid
 Uses rows and columns
 Flexible Positioning (similar to tables in HTML)
 Supports the following attached properties
 Grid.Column, Grid.Row, Grid.Columnspan, Grid.Rowspan
 More
 Border, ScrollViewer, Viewbox, VariableSizedWrapGrid
Canvas
 Is a Drawing Surface
 Children have fixed positions relative to top-left-corner
<Canvas Width="250" Height="200" Background="Gray">
<Rectangle Canvas.Top="25" Canvas.Left="25"
Width="200" Height="150" Fill="Yellow" />
</Canvas>
The Canvas
The Rectangle
XAML - Attached Properties
 Top & Left properties only make sense inside a
Canvas
<Canvas Width="250" Height="200" Background="Gray">
<Rectangle Canvas.Top="25" Canvas.Left="25"
Width="200" Height="150" Fill="Yellow" />
</Canvas>
XAML - Attached Properties
=
<Rectangle Canvas.Top="25" Canvas.Left="25"/>
Rectangle rectangle = new Rectangle();
rectangle.SetValue(Canvas.TopProperty, 25);
rectangle.SetValue(Canvas.LeftProperty, 25);
=
Rectangle rectangle = new Rectangle();
Canvas.SetTop(rectangle, 25);
Canvas.SetLeft(rectangle, 25);
XAML - Syntax
 XAML is Case-Sensitive
 Attribute Syntax
 Property Element Syntax (<TypeName.Property>)
<Button Background="Blue" Foreground="Red"
Content="This is a button"/>
<Button>
<Button.Background>
<SolidColorBrush Color="Blue"/>
</Button.Background>
<Button.Foreground>
<SolidColorBrush Color="Red"/>
</Button.Foreground>
<Button.Content>
This is a button
</Button.Content>
</Button>
http://msdn.microsoft.com/en-us/library/cc189036(VS.95).aspx
StackPanel
 The StackPanel will place its children in either a
column (default) or row. This is controlled by the
Orientation property.
<StackPanel Orientation="Vertical">
<Button Content="Button" />
<Button Content="Button" />
</StackPanel>
Nested Stackpanels
<StackPanel HorizontalAlignment="Center"
VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
<TextBlock Text="Username" FontSize="48" Width="240"
TextAlignment="Right" Margin="0,0,20,0"/>
<TextBox FontSize="48" Width="300"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
<TextBlock Text="Password" Margin="0,0,20,0" FontSize="48"
Width="240" TextAlignment="Right"/>
<PasswordBox Margin="0" FontSize="48" Width="300"/>
</StackPanel>
<Button Content="Login" HorizontalAlignment="Left"
Margin="257,0,0,0" FontSize="48"/>
</StackPanel>
Grid
 The Grid is a powerful layout container.
 It acts as a placeholder for visual elements
 You specify the rows and columns, and those define the cells.
 The placement of an element in the Grid is specified using attached properties that are
set on the children of the Grid:
 Supports different types of row and column sizes in one Grid:
 Pixel size: Fixed value in pixels
 Auto size: The cell has the size of it’s contents
 Star size: whatever space is left over from fixed- and auto-sized columns is allocated to
all of the columns with star-sizing
<Image Grid.Column="3" Source="demo.png" Stretch="None"/>
Layout Properties
<Basic Controls />
TextBox
 Normal
 Multi Line
 Border & Colors
<TextBox Text="Hello World" TabIndex="4" />
<TextBox Text="Hello World" Height="200"
AcceptsReturn="True" />
<TextBox Text="Hello World"
BorderThickness="3"
BorderBrush="Black"
SelectionHighlightColor="Blue"
Background="LightGray" />
TextBox
 No Clear Button (“Blend default”)
 InputScope
<TextBox Text="Hello World"
TextWrapping="Wrap" />
<TextBox InputScope="Search" />
Image
 Supports BMP, JPG, TIF and PNG
 Source property
 External, starts with ‘http://’
 App
 Referenced Class Library
 Local storage
<Image Source="http://www.server.com/Images/Windows8.png" />
<Image Source="/MyImages/Windows8.png" />
<Image Source="ms-appx:///ClassLibrary1/MyImages/Windows8.jpg" />
<Image Source="ms-appdata:///local/MyFolder/Windows8.jpg" />
<AppBar vs
CommandBar />
AppBarButton, AppBarToggleButton,
AppBarSeparator
AppBar CommandBar
 Properties
 Foreground
 Background
 IsSticky
 IsOpen
 Children
 Events
 Opened
 Closed
 Properties
 Foreground
 Background
 IsSticky
 IsOpen
 PrimaryCommands
 SecondaryCommands
 Events
 Opened
 Closed
AppBarButtons
• Windows 8.1 introduces new controls for XAML that let you
more easily create app bar command buttons that reflect the
proper design guidelines and behaviors: the AppBarButton,
AppBarToggleButton, and AppBarSeparator controls.
• App bar buttons differ from standard buttons in several ways:
• Their default appearance is a circle instead of a rectangle.
• You use the Label and Icon properties to set the content instead of the
Content property. The Content property is ignored.
• The button's IsCompact property controls its size.
AppBarButtons
• FontIcon
• The icon is based on a
glyph from the specified
font family.
• BitmapIcon
• The icon is based on a
bitmap image file with
the specified Uri.
• PathIcon
• The icon is based on
Path data.
• SymbolIcon
• The icon is based on a
predefined list of glyphs
from the Segoe UI
Symbol font.
AppBarButtons Links
• Images & Paths (Vectors)
• http://modernuiicons.com
• http://thenounproject.com
• http://www.thexamlproject.com
• http://www.syncfusion.com/downloads/metrostudio
• Symbols
• http://msdn.microsoft.com/en-us/library/windows/apps/jj841126.aspx
• http://www.geekchamp.com/icon-explorer/introduction
• http://www.fontello.com/
• http://fontastic.me
<Resources />
Resources
 Reusable objects such as data, styles and templates.
 Assigned a unique key (x:Key) so you can reference
to it.
 Every element has a Resources property.
 Nesting Support
 All static resources are loaded on page load
 Resource is loaded even if not used
31
Convert to New Resource…
Resources in Blend
 Menu Window - Resources
 Shows all resources of all open XAML documents
 Link to Resource Dictionary
 Edit Resource
 Rename Resource
 Move Resource
 Delete Resource
 Apply Resource by Drag & Drop
33
Merged Resources
 Store resources in external files
 Declare once, use many times
 Makes XAML shorter and easier to read
 Can be stored in external assemblies
34
<Animations &
Storyboards />
Key Frame Concept
 XAML supports key frames
 A key frame defines an objects target value on a
moment in an animation.
 A key frame has an interpolation method.
 A Key Frame target can be a:
 Double (X, Y, Height, Width, Opacity, Angle, etc.)
 Color (Fill, Stroke, etc.)
 Object (Visibility, Text, etc)
Storyboards
 Creating a storyboard in Expression Blend
37
Storyboards
 The Storyboard object has interactive methods to
Begin, Pause, Resume, and Stop an animation.
public void ButtonStart_Click(object sender, MouseEventArgs e) {
if (myStoryboard.GetCurrentState() == ClockState.Stopped) {
myStoryboard.Begin();
}
}
public void ButtonPause_Click(object sender, MouseEventArgs e) {
myStoryboard.Pause();
}
public void ButtonResume_Click(object sender, MouseEventArgs e) {
myStoryboard.Resume();
}
public void ButtonStop_Click(object sender, MouseEventArgs e) {
myStoryboard.Stop();
}
<Behaviors />
Behaviors
ShowMessageBox Action
public class ShowMessageAction : DependencyObject, IAction {
#region Text Dependency Property
public string Text {
get { return (string)GetValue(TextProperty); }
set { SetValue(TextProperty, value); }
}
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text",
typeof(string),
typeof(ShowMessageAction),
new PropertyMetadata(string.Empty));
#endregion Text Dependency Property
public object Execute(object sender, object parameter) {
#pragma warning disable 4014
new MessageDialog(this.Text).ShowAsync();
#pragma warning restore
return null;
}
}
Links:
• http://reflectionit.nl/Blog/2013/windows-8-xaml-tips-creating-blend-behaviors
• http://blendbehaviors.net/
<Styling and
Templating />
Styling and Templating
 XAML = UI flexibility
 Customize the look of an application without
changing it’s behavior
 Styling = Small Visual Changes on an Element (Font, Background Color, etc.)
 Templating = Replacing Element’s entire Visual Tree
Styling
<Page.Resources>
<Style x:Key="HollandButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#FFFF9E00"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="FontStyle" Value="Italic"/>
</Style>
</Page.Resources>
<Grid>
<Button Content="Button"
Style="{StaticResource HollandButtonStyle}"/>
</Grid>
Implicit Styling
 If you omit the Style’s Key and specify only the
TargetType, then the Style is automatically applied
to all elements of that target type within the same
scope (it is implicitly applied).
 This is typically called a typed style as opposed to a
named style.
<Style TargetType="TextBox">
<Setter Property="FontFamily" Value="Arial Black"/>
<Setter Property="FontSize" Value="16"/>
</Style>
BasedOn Styling
<Page.Resources>
<Style x:Key="HollandButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#FFFF9E00"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="FontStyle" Value="Italic"/>
</Style>
<Style x:Key="GermanButtonStyle"
TargetType="Button"
BasedOn="{StaticResource HollandButtonStyle}">
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="Black"/>
</Style>
</Page.Resources>
<Grid >
<Button Content="Button"
Style="{StaticResource GermanButtonStyle}"/>
<Button Content="Button"
Style="{StaticResource HollandButtonStyle}"/>
</Grid>
Templating
Data Binding
Data Binding
 Data binding is the process that establishes a connection, or
binding, between the UI and the business object which allows data
to flow between the two
 Enable clean view/model separation and binding
 Change UI presentation without code-behind modifications
 Every binding has a source and a target
 Source is the business object or another UI element
 Target is the UI element
 Binding Expressions can be one way or two way and supports
validation & converters
Element to Element Binding
 Element binding is performed in the same manner as
Data Binding with one addition: the ElementName
property. ElementName defines the name of the
binding source element.
<Grid>
<TextBlock Text="{Binding Value, ElementName=mySlider}"
FontSize="32"/>
<Slider x:Name="mySlider" Maximum="10" Value="6" />
</Grid>
Data Window – Sample Data
Recap & Questions
@fonssonnemans
fons.sonnemans@reflectionit.nl
fonssonnemans
reflectionit.nl/blog
Laat ons weten wat u vindt van deze sessie! Vul de
evaluatie in via www.techdaysapp.nl en maak kans op een
van de 20 prijzen*. Prijswinnaars worden bekend gemaakt
via Twitter (#TechDaysNL). Gebruik hiervoor de code op uw
badge.
Let us know how you feel about this session! Give your
feedback via www.techdaysapp.nl and possibly win one of
the 20 prizes*. Winners will be announced via Twitter
(#TechDaysNL). Use your personal code on your badge.
Related sessions 16-4
Slot Title Speaker
07:45 Using native code in your Windows and Windows Phone Applications Maarten Struys
07:45 Bluetooth and NFC phone to phone communication Rob Miles
10:50 What is new in XAML and tooling in Windows 8.1 Fons Sonnemans
10:50 Tiles, Notificaties en het Actiecentrum in Windows Phone 8.1 apps Rajen Kishna
10:50 Sites and Apps, hoe maak ik ze accessible Dennis Vroegop & Jeroen Hulscher
13:15 Windows and Windows Phone – Build Apps for Both Mike Taulty
13:15 Optimizing Windows Store apps for varying form factors, resolutions and viewstates Tom Verhoeff
14:50 Talking to hardware with Windows Phone Rob Miles
14:50 Crossplatform development using Mapping data and features Joost van Schaik
16:20 Building Windows Store and Windows Phone XAML apps Harikrishna Ajithkumar Menon
16:20 Lap Around Windows Phone 8.1 voor de enterprise developer Matthijs Hoekstra
16:20 Making money with Apps Fons Sonnemans
16:20 Van één app honderd apps maken? Tom Droste
16:20 Lap around Windows Phone 8.1: Introduction to the new developer platform Andy Wigley
17:45 App Analytics voor Windows Phone en Windows Store Mark Monster
17:45 Je hebt een app. Nu alleen nog verkopen! Dennis Vroegop
Related sessions 17-4
Slot Title Speaker
07:45 Modern Apps for the Enterprise Dennis Mulder
09:15 Diagnosing performance issues in Xaml based Windows Phone and Windows Store Apps with Visual
Studio 2013
Harikrishna Ajithkumar Menon
09:15 Designing XAML Apps using blend for Visual Studio 2013 Fons Sonnemans
09:15 Building Windows Store apps for Windows Phone 8.1 Andy Wigley
09:15 Jouw apps op alle schermen en resoluties Martin Tirion
09:15 Combineer Windows, Windows Phone en SharePoint apps voor succesvolle enterprise oplossingen Dave Smits
10:50 Hergebruik van JavaScriptkennis bij het bouwen van Windows Store apps Timmy Kokke
10:50 Making the most from Windows Phone App Studio Tom Verhoeff
13:15 Creating games for Windows 8 and Windows Phone 8 with monogame Rob Miles
13:15 A Lap Around the PRISM Framework for Windows 8 Store Apps Mike Taulty
14:50 Bouwen en distribueren van je Enterprise apps voor Windows Phone 8.1 Matthijs Hoekstra
14:50 Zoeken in Windows en in jouw app Martin Tirion
14:50 Succesvol Enterprise apps aanbieden via de Windows en Office Store Dave Smits
16:20 Networking, Mobile Services and Authentication on Windows Phone 8.1 Andy Wigley
16:20 TypeScript en Windows Store apps Timmy Kokke
Designing XAML apps using Blend for Visual Studio 2013

Mais conteúdo relacionado

Mais procurados

Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1Dennis Perlot
 
Windows 8 app bar and live tiles
Windows 8 app bar and live tilesWindows 8 app bar and live tiles
Windows 8 app bar and live tilesAmr Abulnaga
 
Building your first iOS app using Xamarin
Building your first iOS app using XamarinBuilding your first iOS app using Xamarin
Building your first iOS app using XamarinGill Cleeren
 
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)Abdul Rafay
 
Oracle application express
Oracle application expressOracle application express
Oracle application expressAbhinaw Kumar
 
Building your first android app using Xamarin
Building your first android app using XamarinBuilding your first android app using Xamarin
Building your first android app using XamarinGill Cleeren
 
02 getting started building windows runtime apps
02   getting started building windows runtime apps02   getting started building windows runtime apps
02 getting started building windows runtime appsWindowsPhoneRocks
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express pptAbhinaw Kumar
 
SPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add insSPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add insNCCOMMS
 
Designing well known websites with ADF Rich Faces
Designing well known websites with ADF Rich FacesDesigning well known websites with ADF Rich Faces
Designing well known websites with ADF Rich Facesmaikorocha
 
Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....
Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....
Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....Javier Suárez Ruiz
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint DevelopmentChakkaradeep Chandran
 
Windows phone app development overview
Windows phone app development overviewWindows phone app development overview
Windows phone app development overviewAlan Mendelevich
 
SharePoint and the User Interface with JavaScript
SharePoint and the User Interface with JavaScriptSharePoint and the User Interface with JavaScript
SharePoint and the User Interface with JavaScriptRegroove
 
Grasping The LightSwitch Paradigm
Grasping The LightSwitch ParadigmGrasping The LightSwitch Paradigm
Grasping The LightSwitch ParadigmAndrew Brust
 
What's new in Xamarin.Forms
What's new in Xamarin.FormsWhat's new in Xamarin.Forms
What's new in Xamarin.FormsRui Marinho
 

Mais procurados (20)

Hello windows 10
Hello windows 10Hello windows 10
Hello windows 10
 
Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1Building appsinsilverlight4 part_1
Building appsinsilverlight4 part_1
 
Windows 8 app bar and live tiles
Windows 8 app bar and live tilesWindows 8 app bar and live tiles
Windows 8 app bar and live tiles
 
Building your first iOS app using Xamarin
Building your first iOS app using XamarinBuilding your first iOS app using Xamarin
Building your first iOS app using Xamarin
 
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)
 
Intro to Application Express
Intro to Application ExpressIntro to Application Express
Intro to Application Express
 
Oracle application express
Oracle application expressOracle application express
Oracle application express
 
Building your first android app using Xamarin
Building your first android app using XamarinBuilding your first android app using Xamarin
Building your first android app using Xamarin
 
02 getting started building windows runtime apps
02   getting started building windows runtime apps02   getting started building windows runtime apps
02 getting started building windows runtime apps
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
 
SPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add insSPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add ins
 
Designing well known websites with ADF Rich Faces
Designing well known websites with ADF Rich FacesDesigning well known websites with ADF Rich Faces
Designing well known websites with ADF Rich Faces
 
Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....
Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....
Monkey Conf 2020: Xamarin Community Toolkit: More possibilities with Xamarin....
 
Apps in a Flash HCI
Apps in a Flash HCIApps in a Flash HCI
Apps in a Flash HCI
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint Development
 
Windows phone app development overview
Windows phone app development overviewWindows phone app development overview
Windows phone app development overview
 
SharePoint and the User Interface with JavaScript
SharePoint and the User Interface with JavaScriptSharePoint and the User Interface with JavaScript
SharePoint and the User Interface with JavaScript
 
Intro to Xamarin
Intro to XamarinIntro to Xamarin
Intro to Xamarin
 
Grasping The LightSwitch Paradigm
Grasping The LightSwitch ParadigmGrasping The LightSwitch Paradigm
Grasping The LightSwitch Paradigm
 
What's new in Xamarin.Forms
What's new in Xamarin.FormsWhat's new in Xamarin.Forms
What's new in Xamarin.Forms
 

Semelhante a Designing XAML apps using Blend for Visual Studio 2013

Silverlight 2 For Developers
Silverlight 2 For DevelopersSilverlight 2 For Developers
Silverlight 2 For DevelopersMithun T. Dhar
 
05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & AnimationNguyen Tuan
 
Silverlight week2
Silverlight week2Silverlight week2
Silverlight week2iedotnetug
 
Introduction to Silverlight for Windows Phone
Introduction to Silverlight for Windows PhoneIntroduction to Silverlight for Windows Phone
Introduction to Silverlight for Windows PhoneDave Bost
 
follow-app BOOTCAMP 2: Introduction to silverlight
follow-app BOOTCAMP 2: Introduction to silverlightfollow-app BOOTCAMP 2: Introduction to silverlight
follow-app BOOTCAMP 2: Introduction to silverlightQIRIS
 
What's new in Xamarin.Forms?
What's new in Xamarin.Forms?What's new in Xamarin.Forms?
What's new in Xamarin.Forms?James Montemagno
 
Introduction to Silverlight
Introduction to SilverlightIntroduction to Silverlight
Introduction to SilverlightEd Donahue
 
Unique features of windows 8
Unique features of windows 8Unique features of windows 8
Unique features of windows 8FITC
 
Overview of WPF in light of Ribbon UI Control
Overview of WPF in light of Ribbon UI ControlOverview of WPF in light of Ribbon UI Control
Overview of WPF in light of Ribbon UI ControlAbhishek Sur
 
02 wp7 building silverlight applications
02 wp7   building silverlight applications02 wp7   building silverlight applications
02 wp7 building silverlight applicationsTao Wang
 
Presentation wpf
Presentation wpfPresentation wpf
Presentation wpfdanishrafiq
 
Building Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdfBuilding Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdfSivarajAmbat1
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Thinkful
 
Windows phone 8 session 3
Windows phone 8 session 3Windows phone 8 session 3
Windows phone 8 session 3hitesh chothani
 
Optimizing Flex Applications
Optimizing Flex ApplicationsOptimizing Flex Applications
Optimizing Flex Applicationsdcoletta
 
WPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF applicationWPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF applicationTamir Khason
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex senthil0809
 

Semelhante a Designing XAML apps using Blend for Visual Studio 2013 (20)

XAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko JakovljevićXAML and WPF - Dinko Jakovljević
XAML and WPF - Dinko Jakovljević
 
Session 5#
Session 5#Session 5#
Session 5#
 
Silverlight 2 For Developers
Silverlight 2 For DevelopersSilverlight 2 For Developers
Silverlight 2 For Developers
 
05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation05.Blend Expression, Transformation & Animation
05.Blend Expression, Transformation & Animation
 
Silverlight week2
Silverlight week2Silverlight week2
Silverlight week2
 
Introduction to Silverlight for Windows Phone
Introduction to Silverlight for Windows PhoneIntroduction to Silverlight for Windows Phone
Introduction to Silverlight for Windows Phone
 
WPF - An introduction
WPF - An introductionWPF - An introduction
WPF - An introduction
 
follow-app BOOTCAMP 2: Introduction to silverlight
follow-app BOOTCAMP 2: Introduction to silverlightfollow-app BOOTCAMP 2: Introduction to silverlight
follow-app BOOTCAMP 2: Introduction to silverlight
 
What's new in Xamarin.Forms?
What's new in Xamarin.Forms?What's new in Xamarin.Forms?
What's new in Xamarin.Forms?
 
Introduction to Silverlight
Introduction to SilverlightIntroduction to Silverlight
Introduction to Silverlight
 
Unique features of windows 8
Unique features of windows 8Unique features of windows 8
Unique features of windows 8
 
Overview of WPF in light of Ribbon UI Control
Overview of WPF in light of Ribbon UI ControlOverview of WPF in light of Ribbon UI Control
Overview of WPF in light of Ribbon UI Control
 
02 wp7 building silverlight applications
02 wp7   building silverlight applications02 wp7   building silverlight applications
02 wp7 building silverlight applications
 
Presentation wpf
Presentation wpfPresentation wpf
Presentation wpf
 
Building Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdfBuilding Accessible Apps using NET MAUI.pdf
Building Accessible Apps using NET MAUI.pdf
 
Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)Build a game with javascript (may 21 atlanta)
Build a game with javascript (may 21 atlanta)
 
Windows phone 8 session 3
Windows phone 8 session 3Windows phone 8 session 3
Windows phone 8 session 3
 
Optimizing Flex Applications
Optimizing Flex ApplicationsOptimizing Flex Applications
Optimizing Flex Applications
 
WPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF applicationWPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF application
 
Exploring Adobe Flex
Exploring Adobe Flex Exploring Adobe Flex
Exploring Adobe Flex
 

Mais de Fons Sonnemans

Writing High Peformance C# 7 Code
Writing High Peformance C# 7 CodeWriting High Peformance C# 7 Code
Writing High Peformance C# 7 CodeFons Sonnemans
 
Coding for kids - TechDays 2017
Coding for kids - TechDays 2017Coding for kids - TechDays 2017
Coding for kids - TechDays 2017Fons Sonnemans
 
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...Fons Sonnemans
 
Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015Fons Sonnemans
 
Making money with apps
Making money with appsMaking money with apps
Making money with appsFons Sonnemans
 

Mais de Fons Sonnemans (6)

Xamarin Froms 4.x
Xamarin Froms 4.xXamarin Froms 4.x
Xamarin Froms 4.x
 
Writing High Peformance C# 7 Code
Writing High Peformance C# 7 CodeWriting High Peformance C# 7 Code
Writing High Peformance C# 7 Code
 
Coding for kids - TechDays 2017
Coding for kids - TechDays 2017Coding for kids - TechDays 2017
Coding for kids - TechDays 2017
 
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
TechDays 2016 - Developing websites using asp.net core mvc6 and entity framew...
 
Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015
 
Making money with apps
Making money with appsMaking money with apps
Making money with apps
 

Último

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Designing XAML apps using Blend for Visual Studio 2013

  • 1.
  • 2. Designing XAML Apps using Blend for Visual Studio 2013 Fons Sonnemans @fonssonnemans
  • 3. Topics  Blend  Layout Controls  Basic Controls  AppBar & CommandBar  Animation  Behaviors  Styling & Templating  Data Binding
  • 4. Fons Sonnemans •Software Development Consultant • Programming Languages • Clipper, Smalltalk, Visual Basic, C# • Platforms • Windows Forms, ASP.NET (Web Forms, MVC), XAML (Silverlight, Windows Phone, Windows 8) • Databases • MS SQL Server, Oracle • Role • Trainer, Coach, Advisor, Architect, Designer, App Developer •More info: www.reflectionit.nl
  • 5. My Apps Windows 8 Windows Phone http://reflectionit.nl/apps
  • 7. Visual Studio versus Blend Visual Studio • Code Editing • XAML Editing • IntelliSense • Formatting (Ctrl+E, D) • Code Snippets (new in VS2013) • Debugging • Project Properties • TFS Explorer • Data Binding • IntelliSense • including Path (new in VS2013) • Set Build Actions Blend • UI Design • Guides • Animations • Styling & Templating • Visual States • Data Binding • TFS Check in/out
  • 8. In-Box Controls Button Checkbox Radio Button Hyperlink Combo Box Context Menu Flyout List BoxFlip View App Bar Panning Indicator Grid View List View Semantic Zoom Text Box Progress Ring Progress Bar Clear ButtonSpell Checking Password Reveal Button Rating Radio Button Scroll Bar Toggle Switch Tooltip
  • 10. Layout Controls  Canvas  Simplest, placement relative to two edges  Not scalable  Supports the following attached properties  Canvas.Top, Canvas.Left, Canvas.Zindex  StackPanel  Horizontal or vertical stacking  Grid  Uses rows and columns  Flexible Positioning (similar to tables in HTML)  Supports the following attached properties  Grid.Column, Grid.Row, Grid.Columnspan, Grid.Rowspan  More  Border, ScrollViewer, Viewbox, VariableSizedWrapGrid
  • 11. Canvas  Is a Drawing Surface  Children have fixed positions relative to top-left-corner <Canvas Width="250" Height="200" Background="Gray"> <Rectangle Canvas.Top="25" Canvas.Left="25" Width="200" Height="150" Fill="Yellow" /> </Canvas> The Canvas The Rectangle
  • 12. XAML - Attached Properties  Top & Left properties only make sense inside a Canvas <Canvas Width="250" Height="200" Background="Gray"> <Rectangle Canvas.Top="25" Canvas.Left="25" Width="200" Height="150" Fill="Yellow" /> </Canvas>
  • 13. XAML - Attached Properties = <Rectangle Canvas.Top="25" Canvas.Left="25"/> Rectangle rectangle = new Rectangle(); rectangle.SetValue(Canvas.TopProperty, 25); rectangle.SetValue(Canvas.LeftProperty, 25); = Rectangle rectangle = new Rectangle(); Canvas.SetTop(rectangle, 25); Canvas.SetLeft(rectangle, 25);
  • 14. XAML - Syntax  XAML is Case-Sensitive  Attribute Syntax  Property Element Syntax (<TypeName.Property>) <Button Background="Blue" Foreground="Red" Content="This is a button"/> <Button> <Button.Background> <SolidColorBrush Color="Blue"/> </Button.Background> <Button.Foreground> <SolidColorBrush Color="Red"/> </Button.Foreground> <Button.Content> This is a button </Button.Content> </Button> http://msdn.microsoft.com/en-us/library/cc189036(VS.95).aspx
  • 15. StackPanel  The StackPanel will place its children in either a column (default) or row. This is controlled by the Orientation property. <StackPanel Orientation="Vertical"> <Button Content="Button" /> <Button Content="Button" /> </StackPanel>
  • 16. Nested Stackpanels <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal" Margin="0,0,0,12"> <TextBlock Text="Username" FontSize="48" Width="240" TextAlignment="Right" Margin="0,0,20,0"/> <TextBox FontSize="48" Width="300"/> </StackPanel> <StackPanel Orientation="Horizontal" Margin="0,0,0,12"> <TextBlock Text="Password" Margin="0,0,20,0" FontSize="48" Width="240" TextAlignment="Right"/> <PasswordBox Margin="0" FontSize="48" Width="300"/> </StackPanel> <Button Content="Login" HorizontalAlignment="Left" Margin="257,0,0,0" FontSize="48"/> </StackPanel>
  • 17. Grid  The Grid is a powerful layout container.  It acts as a placeholder for visual elements  You specify the rows and columns, and those define the cells.  The placement of an element in the Grid is specified using attached properties that are set on the children of the Grid:  Supports different types of row and column sizes in one Grid:  Pixel size: Fixed value in pixels  Auto size: The cell has the size of it’s contents  Star size: whatever space is left over from fixed- and auto-sized columns is allocated to all of the columns with star-sizing <Image Grid.Column="3" Source="demo.png" Stretch="None"/>
  • 20. TextBox  Normal  Multi Line  Border & Colors <TextBox Text="Hello World" TabIndex="4" /> <TextBox Text="Hello World" Height="200" AcceptsReturn="True" /> <TextBox Text="Hello World" BorderThickness="3" BorderBrush="Black" SelectionHighlightColor="Blue" Background="LightGray" />
  • 21. TextBox  No Clear Button (“Blend default”)  InputScope <TextBox Text="Hello World" TextWrapping="Wrap" /> <TextBox InputScope="Search" />
  • 22. Image  Supports BMP, JPG, TIF and PNG  Source property  External, starts with ‘http://’  App  Referenced Class Library  Local storage <Image Source="http://www.server.com/Images/Windows8.png" /> <Image Source="/MyImages/Windows8.png" /> <Image Source="ms-appx:///ClassLibrary1/MyImages/Windows8.jpg" /> <Image Source="ms-appdata:///local/MyFolder/Windows8.jpg" />
  • 23. <AppBar vs CommandBar /> AppBarButton, AppBarToggleButton, AppBarSeparator
  • 24. AppBar CommandBar  Properties  Foreground  Background  IsSticky  IsOpen  Children  Events  Opened  Closed  Properties  Foreground  Background  IsSticky  IsOpen  PrimaryCommands  SecondaryCommands  Events  Opened  Closed
  • 25. AppBarButtons • Windows 8.1 introduces new controls for XAML that let you more easily create app bar command buttons that reflect the proper design guidelines and behaviors: the AppBarButton, AppBarToggleButton, and AppBarSeparator controls. • App bar buttons differ from standard buttons in several ways: • Their default appearance is a circle instead of a rectangle. • You use the Label and Icon properties to set the content instead of the Content property. The Content property is ignored. • The button's IsCompact property controls its size.
  • 26. AppBarButtons • FontIcon • The icon is based on a glyph from the specified font family. • BitmapIcon • The icon is based on a bitmap image file with the specified Uri. • PathIcon • The icon is based on Path data. • SymbolIcon • The icon is based on a predefined list of glyphs from the Segoe UI Symbol font.
  • 27. AppBarButtons Links • Images & Paths (Vectors) • http://modernuiicons.com • http://thenounproject.com • http://www.thexamlproject.com • http://www.syncfusion.com/downloads/metrostudio • Symbols • http://msdn.microsoft.com/en-us/library/windows/apps/jj841126.aspx • http://www.geekchamp.com/icon-explorer/introduction • http://www.fontello.com/ • http://fontastic.me
  • 29. Resources  Reusable objects such as data, styles and templates.  Assigned a unique key (x:Key) so you can reference to it.  Every element has a Resources property.  Nesting Support  All static resources are loaded on page load  Resource is loaded even if not used 31
  • 30. Convert to New Resource…
  • 31. Resources in Blend  Menu Window - Resources  Shows all resources of all open XAML documents  Link to Resource Dictionary  Edit Resource  Rename Resource  Move Resource  Delete Resource  Apply Resource by Drag & Drop 33
  • 32. Merged Resources  Store resources in external files  Declare once, use many times  Makes XAML shorter and easier to read  Can be stored in external assemblies 34
  • 34. Key Frame Concept  XAML supports key frames  A key frame defines an objects target value on a moment in an animation.  A key frame has an interpolation method.  A Key Frame target can be a:  Double (X, Y, Height, Width, Opacity, Angle, etc.)  Color (Fill, Stroke, etc.)  Object (Visibility, Text, etc)
  • 35. Storyboards  Creating a storyboard in Expression Blend 37
  • 36. Storyboards  The Storyboard object has interactive methods to Begin, Pause, Resume, and Stop an animation. public void ButtonStart_Click(object sender, MouseEventArgs e) { if (myStoryboard.GetCurrentState() == ClockState.Stopped) { myStoryboard.Begin(); } } public void ButtonPause_Click(object sender, MouseEventArgs e) { myStoryboard.Pause(); } public void ButtonResume_Click(object sender, MouseEventArgs e) { myStoryboard.Resume(); } public void ButtonStop_Click(object sender, MouseEventArgs e) { myStoryboard.Stop(); }
  • 39. ShowMessageBox Action public class ShowMessageAction : DependencyObject, IAction { #region Text Dependency Property public string Text { get { return (string)GetValue(TextProperty); } set { SetValue(TextProperty, value); } } public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(ShowMessageAction), new PropertyMetadata(string.Empty)); #endregion Text Dependency Property public object Execute(object sender, object parameter) { #pragma warning disable 4014 new MessageDialog(this.Text).ShowAsync(); #pragma warning restore return null; } } Links: • http://reflectionit.nl/Blog/2013/windows-8-xaml-tips-creating-blend-behaviors • http://blendbehaviors.net/
  • 41. Styling and Templating  XAML = UI flexibility  Customize the look of an application without changing it’s behavior  Styling = Small Visual Changes on an Element (Font, Background Color, etc.)  Templating = Replacing Element’s entire Visual Tree
  • 42. Styling <Page.Resources> <Style x:Key="HollandButtonStyle" TargetType="Button"> <Setter Property="Background" Value="#FFFF9E00"/> <Setter Property="FontSize" Value="24"/> <Setter Property="FontStyle" Value="Italic"/> </Style> </Page.Resources> <Grid> <Button Content="Button" Style="{StaticResource HollandButtonStyle}"/> </Grid>
  • 43. Implicit Styling  If you omit the Style’s Key and specify only the TargetType, then the Style is automatically applied to all elements of that target type within the same scope (it is implicitly applied).  This is typically called a typed style as opposed to a named style. <Style TargetType="TextBox"> <Setter Property="FontFamily" Value="Arial Black"/> <Setter Property="FontSize" Value="16"/> </Style>
  • 44. BasedOn Styling <Page.Resources> <Style x:Key="HollandButtonStyle" TargetType="Button"> <Setter Property="Background" Value="#FFFF9E00"/> <Setter Property="FontSize" Value="24"/> <Setter Property="FontStyle" Value="Italic"/> </Style> <Style x:Key="GermanButtonStyle" TargetType="Button" BasedOn="{StaticResource HollandButtonStyle}"> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="Black"/> </Style> </Page.Resources> <Grid > <Button Content="Button" Style="{StaticResource GermanButtonStyle}"/> <Button Content="Button" Style="{StaticResource HollandButtonStyle}"/> </Grid>
  • 47. Data Binding  Data binding is the process that establishes a connection, or binding, between the UI and the business object which allows data to flow between the two  Enable clean view/model separation and binding  Change UI presentation without code-behind modifications  Every binding has a source and a target  Source is the business object or another UI element  Target is the UI element  Binding Expressions can be one way or two way and supports validation & converters
  • 48. Element to Element Binding  Element binding is performed in the same manner as Data Binding with one addition: the ElementName property. ElementName defines the name of the binding source element. <Grid> <TextBlock Text="{Binding Value, ElementName=mySlider}" FontSize="32"/> <Slider x:Name="mySlider" Maximum="10" Value="6" /> </Grid>
  • 49. Data Window – Sample Data
  • 52.
  • 53. Laat ons weten wat u vindt van deze sessie! Vul de evaluatie in via www.techdaysapp.nl en maak kans op een van de 20 prijzen*. Prijswinnaars worden bekend gemaakt via Twitter (#TechDaysNL). Gebruik hiervoor de code op uw badge. Let us know how you feel about this session! Give your feedback via www.techdaysapp.nl and possibly win one of the 20 prizes*. Winners will be announced via Twitter (#TechDaysNL). Use your personal code on your badge.
  • 54. Related sessions 16-4 Slot Title Speaker 07:45 Using native code in your Windows and Windows Phone Applications Maarten Struys 07:45 Bluetooth and NFC phone to phone communication Rob Miles 10:50 What is new in XAML and tooling in Windows 8.1 Fons Sonnemans 10:50 Tiles, Notificaties en het Actiecentrum in Windows Phone 8.1 apps Rajen Kishna 10:50 Sites and Apps, hoe maak ik ze accessible Dennis Vroegop & Jeroen Hulscher 13:15 Windows and Windows Phone – Build Apps for Both Mike Taulty 13:15 Optimizing Windows Store apps for varying form factors, resolutions and viewstates Tom Verhoeff 14:50 Talking to hardware with Windows Phone Rob Miles 14:50 Crossplatform development using Mapping data and features Joost van Schaik 16:20 Building Windows Store and Windows Phone XAML apps Harikrishna Ajithkumar Menon 16:20 Lap Around Windows Phone 8.1 voor de enterprise developer Matthijs Hoekstra 16:20 Making money with Apps Fons Sonnemans 16:20 Van één app honderd apps maken? Tom Droste 16:20 Lap around Windows Phone 8.1: Introduction to the new developer platform Andy Wigley 17:45 App Analytics voor Windows Phone en Windows Store Mark Monster 17:45 Je hebt een app. Nu alleen nog verkopen! Dennis Vroegop
  • 55. Related sessions 17-4 Slot Title Speaker 07:45 Modern Apps for the Enterprise Dennis Mulder 09:15 Diagnosing performance issues in Xaml based Windows Phone and Windows Store Apps with Visual Studio 2013 Harikrishna Ajithkumar Menon 09:15 Designing XAML Apps using blend for Visual Studio 2013 Fons Sonnemans 09:15 Building Windows Store apps for Windows Phone 8.1 Andy Wigley 09:15 Jouw apps op alle schermen en resoluties Martin Tirion 09:15 Combineer Windows, Windows Phone en SharePoint apps voor succesvolle enterprise oplossingen Dave Smits 10:50 Hergebruik van JavaScriptkennis bij het bouwen van Windows Store apps Timmy Kokke 10:50 Making the most from Windows Phone App Studio Tom Verhoeff 13:15 Creating games for Windows 8 and Windows Phone 8 with monogame Rob Miles 13:15 A Lap Around the PRISM Framework for Windows 8 Store Apps Mike Taulty 14:50 Bouwen en distribueren van je Enterprise apps voor Windows Phone 8.1 Matthijs Hoekstra 14:50 Zoeken in Windows en in jouw app Martin Tirion 14:50 Succesvol Enterprise apps aanbieden via de Windows en Office Store Dave Smits 16:20 Networking, Mobile Services and Authentication on Windows Phone 8.1 Andy Wigley 16:20 TypeScript en Windows Store apps Timmy Kokke