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

Telerik_WPF_Demos, not able to navigate to example view form SingleControlExamplesTouch view the 2nd time

1 Answer 17 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ajoua taha
Top achievements
Rank 1
ajoua taha asked on 21 Jul 2016, 10:54 AM

Hi,

I tried to use the WPF telerik demo code to load modules of my application as done with the demo but I had a problem when trying to navigate to an example exp1 twice, the second time I am not able to navigate, but when I navigate to another example exp2 then exp1, it works:

exp1 -> home -> exp1: bug during the second navigation.
exp1 -> home -> exp2 -> home -> exp1: no problem.

I thought that may be the problem is with selector object in "SelectorHelper" class.

Can you give me any explanation or ideas about this problem.

Thanks,

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 26 Jul 2016, 08:28 AM
Hello ajoua taha,

Please note, that we are not aware of such issue and we have tried to reproduce it, but with no luck.
Nevertheless we are aware of similar issue that can occur if the "selector.SelectionChanged -= selectionChangedHandler;" is uncomment in the OnSelectionChangedCommandPropertyChanged :


public static void OnSelectionChangedCommandPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var selector = d as Selector;
            ICommand command = e.NewValue as ICommand;
 
            if (selector != null)
            {
                SelectionChangedEventHandler selectionChangedHandler = (s, args) =>
                {
                    command.Execute(selector.GetValue(SelectorHelper.SelectionChangedCommandParameterProperty));
                };
 
                RoutedEventHandler unloadedHandler = null;
                unloadedHandler = (s1, args1) =>
                {
                    //selector.SelectionChanged -= selectionChangedHandler;
                    selector.Unloaded -= unloadedHandler;
                };
 
                selector.SelectionChanged += selectionChangedHandler;
                selector.Unloaded += unloadedHandler;
            }
        }

But once again this unhooking is not done in the WPF Demos and also if used the issue is a bit different (once unhooked you cannot navigate to any example).
So it would be very helpful if you could send us a short video showing how it can be reproduced in the WPF Demos and therefore we can be of more help once we can reproduce it on our side.

Looking forward to your reply.

Regards,
Georgi
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
ajoua taha
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or