PrepAway - Latest Free Exam Questions & Answers

Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You need to display the title of the page in a TextBlock control that is placed at the top of a page.
Which XAML code fragment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
<TextBlock Text="{Binding Path=Title, Source=Page}"/>

B.
<TextBlock Text="{Binding Path=Title, Source={x:Type Page}}"/>

C.
<TextBlock Text="{Binding Path=Title, RelativeSource= {RelativeSource FindAncestor,AncestorType={x:Type Page}}}"/>

D.
<TextBlock Text="{Binding Path=Title, RelativeSource={RelativeSource this}}"/>


Leave a Reply