예제 #1
0
        private void OnNavigating(object sender, WebNavigatingEventArgs e)
        {
            var args = new CustomWebViewNavigatingArgs
            {
                Sender    = sender,
                EventArgs = e
            };

            if (NavigatingCommand?.CanExecute(args) ?? false)
            {
                NavigatingCommand.Execute(args);
            }
        }
예제 #2
0
        public MVVMWebView()
        {
            Navigating += (s, e) =>
            {
                if (NavigatingCommand?.CanExecute(e) ?? false)
                {
                    NavigatingCommand.Execute(e);
                }
            };

            Navigated += (s, e) =>
            {
                if (NavigatedCommand?.CanExecute(e) ?? false)
                {
                    NavigatedCommand.Execute(e);
                }
            };
        }