Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Need to navigate from application.xaml.vb! Please help

$
0
0

I currently have an application built, and I added code in the application.xaml.vb file to capture a keydown event in every page. Basically, this will capture the data when a barcode scanner is used on any page. I then want to redirect the navigation to a specific page with the input from the barcode scanner as a application variable.

I am using the navigation everywhere in the application, but if I put the following code in the application.xaml.vb file:

Dim nav As NavigationService
nav = NavigationService.GetNavigationService(Me)
nav.Navigate(New System.Uri("detail.xaml", UriKind.RelativeOrAbsolute))

"Me" gets underlined as an error with this error message: Value of type 'msds_station_v4.Application' cannot be converted to 'System.Windows.DependencyObject'.

Please help!


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>