Search
Weekend Training
ASP.NET MVC, HTML 5 weekend training, click here
eBook free
Winners

Win Prizes

Social Presence
Twitter Twitter LinkedIn YouTube Google

Like us on Facebook
Advertisements
Top Interviews Author
Sun, 25-Jan-2015 Authors
All Time Authors
Vishal@Neeraj
46320
Rajkatie
20760
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: 4175




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 

Share this to:

Bookmark It

Comments or Responses

Login to post response