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

NavigatingCancelEventArgs has no "Cancel" property

1 Answer 55 Views
Navigation
This is a migrated thread and some comments may be shown as answers.
Justin
Top achievements
Rank 1
Justin asked on 11 Sep 2009, 02:58 PM
I'm using Telerik.Windows.Controls.NavigationService

I'm also using the "Navigating" event which has "NavigationCancelEventArgs" as a parameter.  I have some logic in this event in which I wish to cancel the navigation if a condition exists.  However there is no "Cancel" property on the "NavigatingCancelEventArgs" parameter.  I get this compiler error:

Error   1   'Telerik.Windows.Controls.NavigatingCancelEventArgs' does not contain a definition for 'Cancel' and no extension method 'Cancel' accepting a first argument of type 'Telerik.Windows.Controls.NavigatingCancelEventArgs' could be found (are you missing a using directive or an assembly reference?)   C:\Users\jmyers\Desktop\TimeTracker2\trunk\TimeTracker2\TTMainApplication\TTMaster.xaml.cs  62  19  TTMainApplication 
 

Any idea why?  If this is by design, I suggest you change the name or class of the "e" parameter.

1 Answer, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 14 Sep 2009, 07:10 AM
Hello Justin,

We apologize for the caused inconvenience. Navigating event if fired after the navigation is completed.
As a workaround you can add the desired validation before calling the Navigate method.
On another note our plans are to obsolete this component, since there is now a page navigation inside the SL3 framework. So if you are using SL3 it is recommended to convert to the Microsoft page navigation model.



Sincerely yours,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Navigation
Asked by
Justin
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Share this question
or