This question is locked. New answers and comments are not allowed.
I'm trying to put a RadTimeSelector in a RadModalWindow where I manipulate the IsOpen property via DataBinding.
Like this:
Important I've got this RadWindow (tried RadModalWindow as well) in a second page. And when I navigate to this second page the first time it seems to work. Even manipulating the IsOpen property multiple times, it's still working. However when I navigate back, and navigate to this secondpage again (with a different uri parameter). I'm getting an ArgumentException when I manipulate the IsOpen property to be true, with the following stacktrace.
I tried using the RadWindow with different content first, and Isolated that the RadTimeSelector doesn't like being displayed a second time.
Is there a workaround? I want to achieve a UI like the attached screenshot.
Like this:
<
telerikPrimitives:RadWindow
Grid.Row
=
"1"
IsOpen
=
"{Binding PickReminderTime, Mode=TwoWay}"
Placement
=
"CenterCenter"
>
<
telerikInput:RadTimeSelector
SelectorFormat
=
"h/m"
SelectedValue
=
"{Binding ReminderEditTime,Mode=TwoWay}"
/>
</
telerikPrimitives:RadWindow
>
Important I've got this RadWindow (tried RadModalWindow as well) in a second page. And when I navigate to this second page the first time it seems to work. Even manipulating the IsOpen property multiple times, it's still working. However when I navigate back, and navigate to this secondpage again (with a different uri parameter). I'm getting an ArgumentException when I manipulate the IsOpen property to be true, with the following stacktrace.
System.ArgumentException: Value does not fall within the expected range.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value)
at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value)
at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
at System.Windows.PresentationFrameworkCollection`1.Add(T value)
at Telerik.Windows.Controls.RadWindow.AddCanvas(Panel parent)
at Telerik.Windows.Controls.RadWindow.OpenCore(Panel ancestor)
at Telerik.Windows.Controls.RadWindow.Open()
at Telerik.Windows.Controls.RadWindow.SyncOpenState()
at Telerik.Windows.Controls.RadWindow.OnIsOpenChanged(Boolean newValue, Boolean oldValue)
at Telerik.Windows.Controls.RadWindow.OnIsOpenChanged(Object sender, DependencyPropertyChangedEventArgs args)
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.RaisePropertyPathStepChanged(PropertyPathStep source)
at System.Windows.PropertyAccessPathStep.RaisePropertyPathStepChanged(PropertyListener source)
at System.Windows.CLRPropertyListener.SourcePropertyChanged(Object sender, PropertyChangedEventArgs args)
at System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(Object sender, PropertyChangedEventArgs args)
at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
at GalaSoft.MvvmLight.ObservableObject.RaisePropertyChanged(String propertyName)
at MC.Chain.WPUI.ViewModel.ViewModelBase.RaisePropertyChanged(String propertyName)
at MC.Chain.WPUI.ViewModel.EditGoalViewModel.set_PickReminderTime(Boolean value)
at MC.Chain.WPUI.ViewModel.EditGoalViewModel.PickReminder()
at GalaSoft.MvvmLight.Helpers.WeakAction.Execute()
at GalaSoft.MvvmLight.Command.RelayCommand.Execute(Object parameter)
at System.Windows.Controls.Primitives.ButtonBase.ExecuteCommand()
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
I tried using the RadWindow with different content first, and Isolated that the RadTimeSelector doesn't like being displayed a second time.
Is there a workaround? I want to achieve a UI like the attached screenshot.