-
Dec 9th, 2010, 03:48 AM
#1
Thread Starter
Fanatic Member
error in xaml resource
Hi,
In xaml, There is an underline on {TemplateBinding Content} in the following script:
The error is: Property 'Content' was not found in type 'Control'
Do y ou see why?
Note that I can compile but not sure why I get this underline.
Any thoughts please?
Thanks
<UserControl.Resources>
...
...
...
<ControlTemplate x:Key="ToolTipTemplate">
<Border BorderBrush="red" BorderThickness="5" CornerRadius="1" Background="blue">
<ContentPresenter Grid.Column="3"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Margin="1,1,1,1"/>
</Border>
</ControlTemplate>
</UserControl.Resources>
Last edited by arkiboys; Dec 9th, 2010 at 03:51 AM.
-
Dec 9th, 2010, 03:09 PM
#2
Re: error in xaml resource
Your <ControlTemplate ...> doesn't have a value for TargetType. In Silverlight 3 this was allowed and inferred to be System.Windows.Controls.Control.
Silverlight 4 doesn't allow the lax attribute and will give you the error you're seeing.
Here's an msdn link that explains: XAML Processing Differences Between Silverlight 3 and Silverlight 4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|