Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following code fragment.

<Page.Resources>
<TextBlock x:Key="copyright" Text="Copyright Wingtip Toys 2008"/>
</Page.Resources>

You need to ensure that the copyright message is displayed on the pages of the application.
Which XAML code fragment should you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following code fragment.

<Page.Resources>
<TextBlock x:Key="copyright" Text="Copyright Wingtip Toys 2008"/>
</Page.Resources>

You need to ensure that the copyright message is displayed on the pages of the application.
Which XAML code fragment should you use?

A.
<ContentControl Content="{Binding copyright}"/>

B.
<ContentControl Content="{StaticResource copyright}"/>

C.
<ContentControl Content="{Binding copyright, Path=Text}"/>

D.
<ContentControl Content="{Binding ElementName=copyright }"/>

E.
<ContentControl Content="{Binding Source={StaticResource copyright}, Path=Content}"/>



Leave a Reply 0

Your email address will not be published. Required fields are marked *