This question is locked. New answers and comments are not allowed.
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:
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-
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: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-