Test your technical skills online, appear in Virtual Interview and be ready for job!
Twitter Twitter LinkedIn YouTube Google
Be Interview ready ! | Search
Make friends on DotNetFunda.com and expand your network!
Winners

Win Prizes

Announcements
Like us on Facebook
Sponsor
Top Interviews Author
Wed, 23-Apr-2014 Authors
Goud.Kv
200
All Time Authors
Rajkatie
20480
Vishal@Neeraj
19600
Bharathi Cherukuri
18040

Latest members | More ...


(Statistics delayed by 5 minutes)

Can you explain how we can separate code and XAML?

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

Answer:

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:




Latest Interview Questions

    Comments or Responses

    Login to post response.

    Comments / Responses
    Select text & click toolbar to format. Formatting appears in viewmode only. HTML Tags are not allowed.
    Bold Italic Underline Paragraph Title Code  Link 
     Wait ... Processing ..... please wait.