I have a RichTextBox in the main page. I have a RadWindow, which also contains a RichTextBox, that is open over the top of the one in the main page. Both RichTextBoxes have custom context menus. The context menu for the RichTextBox in the main page works perfectly. The context menu for the RichTextBox in the RadWindow opens correctly the first time, but throws an exception the 2nd time.
Value does not fall within the expected range.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, Boolean b)
at System.Windows.DependencyObject.SetValue(DependencyProperty property, Boolean b)
at System.Windows.Controls.Primitives.Popup.set_IsOpen(Boolean value)
at Telerik.Windows.Controls.PopupPlacement.OpenPopup()
at Telerik.Windows.Controls.PopupPlacement.OnIsOpenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
at System.Windows.Data.BindingExpression.SendDataToTarget()
at System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
at System.Windows.PropertyPathListener.ReconnectPath()
at System.Windows.Data.Binding.EnsureBreakPoint(BindingDebugState debugState, Action callback, Boolean canDelay)
at System.Windows.Data.BindingExpression.OnSourcePropertyChanging(Action action)
at System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(PropertyPathStep source)
at System.Windows.PropertyAccessPathStep.RaisePropertyPathStepChanged(PropertyListener source)
at System.Windows.DependencyPropertyListener.SourcePropertyChanged(DependencyObject sender, DependencyProperty dp)
at System.Windows.Data.WeakDependencyPropertyChangedListener.SourcePropertyChanged(DependencyObject sender, DependencyProperty dp)
at System.Windows.DPChangedEventHandler.Invoke(DependencyObject sender, DependencyProperty dp)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyProperty dp)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyProperty dp)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Telerik.Windows.Controls.RadContextMenu.set_IsOpenInternal(Boolean value)
at Telerik.Windows.Controls.RadContextMenu.OpenPopup()
at Telerik.Windows.Controls.RadContextMenu.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Telerik.Windows.Controls.RadContextMenu.set_IsOpen(Boolean value)
at Telerik.Windows.Controls.RichTextBoxUI.ContextMenu.ShowMenu(Point location, RadRichTextBox radRichTextBox, WordInfo incorrectWordInfo)
at Telerik.Windows.Controls.RichTextBoxUI.ContextMenu.Show(Point location, RadRichTextBox radRichTextBox, WordInfo incorrectWordInfo)
at Telerik.Windows.Controls.RadRichTextBox.ShowContextMenuAtDocumentPosition(Point proposedLocation, DocumentPosition position)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.HandleMouseRightButtonUpOnPosition(Point clickPosition)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseRightButtonUp(Object sender, MouseButtonEventArgs 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)