Results 1 to 2 of 2

Thread: error in xaml resource

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    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.

  2. #2
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    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
  •  



Click Here to Expand Forum to Full Width