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

RibbonView not showing after templating it

2 Answers 150 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Mohamed
Top achievements
Rank 1
Mohamed asked on 12 Jul 2011, 11:06 AM
Hi,

The ribbonView control is not showing in the silverlight web page after customizing it in blend.
Moreover, blend is always showing an error message "An object of the type "Telerik.Windows.Controls.Office_BlackTheme" cannot be applied to a property that expects the type "Telerik.Windows.Controls.Theme".

You can find attached my xaml code.
I'm sorry I think it was a dll references problem thank you.


<UserControl
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Telerik_Windows_Controls_Primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls.Navigation" xmlns:Telerik_Windows_Controls_RibbonView_Primitives="clr-namespace:Telerik.Windows.Controls.RibbonView.Primitives;assembly=Telerik.Windows.Controls.RibbonView" mc:Ignorable="d"
    x:Class="TestSilverlightTelerikBeta.MainPage"
    Width="640" Height="480">
    <UserControl.Resources>
        <SolidColorBrush x:Key="RibbonTitlebarBorderBrush" Color="#969fa7" />
 
     
 
        <telerik:Office_BlackTheme x:Key="Theme" />
        <ControlTemplate x:Key="RadRibbonViewControlTemplate1" TargetType="telerik:RadRibbonView">
            <Grid x:Name="RootPanel">
                <Grid.RowDefinitions>
                    <RowDefinition Height="28" />
                    <RowDefinition Height="24" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
 
                <Grid Visibility="{TemplateBinding TitleBarVisibility}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Border x:Name="titleBarBackground" BorderThickness="0,0,0,1" Grid.ColumnSpan="3"
                        BorderBrush="{StaticResource RibbonTitlebarBorderBrush}"
                        Background="{TemplateBinding TitleBarBackground}" />
                    <ContentPresenter x:Name="AboveToolBarHost" VerticalAlignment="Bottom"/>
                    <Telerik_Windows_Controls_RibbonView_Primitives:WindowTitle Grid.Column="1" Title="{TemplateBinding Title}"
                        ApplicationName="{TemplateBinding ApplicationName}"
                        Style="{TemplateBinding WindowTitleStyle}" />
                    <StackPanel x:Name="ContextualGroupsHeaders" Orientation="Horizontal" Grid.Column="2" />
                </Grid>
 
                <Rectangle Grid.Row="1" Grid.RowSpan="3" Fill="{TemplateBinding Background}" />
 
                <ContentPresenter x:Name="SelectedTabContent" Grid.Row="2" Height="91" Margin="1,-1,1,1" />
 
                <Grid x:Name="TopGrid" Grid.Row="1" Background="Black">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
 
                    <telerik:RadRibbonDropDownButton x:Name="ApplicationButton"                                    
                        IsOpen="{Binding IsApplicationMenuOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                        SmallImage="{TemplateBinding ApplicationButtonImageSource}"
                        Content="{TemplateBinding ApplicationButtonContent}"
                        Visibility="{TemplateBinding ApplicationButtonVisibility}"
                        Style="{TemplateBinding ApplicationButtonStyle}" />
 
                    <Telerik_Windows_Controls_RibbonView_Primitives:RibbonScrollViewer Grid.Column="1" x:Name="TabsScrollViewer"
                        telerik:StyleManager.Theme="{StaticResource Theme}">
                        <ItemsPresenter />
                    </Telerik_Windows_Controls_RibbonView_Primitives:RibbonScrollViewer>
 
                    <StackPanel Orientation="Horizontal" Grid.Column="2">
                        <telerik:RadRibbonToggleButton Style="{TemplateBinding MinimizeButtonStyle}"
                            Visibility="{TemplateBinding MinimizeButtonVisibility}"
                            IsEnabled="{TemplateBinding IsMinimizable}"
                            IsChecked="{Binding IsMinimized, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <telerik:RadRibbonButton telerik:StyleManager.Theme="{StaticResource Theme}"
                            x:Name="HelpButton" Visibility="{TemplateBinding HelpButtonVisibility}"
                            SmallImage="{TemplateBinding HelpButtonImageSource}"
                            Style="{TemplateBinding HelpButtonStyle}" />
                        <ContentPresenter Content="{TemplateBinding TabStripAdditionalContent}" />
                    </StackPanel>
                </Grid>
 
                <ContentPresenter x:Name="BelowToolBarHost" Grid.Row="3" />
                         
                         
                <telerik:Popup x:Name="TabContentPopup">
                    <ContentPresenter x:Name="SelectedTabContentPopup" Height="91" />
                </telerik:Popup>
                <telerik:Popup x:Name="BackstagePopup">
                    <Canvas x:Name="BackstageArea" />
                </telerik:Popup>
                         
            </Grid>
                     
        </ControlTemplate>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White" >
        <telerik:RadRibbonView Template="{StaticResource RadRibbonViewControlTemplate1}" ></telerik:RadRibbonView
    </Grid>
</UserControl>



2 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 15 Jul 2011, 08:11 AM
Hello Mohamed,

Did you manage to resolve your issue. We'd be glad to further assist you if you haven't.

Greetings,
Kiril Stanoev
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
Mohamed
Top achievements
Rank 1
answered on 15 Jul 2011, 11:16 AM
Yes I have resolved it thank you very much indeed.
Tags
RibbonView and RibbonWindow
Asked by
Mohamed
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Mohamed
Top achievements
Rank 1
Share this question
or