RibbonView not showing after templating it

3 posts, 0 answers
  1. Mohamed
    Mohamed avatar
    6 posts
    Member since:
    May 2011

    Posted 12 Jul 2011 Link to this post

    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. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 15 Jul 2011 Link to this post

    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!

  3. DevCraft banner
  4. Mohamed
    Mohamed avatar
    6 posts
    Member since:
    May 2011

    Posted 15 Jul 2011 Link to this post

    Yes I have resolved it thank you very much indeed.
Back to Top