Search
Sponsor
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Interviews Author
Wed, 01-Oct-2014 Authors
All Time Authors
Vishal@Neeraj
36200
Rajkatie
20600
Bharathi Cherukuri
18040

Latest members | More ...


(Statistics delayed by 5 minutes)
 Exclusive Interview Question

Can you explain how we can separate code and XAML?

Posted on 9/14/2009 | Category: WPF Interview questions | Views: 3967




This is one of the most important features of WPF, separating the XAML from the code to be handled. So designers can independently work on the presentation of the application and developers can actually write the code logic independent of how the presentation is.
 



Figure .1:- XAML and behind code in action



Above is the code snippet, which shows a XAML file and the code completely detached from the XAML presentation. In order to associate a class with XAML file you need to specify the x: Class attribute. Any event specified on the XAML object can be connected by defining a method with sender and event values. You can see from the above code snippet we have linked the MyClickEvent to an event in the behind code.

Asked In: Many Interviews Alert Moderator 

Found interesting? Add this to:



Comments or Responses

Login to post response