Hi,
I want to put the following RTB fir the LeftPage and rightPage for the book.
this is the Dictionary code where I created the Left and right pages for the book :
The problem is, How do I create the Template, I tried the example in the Help Document and it still do not work.
I get the following error,
'Could not register named object. Names not supported under ResourceDictionary scope.' Line number '12' and line position '23
Please see attached image.
Regards,
Omar
I want to put the following RTB fir the LeftPage and rightPage for the book.
this is the Dictionary code where I created the Left and right pages for the book :
<
ResourceDictionary
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
>
<
Style
x:Key
=
"myStyle"
TargetType
=
"Button"
>
<
Setter
Property
=
"Background"
Value
=
"Orange"
/>
<
Setter
Property
=
"FontStyle"
Value
=
"Italic"
/>
<
Setter
Property
=
"Padding"
Value
=
"8,4"
/>
<
Setter
Property
=
"Margin"
Value
=
"4"
/>
</
Style
>
<!-- Declare the template used for the left pages -->
<
DataTemplate
x:Name
=
"LeftPageTemplate"
>
<
StackPanel
Margin
=
"10"
Background
=
"LightGray"
>
</
StackPanel
>
</
DataTemplate
>
<!-- Declare the template used for the right pages -->
<
DataTemplate
x:Name
=
"RightPageTemplate"
DataType
=
"Grid"
>
<
StackPanel
Margin
=
"10"
Background
=
"LightBlue"
>
<
TextBlock
HorizontalAlignment
=
"Right"
FontSize
=
"24"
FontWeight
=
"Bold"
Text
=
"{Binding Title}"
/>
<
Image
Width
=
"240"
Height
=
"320"
Source
=
"{Binding Image}"
/>
<
StackPanel
HorizontalAlignment
=
"Right"
Orientation
=
"Horizontal"
>
<
TextBlock
FontWeight
=
"Bold"
Text
=
"Date Taken:"
/>
<
TextBlock
Text
=
"{Binding DateTaken}"
/>
</
StackPanel
>
<
StackPanel
HorizontalAlignment
=
"Right"
Orientation
=
"Horizontal"
>
<
TextBlock
FontWeight
=
"Bold"
Text
=
"Size:"
/>
<
TextBlock
Text
=
"{Binding Size}"
/>
</
StackPanel
>
</
StackPanel
>
</
DataTemplate
>
</
ResourceDictionary
>
The problem is, How do I create the Template, I tried the example in the Help Document and it still do not work.
I get the following error,
'Could not register named object. Names not supported under ResourceDictionary scope.' Line number '12' and line position '23
Please see attached image.
Regards,
Omar