Crash while pinch to zoom

8 posts, 0 answers
  1. Andreas
    Andreas avatar
    4 posts
    Member since:
    Aug 2013

    Posted 15 Aug 2013 Link to this post

    Hello,
    i am just playing around with the ScheduleView and i found an error.

    If you are in the WeekViewDefinition and change to MonthViewDefinition using pinch to zoom i get the following exception:

    System.InvalidOperationException wurde nicht behandelt.
      Message="TargetType 'TimeRulerMonthViewGroupItem'" entspricht nicht dem Typ des Elements "TimeRulerGroupItem".
      Source=PresentationFramework
      StackTrace:
           bei System.Windows.Style.CheckTargetType(Object element)
           bei System.Windows.StyleHelper.UpdateStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldStyle, Style newStyle, Style& styleCache)
           bei System.Windows.FrameworkElement.OnStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
           bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
           bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
           bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
           bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
           bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
           bei System.Windows.FrameworkElement.set_Style(Style value)
           bei Telerik.Windows.Controls.ScheduleView.Extensions.SetStyleWithType(FrameworkElement element, Style style) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Helpers\Extensions.cs:Zeile 30.
           bei Telerik.Windows.Controls.ScheduleViewBase.EnsureElementStyle(FrameworkElement element, Style newStyle) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Common.cs:Zeile 781.
           bei Telerik.Windows.Controls.ScheduleViewBase.ApplyTickItemStyle(FrameworkElement container, Object item) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Common.cs:Zeile 1289.
           bei Telerik.Windows.Controls.TimeRulerPanel.PrepareItem(TimeRulerItemBase item) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\TimeRulerPanel.cs:Zeile 126.
           bei Telerik.Windows.Controls.RecycleHelper`1.PrepareItem(Int32 index) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Helpers\RecycleHelper.cs:Zeile 146.
           bei Telerik.Windows.Controls.RecycleHelper`1.PrepareItems(IValuesContainer indexTree, DateTime startDate, DateTime endDate) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Helpers\RecycleHelper.cs:Zeile 89.
           bei Telerik.Windows.Controls.TimeRulerPanel.PrepareItems() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\TimeRulerPanel.cs:Zeile 342.
           bei Telerik.Windows.Controls.TimeRulerPanel.MeasureOverride(Size availableSize) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\TimeRulerPanel.cs:Zeile 214.
           bei System.Windows.FrameworkElement.MeasureCore(Size availableSize)
           bei System.Windows.UIElement.Measure(Size availableSize)
           bei System.Windows.ContextLayoutManager.UpdateLayout()
           bei System.Windows.UIElement.UpdateLayout()
           bei Telerik.Windows.Media.Imaging.ExportHelper.GetBitmapSource(FrameworkElement element, Double dpiX, Double dpiY) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\ExportExtensions\ExportHelper.cs:Zeile 92.
           bei Telerik.Windows.Media.Imaging.ExportHelper.GetElementImage(FrameworkElement element) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\ExportExtensions\ExportHelper.cs:Zeile 70.
           bei Telerik.Windows.Controls.TransitionControl.TransitionPresenter.PrepareAnimation() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\TransitionControl\TransitionPresenter.cs:Zeile 301.
           bei Telerik.Windows.Controls.RadTransitionControl.PrepareAnimation() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\TransitionControl\RadTransitionControl.cs:Zeile 183.
           bei Telerik.Windows.Controls.RadScheduleView.OnActiveViewDefinitionChanged(ViewDefinitionBase oldValue, ViewDefinitionBase newValue) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\RadScheduleView.cs:Zeile 275.
           bei Telerik.Windows.Controls.ScheduleViewBase.OnActiveViewDefinitionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Common.cs:Zeile 2691.
           bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
           bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
           bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
           bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
           bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
           bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
           bei Telerik.Windows.Controls.ScheduleViewBase.set_ActiveViewDefinition(ViewDefinitionBase value) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.cs:Zeile 1441.
           bei Telerik.Windows.Controls.RadScheduleView.SetView(ViewDefinitionBase resultView, Object dateTime) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\RadScheduleView.cs:Zeile 196.
           bei Telerik.Windows.Controls.RadScheduleView.SelectView[T](Object dateTime) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\RadScheduleView.cs:Zeile 179.
           bei Telerik.Windows.Controls.ScheduleViewBase.OnSetMonthViewModeExecuted(Object sender, ExecutedRoutedEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Controls\ScheduleView.Commands.cs:Zeile 300.
           bei System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
           bei System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
           bei System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
           bei System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
           bei System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
           bei System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
           bei System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
           bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
           bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
           bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
           bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
           bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
           bei System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
           bei System.Windows.Input.RoutedCommand.Execute(Object parameter, IInputElement target)
           bei Telerik.Windows.Controls.ScheduleView.ScheduleViewTouchableElement.SemanticZoomOut(IList`1 originalPoints) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Touch\ScheduleViewTouchableElement.cs:Zeile 147.
           bei Telerik.Windows.Controls.ScheduleView.ScheduleViewTouchableElement.SemanticZoom(IList`1 originalPoints, Double delta) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\ScheduleView\ScheduleView\Touch\ScheduleViewTouchableElement.cs:Zeile 184.
           bei Telerik.Windows.Input.Touch.GestureHandlers.PinchToSemanticZoomHandler.PinchFinished() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Input\Touch\GestureHandlers\PinchToSemanticZoomHandler.cs:Zeile 26.
           bei Telerik.Windows.Input.Touch.TouchHandler.RegisterPinchFinish() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Input\Touch\TouchHandler.cs:Zeile 233.
           bei Telerik.Windows.Input.Touch.TouchHandler.RegisterTouchUp(TouchHandlerArgs args) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Input\Touch\TouchHandler.cs:Zeile 186.
           bei Telerik.Windows.Input.Touch.TouchHandlersController.RegisterTouchUp(Point point, TouchPoint[] touchPoints, Boolean& handled) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Input\Touch\TouchHandlersController.cs:Zeile 103.
           bei Telerik.Windows.Input.Touch.TouchHandlersController.Owner_TouchUp(Object sender, TouchEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Input\Touch\TouchHandlersController_WPF.cs:Zeile 219.
           bei System.Windows.Input.TouchEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
           bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
           bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
           bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
           bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
           bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
           bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
           bei System.Windows.Input.InputManager.ProcessStagingArea()
           bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
           bei System.Windows.Input.TouchDevice.RaiseTouchUp()
           bei System.Windows.Input.TouchDevice.ReportUp()
           bei System.Windows.Input.StylusLogic.PromoteMainUpToTouch(StylusDevice stylusDevice, StagingAreaInputItem stagingItem)
           bei System.Windows.Input.StylusLogic.PromoteMainToTouch(ProcessInputEventArgs e, StylusEventArgs stylusEventArgs)
           bei System.Windows.Input.StylusLogic.PromoteMainToOther(ProcessInputEventArgs e)
           bei System.Windows.Input.StylusLogic.PostProcessInput(Object sender, ProcessInputEventArgs e)
           bei System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)
           bei System.Windows.Input.InputManager.ProcessStagingArea()
           bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
           bei System.Windows.Input.StylusLogic.InputManagerProcessInput(Object oInput)
           bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
           bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
           bei System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
           bei System.Threading.ExecutionContext.runTryCode(Object userData)
           bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
           bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
           bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           bei System.Windows.Threading.DispatcherOperation.Invoke()
           bei System.Windows.Threading.Dispatcher.ProcessQueue()
           bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
           bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
           bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
           bei System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
           bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
           bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
           bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
           bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
           bei System.Windows.Application.RunDispatcher(Object ignore)
           bei System.Windows.Application.RunInternal(Window window)
           bei System.Windows.Application.Run(Window window)
           bei System.Windows.Application.Run()
           bei ScheduleViewError.App.Main() in C:\Users\a.karpinski\documents\visual studio 2010\Projects\ScheduleViewError\ScheduleViewError\obj\x86\Debug\App.g.cs:Zeile 0.
           bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
           bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
           bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           bei System.Threading.ThreadHelper.ThreadStart()
      InnerException: 



    My XAML:
    <Grid>
            <telerik:RadScheduleView
                AppointmentsSource="{Binding Items}"
                                                 DockPanel.Dock="Top"
                                                 IsManipulationEnabled="False"
                                                 VerticalAlignment="Top" 
                                                 VirtualizingStackPanel.VirtualizationMode="Standard"
                                                 VirtualizingStackPanel.IsVirtualizing="False"
                                                SnapAppointments="True"
                                                 
                                                  
                                                 NavigationHeaderVisibility="Collapsed"
                                                 >
                <telerik:RadScheduleView.ViewDefinitions>
                    <telerik:WeekViewDefinition
                                        DayEndTime="19:00:00"
                                        DayStartTime="07:00:00"
                                        MajorTickLength="1h"
                                        MinorTickLength="1h"
                                        TimerulerMajorTickStringFormat="{}{0:HHtt}:{0:mm}"
                                        TimerulerMinorTickStringFormat="{}{0:HHtt}:{0:mm}"
                                        ShowAllDayArea="False"
                                         
                                        MinTimeRulerExtent="300"
                                        VisibleDays="5" >
                    </telerik:WeekViewDefinition>
                    <telerik:DayViewDefinition
                                   TimerulerMajorTickStringFormat="{}{0:HHtt}:{0:mm}"
                                   TimerulerMinorTickStringFormat="{}{0:HHtt}:{0:mm}"
                                    ShowAllDayArea="False"
                                   DayEndTime="19:00:00"
                                        DayStartTime="07:00:00"
                                        MajorTickLength="1h"
                                        MinorTickLength="1h"
                                    >
     
                    </telerik:DayViewDefinition>
                    <telerik:MonthViewDefinition
                                     TimerulerMajorTickStringFormat="{}{0:HHtt}:{0:mm}"
                                    DayEndTime="19:00:00"
                                    DayStartTime="07:00:00"
                                    StretchGroupHeaders="False"
                                    >
     
                    </telerik:MonthViewDefinition>
     
                </telerik:RadScheduleView.ViewDefinitions>
     
                 
            </telerik:RadScheduleView>
        </Grid>


  2. Alek
    Admin
    Alek avatar
    78 posts

    Posted 19 Aug 2013 Link to this post

    Hello Andreas,

    Following the explanations and the code snippet in your forum post we created a sample, but we didn't manage to reproduce the issue. We tested it under version 2013.2.724. 

    Regards,
    Alek
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Andreas
    Andreas avatar
    4 posts
    Member since:
    Aug 2013

    Posted 11 Sep 2013 Link to this post

    Sorry for answering late.

    What i do is:

    1. Start the Application 
    2. Use pinch to zoom inside WeekViewDefinition zooming out.
    3. Error

    Here is a video showing the error. 

    http://l4nk4b3l.de/error/

    I am using de "Microsoft Surface 2.0 SDK Tool" to simulate touch on my Windows 7 machine.

    Telerik.Windows.Controls: 2013.2.812.40 (Trial)

  5. Alek
    Admin
    Alek avatar
    78 posts

    Posted 13 Sep 2013 Link to this post

    Hello Andreas,

    You may find a video attached showing our approach. We still do not manage to reproduce the crash. Please, take a look at it in case we are missing something important.

     The code in our sample is the same as the one you've sent us in the thread and we are using the same Microsoft Input Simulator for the test.

    Regards,
    Alek
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Andreas
    Andreas avatar
    4 posts
    Member since:
    Aug 2013

    Posted 17 Sep 2013 Link to this post

    Hey Alek,

    I can't see any differnce to yours but i am still able to reproduce the crash every time...


    I uploaded the Solution http://l4nk4b3l.de/error/ScheduleViewError.zip here...
  7. Georgi
    Admin
    Georgi avatar
    347 posts

    Posted 23 Sep 2013 Link to this post

    Hello Andreas,

    Thanks to your simple project we were able to reproduce the exception. Therefore we have logged it here in our Public Issue Tracking System, where you can track its progress.
    Also your points have been updated for the report.


    Regards,
    Georgi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  8. Georgi
    Admin
    Georgi avatar
    347 posts

    Posted 23 Sep 2013 Link to this post

    Hello Andreas,

    We have researched the issue further and it seems like it depends on when the DataContext is initialized. Therefore meanwhile this can be used as a workaround:
    public MainWindow()
            {
                this.DataContext = this;
     
                InitializeComponent();
     
                this.Items = new ObservableCollection<Appointment>();
     
            }

     

    Regards,
    Georgi
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  9. Andreas
    Andreas avatar
    4 posts
    Member since:
    Aug 2013

    Posted 23 Sep 2013 Link to this post

    Hi,
    i'm glad to hear that you were able to reproduce the error.

    Thanks for the workaround i'll try it out later!

    Regards,
    Andreas
Back to Top
UI for WPF is Visual Studio 2017 Ready