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

RadRibbonBackstageItem Icon Crashes Designer

2 Answers 91 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Kelly
Top achievements
Rank 1
Kelly asked on 16 Nov 2011, 01:26 AM
Hi:

If I add an Icon property to a RadRibbonBackstageItem, thus:

<telerik:RadRibbonBackstageItem Header="Open View" IsDefault="True" Icon="/AttnHistory;component/Images/Ribbon/page_go.png">
    <StackPanel Margin="15 15 0 0">
        <TextBlock Text="Stored Views" FontSize="14" FontWeight="Bold" Margin="0 0 0 2" />
        <Rectangle Height="1" Fill="{StaticResource DottedLineBrush}" />
        <ItemsControl ItemsSource="{Binding StoredViews}" Margin="0 4 0 0" ItemTemplate="{StaticResource StoredViewTemplate}"/>
    </StackPanel>
</telerik:RadRibbonBackstageItem>

the BackstageItem element is underlined in the VS2010 XAML designer and shows an error. The associated error text is "[Line: 0 Position: 0]". The module compiles correctly, it runs correctly, and the icon is shown correctly. But working with the module in the designer is a pain in the butter. It also occasionally crashes the designer with:

System.Reflection.TargetException
Object does not match target type.
   at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at Microsoft.Expression.DesignModel.Metadata.LocalClrPropertyImplementation.GetValue(Object target)
   at Microsoft.Expression.Platform.Silverlight.SilverlightDependencyPropertyImplementation.GetValue(Object target)
   at Microsoft.Expression.DesignModel.Metadata.DependencyPropertyReferenceStep.GetValue(Object target)
   at MS.Internal.Services.DesignModeValueProviderService.RunDesignModeValueProvider(Object target, ModelItem modelItem, Platform platform, ValueTranslationService valueTranslationService, Type runtimeType, PropertyIdentifier property, ReferenceStep referenceStep, Boolean isFirstTime, ReferenceStep shadow, Object newValue)
   at MS.Internal.Services.DesignModeValueProviderService.ValueTranslationServicePropertyInvalidated(Object sender, PropertyInvalidatedEventArgs e)
   at MS.Internal.Features.DesignModeValueProviderConnector.ValueTranslationServiceImpl.InvalidateProperty(ModelItem item, PropertyIdentifier property)
   at Telerik.Windows.Controls.Design.SelectedDesignModeValueProvider`1.AdornerProxyBase.Activate(ModelItem item)
   at Microsoft.Windows.Design.Interaction.AdornerProvider.InvokeActivate(EditingContext context, ModelItem item)
   at MS.Internal.Features.AdornerProviderFeatureConnector.FeatureProvidersAdded(ModelItem item, IEnumerable`1 extensions)
   at Microsoft.Windows.Design.Policies.PolicyDrivenFeatureConnector`1.OnPolicyItemsChanged(Object sender, PolicyItemsChangedEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at Microsoft.Windows.Design.Policies.ItemPolicy.OnPolicyItemsChanged(PolicyItemsChangedEventArgs e)
   at Microsoft.Windows.Design.Policies.SelectionPolicy.OnSelectionChanged(Selection newSelection)
   at Microsoft.Windows.Design.ContextItemManager.SubscribeProxy`1.SubscribeContext(ContextItem item)
   at Microsoft.Windows.Design.SubscribeContextCallback.Invoke(ContextItem item)
   at Microsoft.Windows.Design.EditingContext.DefaultContextItemManager.OnItemChanged(ContextItem item)
   at Microsoft.Windows.Design.EditingContext.DefaultContextItemManager.SetValue(ContextItem value)
   at MS.Internal.Designer.VSDesigner.VSDesignerClientImpl.RestoreSelection(List`1 selectionOffsetsInXamlFile)
   at MS.Internal.Designer.VSDesignerClient.RestoreSelection(List`1 offsetsInXamlFile)
   at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)

Any ideas why this occurs, and is there a workaround, perhaps?

By the way, I have other Backstage items with icons that work perfectly and don't exhibit the error, such as:

<telerik:RadRibbonBackstageItem Header="New View" Command="{Binding NewButton}" IsSelectable="False" Icon="/AttnHistory;component/Images/Ribbon/page_add.png"/>

Thank you,

KO

2 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tsvetkov
Telerik team
answered on 18 Nov 2011, 05:38 PM
Hi Kelly,

Could you please try your project with the latest binaries from Q3 release and tell me if the error still occurs?

Kind regards,
Viktor Tsvetkov
the Telerik team

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

0
Kelly
Top achievements
Rank 1
answered on 18 Nov 2011, 11:45 PM
Thank you Viktor - all taken care of with the Q3 build. KO
Tags
RibbonView and RibbonWindow
Asked by
Kelly
Top achievements
Rank 1
Answers by
Viktor Tsvetkov
Telerik team
Kelly
Top achievements
Rank 1
Share this question
or