This is a migrated thread and some comments may be shown as answers.

Blend 4 rendering ...derived from "HeaderedContentControl"

12 Answers 117 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Øyvind Øyen
Top achievements
Rank 1
Øyvind Øyen asked on 03 Sep 2010, 08:44 AM
Blend 4 will not display mt xaml.
I keep getting the following message in blend:

- The local property "Header" can only be applied to types that are derived from "HeaderedContetnControl". -

for the template "TabItemContentDataTemplate"

Code:
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ItemPresenters="clr-namespace:GlobalScheduler.App.UI.UserControls.Edit.WorkOrder.ItemPresenters"
             xmlns:GlobalScheduler_App_UI_UserControls_Edit_Activity_Models="clr-namespace:GlobalScheduler.App.UI.UserControls.Edit.Activity.Models"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:WorkOrder="clr-namespace:GlobalScheduler.App.UI.UserControls.Edit.WorkOrder"
             xmlns:Activity="clr-namespace:GlobalScheduler.App.UI.UserControls.Edit.Activity" x:Class="GlobalScheduler.App.UI.UserControls.Edit.Activity.ActivityPaneContent"
             d:DesignWidth="1414.2" d:DesignHeight="596" mc:Ignorable="d">
    <UserControl.Resources>
        <DataTemplate x:Key="TabContentTemplate">
            <ScrollViewer>
                <StackPanel>                   
                    <Activity:TaskGrid DataContext="{Binding ChildObjectActivityTasksList}" />
                </StackPanel>
            </ScrollViewer>
        </DataTemplate>    
        <DataTemplate x:Key="TabItemContentDataTemplate">          
            <telerik:RadTabItem>               
                <telerik:RadTabItem.Header>
                    <!-- <ItemPresenters:ChildObjectPresenter CanEditChildObject="False" DataContext="{Binding ChildObjectModel}" /> -->
                    <TextBlock Text="noe"></TextBlock>
                </telerik:RadTabItem.Header>               
            </telerik:RadTabItem>          
        </DataTemplate>
        <GlobalScheduler_App_UI_UserControls_Edit_Activity_Models:ActivityEditModel x:Key="ActivityEditModelDataSource" d:IsDataSource="True" />               
    </UserControl.Resources>
    <UserControl.DataContext>
        <Binding Source="{StaticResource ActivityEditModelDataSource}" />
    </UserControl.DataContext>
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="43" />
            <RowDefinition Height="4" />
            <RowDefinition Height="Auto" MinHeight="27"/>
            <RowDefinition Height="26" />
            <RowDefinition Height="36" />
            <RowDefinition Height="26" />
            <RowDefinition Height="36" />
            <RowDefinition Height="84" />
            <RowDefinition Height="26" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="235" />
            <ColumnDefinition Width="211" />
            <ColumnDefinition Width="24" />
            <ColumnDefinition Width="235" />
            <ColumnDefinition Width="211" />
            <ColumnDefinition Width="24" />
            <ColumnDefinition Width="0.533*" />
            <ColumnDefinition Width="100" />
        </Grid.ColumnDefinitions>
        <TextBlock Margin="8,0,2,2" Grid.Row="3" Text="Activity name" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="13.333" />
        <TextBox x:Name="txtActivityName" Margin="2" Grid.Row="4" Text="{Binding ActivityModel.ActivityName, Mode=TwoWay}" TextWrapping="Wrap" FontSize="13.333" Grid.ColumnSpan="3" />
        <TextBlock Margin="8,0,2,2" Grid.Row="5" Text="Start Date" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="13.333" />
        <TextBlock Margin="8,0,2,2" Grid.Row="5" Text="End Date" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="13.333" Grid.Column="1" Grid.ColumnSpan="2" />
        <telerik:RadDatePicker x:Name="dteStartDate" Margin="4" Grid.Row="6" FontSize="13.333" DisplayDate="{Binding ActivityModel.ActualStart, Mode=OneWay}" SelectedDate="{Binding ActivityModel.ActualStart, Mode=TwoWay}" />
        <telerik:RadDatePicker x:Name="dteEndDate" Margin="4" Grid.Column="1" Grid.Row="6" FontSize="13.333" DisplayDate="{Binding ActivityModel.ActualStart, Mode=OneWay}" SelectedDate="{Binding ActivityModel.ActualStart}" Grid.ColumnSpan="2" />
        <Image x:Name="imgChangeLocation" Source="/GlobalScheduler.App;Component/UI/Images/RepeatHS.png" ToolTipService.ToolTip="Change Location" Margin="0,4,0,0" Height="20" VerticalAlignment="Top" Grid.Column="2" Grid.Row="7" Cursor="Hand" HorizontalAlignment="Center" />
        <Border Margin="2" Grid.Row="7" BorderThickness="1" Canvas.ZIndex="-3" CornerRadius="5" Grid.Column="1">
            <Border.BorderBrush>
                <SolidColorBrush Opacity="0.3" Color="Black" />
            </Border.BorderBrush>
            <Border.Background>
                <SolidColorBrush Opacity="0.1" Color="White" />
            </Border.Background>
            <TextBlock x:Name="txtOrderLocation" Margin="2" Text="{Binding ActivityModel.Location.LocationName, Mode=OneWay}" TextWrapping="Wrap" FontSize="14.667" ToolTipService.ToolTip="Currently selected location" />
        </Border>
        <WorkOrder:SelectLocation x:Name="LocationSelector" Grid.Row="7" Margin="2,2,0,0" Opacity="0.8" IsEnabled="False" Grid.Column="1" Height="26" VerticalAlignment="Top" Grid.ColumnSpan="2" />
        <StackPanel Margin="8,0,0,0" Orientation="Horizontal" Grid.ColumnSpan="7">
            <TextBlock Margin="0" Text="{Binding ActivityModel.ActivityName, Mode=OneWay}" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="21.333" HorizontalAlignment="Left" />
            <TextBlock Margin="0,8" Text="(" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="21.333" />
            <TextBlock HorizontalAlignment="Left" Margin="0,8" VerticalAlignment="Center" FontSize="21.333" Text="{Binding ActivityModel.Activity.WorkOrder.WorkOrderName, Mode=OneWay}" TextWrapping="Wrap" />
            <TextBlock HorizontalAlignment="Left" Margin="0,8" VerticalAlignment="Center" FontSize="21.333" Text=")" TextWrapping="Wrap" />
        </StackPanel>
        <Border Margin="2" Grid.Row="7" BorderBrush="Black" BorderThickness="1">
            <StackPanel Margin="0">
                <RadioButton x:Name="rbCommissioning" Margin="4" Content="Commissioning" GroupName="ActivityGroup" IsChecked="{Binding ActivityModel.IsStartup, Mode=TwoWay}" />
                <RadioButton x:Name="rbWarranty" Margin="4" Content="Warranty" GroupName="ActivityGroup" IsChecked="{Binding ActivityModel.IsWarranty, Mode=TwoWay}" />
                <RadioButton x:Name="rbWorkorder" Margin="4" Content="Workorder" GroupName="ActivityGroup" IsChecked="{Binding ActivityModel.IsWorkOrder, Mode=TwoWay}" />
            </StackPanel>
        </Border>
        <Border BorderBrush="#c9cdd2" Margin="4,0" BorderThickness="0 1 0 0" Grid.ColumnSpan="7" Grid.Row="1">
            <Border BorderBrush="#ffffff" BorderThickness="0 1 0 0" Margin="0" />
        </Border>
        <ScrollViewer Margin="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Grid.Row="2" Grid.ColumnSpan="7" BorderThickness="0" BorderBrush="{x:Null}">
            <Grid>
                <Border x:Name="selectedConfigurationNormalBorder" Margin="0" BorderBrush="Black" BorderThickness="0" d:LayoutOverrides="Width, Height">
                    <ItemPresenters:ConfigurationPresenter x:Name="ConfigurationPresenter" DataContext="{Binding ConfigurationModel, Mode=OneWay}" />
                </Border>
            </Grid>
        </ScrollViewer>
        <TextBlock Margin="10,0,0,-1" Grid.Row="3" Text="Description" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="13.333" ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.ColumnSpan="3" Grid.Column="3" />
        <TextBox x:Name="txtDescription" Margin="4,4,4,2" Grid.Row="4" TextWrapping="Wrap" Text="{Binding ActivityModel.Description, Mode=TwoWay}" Grid.ColumnSpan="4" Grid.Column="3" Grid.RowSpan="4" />
        <TextBlock Margin="8,0,2,2" Grid.Row="8" Text="Child objects" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="13.333" />
        <Border BorderBrush="Black" BorderThickness="1" Grid.ColumnSpan="7" Margin="2" Grid.Row="9">
            <telerik:RadTabControl x:Name="TabsChildObjects" Margin="2" ItemsSource="{Binding ChildObjectTabItemModels}" ContentTemplate="{StaticResource TabContentTemplate}" ItemTemplate="{StaticResource TabItemContentDataTemplate}"/>            
        </Border>
        <Button x:Name="btnSave" Grid.Column="7" Content="Save" Grid.Row="9" Height="28" VerticalAlignment="Bottom" Margin="4, 0, 4, 4"/>
    </Grid>
</UserControl>

It is the same for RadPane and other radcontrols.
VS 2010 shows the same controls fine, and the code executes. Is this a Blend 4 problem?

As you can see I replased a custom control with a textblock. No change.

Versions:
Blend 4.0.20525.0
VS 2010 4.0.30319

-øyvind-

12 Answers, 1 is accepted

Sort by
0
Vladislav
Telerik team
answered on 08 Sep 2010, 02:37 PM
Hi Øyvind Øyen,

Unfortunately we wasn't able to reproduce this issue.
What version of our controls you are using?

I created a simple project based on your code snippet and it is working properly in Blend.
Can you please try it and let us know if you still encounter the same problem with it?

All the best,
Vladislav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mark
Top achievements
Rank 1
answered on 24 Sep 2010, 01:51 PM
I get the same issue when using RadMenuItem - is there any news on this yet?

0
Vladislav
Telerik team
answered on 29 Sep 2010, 11:37 AM
Hi Mark,

Can you please elaborate a little more on the problem with RadMenuItems?
Are you encounter the issue in Blend only (or also in the design view of the VisualStudio)?
Do you have some custom DateTemplate for RadMenuItems?

It will be great if you can send us a sample project demonstrating the problem.
Also, can you please check do you still experience this problem with our latest official 2010 Q2 SP2 binaries?

Kind regards,
Vladislav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Øyvind Øyen
Top achievements
Rank 1
answered on 29 Sep 2010, 12:20 PM
Runtime version : v2.0.50727
Version : 2010.2.812.1040

For me this problem occures in Blend only. Actually I believe this particulare error message may not relate to the actual problem.
I use several custom controls but as you see in the xaml-code the error persists even when I replace theese.
I will dig into this as soon as I find the time again. For now I am ok with the VS2010 editor as most design i finished. I will allso add the latest versions of the telerik controls.

Best regars
Øyvind
0
Mark
Top achievements
Rank 1
answered on 29 Sep 2010, 12:23 PM
The problem was blend only, and yes I am using templates for each item. With the latest release, the problem went away, so now it is OK.

Let me know if you do find out what it was as this could be good to know for the future.

Thanks

Mark
0
Vladislav
Telerik team
answered on 01 Oct 2010, 12:46 PM
Hello Mark, Øyvind,

I am glad to hear that your problem is resolved with the SP2 release.
Unfortunately we wasn't able to find the exact reason for this issue. We are constantly improving our design time support and it seems that some other "fix" is fixed also this problem. Anyway if we find the exact cause for it I will post it here.
In the meantime please let us know if you still experience this or any other problem with our controls.

Kind regards,
Vladislav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
al011757 al011757
Top achievements
Rank 1
answered on 20 Jul 2011, 12:59 PM
I'm getting the same issue with SL2011 Q2 , speciffically with RadRibbonView, & Blend 4


<UserControl
  xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
  xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
  xmlns:Uc="clr-namespace:LibSl.Uc;assembly=LibSl"
  x:Class="Demo.MainPage"
  mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
  
  <Grid x:Name="LayoutRoot" Style="{StaticResource LayoutRootGridStyle}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
  
        <Grid>
  
            <t:RadRibbonView d:LayoutOverrides="Width" ApplicationName="Demo" MinimizeButtonVisibility="Visible"
                         ApplicationButtonVisibility="Collapsed" IsApplicationMenuOpen="False">
                <t:RadRibbonTab Header="Demo">
                    <t:RadRibbonGroup Header="Demo" Icon="/Telerik.Windows.Controls.RibbonView;component/RibbonGroupCollapsedIcon.png">
                        <t:RadRibbonButton Content="Aspectos"/>
                    </t:RadRibbonGroup>
                    <t:RadRibbonGroup Header="Administración">
                        <t:RadRibbonButton Content="ver permisos"/>
                    </t:RadRibbonGroup>
                    <t:RadRibbonGroup Header="Edición">
                        <t:RadRibbonButton Content="ver permisos"/>
                    </t:RadRibbonGroup>
                </t:RadRibbonTab>
            </t:RadRibbonView>
0
al011757 al011757
Top achievements
Rank 1
answered on 20 Jul 2011, 01:00 PM
I'm getting the same issue with SL2011 Q2 , speciffically with RadRibbonView, & Blend 4
0
Vladislav
Telerik team
answered on 25 Jul 2011, 01:47 PM
Hi Al011757 Al011757,

Unfortunately we wasn't able to reproduce the described issue.
I created a project based on your XAML and it is working as expected in Blend 4.
Can you please check the attached project and let us know if you still experience the same issue with it?
It is based on your XAML except the missing StaticResource named "LayoutRootGridStyle".
Feel free ti modify this project in any way in order to help us identify this issue.

Thank you in advance for your cooperation.

Best wishes,
Vladislav
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Tiru
Top achievements
Rank 1
answered on 25 Sep 2011, 10:37 PM
Hi , I am getting the same issue with  2011 Q2 SilverLight rad control. I have just copied from the tab control  first look example.
Blend 4 shows the error , Visual studio 2010 Sp1 does not show this error.
0
Tina Stancheva
Telerik team
answered on 28 Sep 2011, 05:18 PM
Hi Tiru,

We are still unable to reproduce the issue. I attached the sample project that I used to test it, please have a look at it and let me know if it works for you. Also, if you can modify the solution to reproduce the issue we will be able to further investigate it.

Also, a client has recently reported similar issues in a large application and after investigating the case it turned out that the issue was related to the Blend data vizualization mechanisms. And  removing and afterwords readding the projects that supply the data, fixed the issue and the exception. I hope this information will help.

Greetings,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Michal
Top achievements
Rank 1
answered on 23 Oct 2012, 07:13 AM
I had the exact same problem but in Visual Studio 2012 editor.

My problem was that I have referenced the Telerik.Windows.Controls.Navigation.dll from my References directory as opposite from Telerik default install directory.

As soon as I copied below dlls to my References directory problems gone :)

Telerik.Windows.Controls.Navigation.Design.4.0.dll
Telerik.Windows.Controls.Navigation.Design.5.0.dll
Telerik.Windows.Controls.Navigation.Expression.Design.dll
Telerik.Windows.Controls.Navigation.VisualStudio.Design.4.0.dll
Telerik.Windows.Controls.Navigation.VisualStudio.Design.dll

I think these are needed to draw controls correctly in VS editor.

Hope this helps somebody.
Tags
TabControl
Asked by
Øyvind Øyen
Top achievements
Rank 1
Answers by
Vladislav
Telerik team
Mark
Top achievements
Rank 1
Øyvind Øyen
Top achievements
Rank 1
al011757 al011757
Top achievements
Rank 1
Tiru
Top achievements
Rank 1
Tina Stancheva
Telerik team
Michal
Top achievements
Rank 1
Share this question
or