SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Christian Hissibini
Tech Enthousiast…
@histechup
HisTech Solutions
Microsoft MVP Windows Platform Dev
New for dependency properties
register for property changes
<TextBox Text="{Binding
}
What problem
are we solving?
Classic
Binding
Compiled
Binding
The data context of x:Bind
is the code-behind class
<TextBox Text="{Binding
Converter
ConverterLanguage
ConverterParameter
ElementName
FallbackValue
Mode
Path
RelativeSource
Source
TargetNullValue
UpdateSourceTrigger}
<TextBox Text="{x:Bind
Converter
ConverterLanguage
ConverterParameter
ElementName
FallbackValue
Mode
Path
RelativeSource
Source
TargetNullValue
UpdateSourceTrigger}
<ListView ItemsSource="{x:Bind ViewModel.Employees}">
<ListView.ItemTemplate>
<DataTemplate x:DataType="model:Employee">
<Grid>
<TextBlock Text="{x:Bind Name}"/>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Improve performance by simplifying your
templates
<ResourceDictionary
x:Class="MyNamespace.MyTemplates"
xmlns:model="using:xBindSampleModel">
<DataTemplate
x:Key="MyTemplate"
x:DataType="model:Employee">
<TextBlock Text="{x:Bind Name}" />
</DataTemplate>
</ResourceDictionary>
namespace MyNamespace
{
public class MyTemplates
{
public MyTemplates()
{
InitializeComponent();
}
}
}
</UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<local:MyTemplates/>
<ResourceDictionary Source="filename" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Button Click="PokeEmployee">Poke Employee</Button>
<Button Click="{x:Bind Employee.Poke}">Poke Employee</Button>
void Poke()
void Poke(object sender, RoutedEventArgs e)
void Poke(object sender, object e)
Use Bindings.Update()
for async data (incl. OneTime)
Bindings.StopTracking()
pauses compiled bindings
Text="{x:Bind MyElement.Text}"
public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();
this.DataContextChanged += (s, e) =>
{
ViewModel = DataContext as ViewModels.MainPageViewModel;
};
}
// strongly-typed view models enable x:bind
public ViewModels.MainPageViewModel ViewModel { get; set; }
}
{x:Bind} is not for
every situation (yet)
x:Bind can meet your binding needs most
of the time.
Questions?
Thank you!

Weitere ähnliche Inhalte

Was ist angesagt?

Imagine Camp Algeria 2014 Build for both session2 mvvm
Imagine Camp Algeria 2014 Build for both session2 mvvmImagine Camp Algeria 2014 Build for both session2 mvvm
Imagine Camp Algeria 2014 Build for both session2 mvvm
MicrosoftStudentPartnerAlgeria
 
Web 10mca556 syllabs
Web 10mca556 syllabsWeb 10mca556 syllabs
Web 10mca556 syllabs
Ramesh Bindu
 

Was ist angesagt? (20)

Grid Vew Control VB
Grid Vew Control VBGrid Vew Control VB
Grid Vew Control VB
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
Imagine Camp Algeria 2014 Build for both session2 mvvm
Imagine Camp Algeria 2014 Build for both session2 mvvmImagine Camp Algeria 2014 Build for both session2 mvvm
Imagine Camp Algeria 2014 Build for both session2 mvvm
 
Dev308
Dev308Dev308
Dev308
 
DocumentDB - NoSQL on Cloud at Reboot2015
DocumentDB - NoSQL on Cloud at Reboot2015DocumentDB - NoSQL on Cloud at Reboot2015
DocumentDB - NoSQL on Cloud at Reboot2015
 
Grid View Control CS
Grid View Control CSGrid View Control CS
Grid View Control CS
 
Data Binding for Xamarin Forms In-Depth
Data Binding for Xamarin Forms In-DepthData Binding for Xamarin Forms In-Depth
Data Binding for Xamarin Forms In-Depth
 
Ajax and Jquery
Ajax and JqueryAjax and Jquery
Ajax and Jquery
 
Mongodb vs mysql
Mongodb vs mysqlMongodb vs mysql
Mongodb vs mysql
 
Using semi-structured data in modern applications
Using semi-structured data in modern applicationsUsing semi-structured data in modern applications
Using semi-structured data in modern applications
 
Web 10mca556 syllabs
Web 10mca556 syllabsWeb 10mca556 syllabs
Web 10mca556 syllabs
 
Ajax
AjaxAjax
Ajax
 
Introduction to NoSQL Database
Introduction to NoSQL DatabaseIntroduction to NoSQL Database
Introduction to NoSQL Database
 
Azure Table Storage: The Good, the Bad, the Ugly (10 min. lightning talk)
Azure Table Storage: The Good, the Bad, the Ugly (10 min. lightning talk)Azure Table Storage: The Good, the Bad, the Ugly (10 min. lightning talk)
Azure Table Storage: The Good, the Bad, the Ugly (10 min. lightning talk)
 
Whos afraid of front end databases?
Whos afraid of front end databases?Whos afraid of front end databases?
Whos afraid of front end databases?
 
Ajax.pdf
Ajax.pdfAjax.pdf
Ajax.pdf
 
Visualize your graph database
Visualize your graph databaseVisualize your graph database
Visualize your graph database
 
My sql vs mongo
My sql vs mongoMy sql vs mongo
My sql vs mongo
 
Databind in asp.net
Databind in asp.netDatabind in asp.net
Databind in asp.net
 
Database and types of database
Database and types of databaseDatabase and types of database
Database and types of database
 

Ähnlich wie XAML Data Binding in UWP

Adaptersdb-03-file2storedprocedure
Adaptersdb-03-file2storedprocedureAdaptersdb-03-file2storedprocedure
Adaptersdb-03-file2storedprocedure
prathap kumar
 

Ähnlich wie XAML Data Binding in UWP (20)

ADO.NET Entity Framework by Jose A. Blakeley and Michael Pizzo
ADO.NET Entity Framework by Jose A. Blakeley and Michael PizzoADO.NET Entity Framework by Jose A. Blakeley and Michael Pizzo
ADO.NET Entity Framework by Jose A. Blakeley and Michael Pizzo
 
Learn about dot net attributes
Learn about dot net attributesLearn about dot net attributes
Learn about dot net attributes
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
 
Javascript programming using the document object model
Javascript programming using the document object modelJavascript programming using the document object model
Javascript programming using the document object model
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overview
 
Practical OData
Practical ODataPractical OData
Practical OData
 
Olap
OlapOlap
Olap
 
Angular 2 Essential Training
Angular 2 Essential Training Angular 2 Essential Training
Angular 2 Essential Training
 
Ch 7 data binding
Ch 7 data bindingCh 7 data binding
Ch 7 data binding
 
Knockout.js
Knockout.jsKnockout.js
Knockout.js
 
Knockoutjs databinding
Knockoutjs databindingKnockoutjs databinding
Knockoutjs databinding
 
Adaptersdb-03-file2storedprocedure
Adaptersdb-03-file2storedprocedureAdaptersdb-03-file2storedprocedure
Adaptersdb-03-file2storedprocedure
 
FiletodbAdapters
FiletodbAdaptersFiletodbAdapters
FiletodbAdapters
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
 
asp.net - for merge.docx
asp.net - for merge.docxasp.net - for merge.docx
asp.net - for merge.docx
 
exa_cer_g23
exa_cer_g23exa_cer_g23
exa_cer_g23
 
SenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark Brocato
SenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark BrocatoSenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark Brocato
SenchaCon 2016: Ext JS + React: A Match Made in UX Heaven - Mark Brocato
 
Html css
Html cssHtml css
Html css
 
NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020NoSQL Endgame DevoxxUA Conference 2020
NoSQL Endgame DevoxxUA Conference 2020
 
ASP.net Manual final.pdf
ASP.net Manual final.pdfASP.net Manual final.pdf
ASP.net Manual final.pdf
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.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
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

XAML Data Binding in UWP