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

Visual Studio 2012 Designer Error With Implicit Themes

5 Answers 130 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
PMoransais
Top achievements
Rank 1
PMoransais asked on 15 Jan 2013, 05:18 PM
I am encountering a problem when applying implicit themes to a vb.net WPF project. The problem appears to be with the
RibbonView implicit theme: Themes/OfficeBlack/Telerik.Windows.Controls.RibbonView.xaml

I followed the instructions from the help system for implicit themes and created a resource dictionary in the application.xaml file as follows:

<ResourceDictionary.MergedDictionaries>

  <ResourceDictionary Source="Themes/OfficeBlack/Telerik.Windows.Controls.xaml" />

  <ResourceDictionary Source="Themes/OfficeBlack/Telerik.Windows.Controls.Input.xaml" />

  <ResourceDictionary Source="Themes/OfficeBlack/Telerik.Windows.Controls.Navigation.xaml" />

  <ResourceDictionary Source="Themes/OfficeBlack/Telerik.Windows.Controls.RibbonView.xaml" />

</ResourceDictionary.MergedDictionaries>

 

 

 

 

 

I also referenced the corresponding dlls from the installation directory:
C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2012\Themes.Implicit\WPF40\Metro\Themes

The program compiles and runs OK.
The problem is that the xaml designer has the following error

 

System.ArgumentException

'{DependencyProperty.UnsetValue}' is not a valid value for the 'Telerik.Windows.Controls.RadRibbonGallery.Icon' property on a Setter.

The stack Trace indicates that the error takes place in the expression designer. This error is listed 3 times.
There are no errors in the xaml code or in the vb.net code
That same error occurs for several of the themes that I have tried (Windows8, windows7, OfficeBlue, OfficeBlack)

The markup for window that I am designing does not use the radRibbonView, nor does it use the RadRibbonGallery.

When I remove the following line from the application Xaml ResourceDictionary merge:
<ResourceDictionary Source="Themes/OfficeBlack/Telerik.Windows.Controls.RibbonView.xaml">

the errors disappear.

Do you have a bug in the RibbonView.xaml?

Thanks for your help in solving this

Thanks

Philippe



 

 

 

5 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 18 Jan 2013, 03:18 PM
Hello Philippe,

I tried to use Implicit styles in a VB.NET WPF project and it seems that the approach is correct and the code is working as expected on our side. Can you please take a look at the attached project and let me know if I missed something? Please note that when you use Implicit styles you have to reference the NoXaml dlls in your project.

I am looking forward to hearing from you.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
PMoransais
Top achievements
Rank 1
answered on 21 Jan 2013, 02:35 PM
Hi Pavel,

I ran your application on my machine as is. It runs without problems. When opening the mainWindow XAML file in the XAML designer I got the same errors I describe in my original post (See attachment).

However, immediately after running your example, I opened my application (without anything else changed) and my mainWindow and its RibbonView display correctly in the XAML designer.

I rebooted my machine and duplicated the steps above several times with the same results. The mainWindow of your sample application does not display on the designer while my mainWindow does.

Please note that error in the designer is always repeated 3 times see below

Thanks for you help

Philippe

XAML Designer Error triggered by your sample app on my machine

System.ArgumentException

'{DependencyProperty.UnsetValue}' is not a valid value for the 'Telerik.Windows.Controls.RadRibbonGallery.Icon' property on a Setter.

at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken) at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)

System.ArgumentException

'{DependencyProperty.UnsetValue}' is not a valid value for the 'Telerik.Windows.Controls.RadRibbonGallery.Icon' property on a Setter.

Server stack trace: at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal) at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d) at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3() at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()

System.ArgumentException

'{DependencyProperty.UnsetValue}' is not a valid value for the 'Telerik.Windows.Controls.RadRibbonGallery.Icon' property on a Setter.

at System.Windows.Setter.Seal() at System.Windows.SetterBaseCollection.Seal() at System.Windows.Style.Seal() at System.Windows.Style.System.Windows.ISealable.Seal() at System.Windows.StyleHelper.SealIfSealable(Object value) at System.Windows.ResourceDictionary.SealValue(Object value) at System.Windows.ResourceDictionary.SealValues() at System.Windows.ResourceDictionary.AddOwner(DispatcherObject owner) at System.Windows.ResourceDictionary.PropagateParentOwners(ResourceDictionary mergedDictionary) at System.Windows.ResourceDictionary.OnMergedDictionariesChanged(Object sender, NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item) at System.Windows.ResourceDictionaryCollection.InsertItem(Int32 index, ResourceDictionary item) at System.Collections.ObjectModel.Collection`1.Add(T item) at Microsoft.Expression.DesignSurface.View.WPFSceneView.WpfResourceHost.TrySetApplicationResources() at Microsoft.Expression.DesignSurface.View.WPFSceneView.WpfResourceHost.EndInstanceBuilding() at Microsoft.Expression.DesignSurface.View.WPFSceneView.CrossDocumentUpdateToken.System.IDisposable.Dispose() at Microsoft.Expression.Platform.InstanceBuilders.ViewNodeManager.UpdateInstances(IAttachViewRoot siteRoot, IList`1 contextNodes, CancellationToken cancelToken) at Microsoft.Expression.DesignSurface.View.XamlSceneView.UpdateInstancesInternal() at Microsoft.Expression.DesignSurface.View.XamlSceneView.UpdateInternal(Boolean updateInstances, Boolean updateReferences) at Microsoft.Expression.DesignSurface.View.WPFSceneView.UpdateInternal(Boolean updateInstances, Boolean updateReferences) at Microsoft.Expression.DesignSurface.View.XamlSceneView.Update(Boolean updateReferences) at Microsoft.Expression.DesignSurface.View.ViewUpdateManager.UpdateInvalidRelatedDocuments(SceneView view) at Microsoft.Expression.DesignSurface.View.XamlSceneView.EnsureActiveViewUpdated() at Microsoft.Expression.DesignSurface.View.WPFSceneView.EnsureActiveViewUpdated() at Microsoft.Expression.DesignSurface.View.XamlSceneView.SetVisible(Boolean visible) at Microsoft.Expression.DesignSurface.View.WPFSceneView.SetVisible(Boolean visible) at Microsoft.Expression.DesignSurface.DocumentViewContext.CreateAndOpenView(ISourceItemContext sourceItem, CancellationToken cancelToken, Boolean activate, Boolean ensureOpenInHost, Boolean suppressUI) at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func) at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e() at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15() at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()







0
Pavel R. Pavlov
Telerik team
answered on 24 Jan 2013, 02:00 PM
Hi Philippe,

Thank you for your elaboration. We can confirm that this is a bug, we fixed it and the fix will be available in the next official release 2013 Q1 that should be available by the end of February.

Kind regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
PMoransais
Top achievements
Rank 1
answered on 24 Jan 2013, 06:07 PM
Thanks for your help

Philippe
0
Mark
Top achievements
Rank 1
answered on 28 Jan 2013, 10:40 AM
I've run into exact issue and found workaround (until official fix) that works for me:

In the Telerik.Windows.Controls.RibbonView.xaml there are several styles that reference images from Telerik assembly (and mentioned RadRibbonGallery is one of them), for example the telerikRibbonView:RadRibbonGroup set value for Icon property in the following way:

<Setter Property="Icon" Value="/Telerik.Windows.Controls.RibbonView;component/RibbonGroupCollapsedIcon.png" />

I've extracted such images from the original dll and included them all as project resources so that I could change the Icon property above in the following way:

<Setter Property="Icon" Value="/Assets/Images/RibbonGroupCollapsedIcon.png" />

After all those changes I've finally get back the design-time support in VS2012 and Blend 5 Preview.

Hope this help.

PS. Nevertheless, still looking forward the official fix.
Tags
RibbonView and RibbonWindow
Asked by
PMoransais
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
PMoransais
Top achievements
Rank 1
Mark
Top achievements
Rank 1
Share this question
or