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

Error with Animation target

2 Answers 54 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
caleb
Top achievements
Rank 1
caleb asked on 02 Dec 2016, 10:37 AM

Hello there,

 

I've got a RichTextBox tied to a Ribbon using the VisualStudio2013 theme.  The theme can be loaded up via the dll or the xaml files.  After the initial load of the control everything works just fine.  After selecting a font family and then clicking on another tab, and then clicking back into the tab to change the font family I get the following:

System.InvalidOperationException: Animation target not specified.

   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
   at System.Windows.Media.Animation.Storyboard.Begin()
   at Telerik.Windows.Controls.Animation.AnimationManager.Play(FrameworkElement target, String animationName, Action completeCallback, Boolean animateSelf, Object[] args)
   at Telerik.Windows.Controls.Animation.AnimationManager.Play(FrameworkElement target, String animationName, Action completeCallback, Object[] args)
   at Telerik.Windows.Controls.AutoClosePopupWrapper.OnPopupOpened(Object sender, EventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

 

I can't attach the files for you to review.  It's really a simple form.  Nothing complex going on.  I've pulled most of the code from the demo site.  This is an oob app with a secondary window launching the control.

If I remove the styling and use the default theme,  Office_Black I think, it works just fine.

Any idea what I need to adjust to get this to work?  I'm not able to get the sample on the demos site to break.  But you are also applying the styles differently.

This is with a new docx.  Nothing is being loaded into the RichTextBox.

Cheers,

Caleb

2 Answers, 1 is accepted

Sort by
0
caleb
Top achievements
Rank 1
answered on 02 Dec 2016, 05:25 PM

Hello there,

I have verified that the same error occurs with the WorkingWithRadDocumentEditor_SL.  Here's the xamls that I'm using for the merged resources.

<ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/System.Windows.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Input.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Data.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.RichTextBoxUI.xaml"/>                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Documents.xaml"/>

Cheers,

Caleb

0
caleb
Top achievements
Rank 1
answered on 09 Dec 2016, 07:26 AM

Hello there,

I was able to get around this issue by liberally splashing around the telerik:StyleManager.Theme="Windows8" property on all the RadRibbonGroup & RadRibbonToggleButton controls as well as others that needed it.  This fixed most of the issues.  The remaining one is that popup windows do not have the theme applied to buttons. 

I must say that I'm somewhat disappointed that the theme model didn't carry through to this control.  Although the RichTextBox & ribbon are complex controls the documentation makes it appear that the theming engine will work.  Looks like more testing on Teleriks' side is needed as the provided documentation clearly does not work with the samples off of github.

 

Caleb

Tags
RichTextBox
Asked by
caleb
Top achievements
Rank 1
Answers by
caleb
Top achievements
Rank 1
Share this question
or