コード例 #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);
                }
            };
        }
コード例 #3
0
 private void BindableWebView_Navigating(System.Object sender, WebNavigatingEventArgs e)
 {
     NavigatingCommand?.Execute(null);
 }