<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: WebView2 control in a Dockpane in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1295106#M9905</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;So this is strange, and only started happening after implementing the Pro WebViewer.&lt;/P&gt;&lt;P&gt;In my AddIn, the user can choose to open the Uri that gets generated in a it's own web browser or directly in a dockpane (using the Pro WebViewer....which is working great).&amp;nbsp; But now that I have replaced the old Web Control I was using with the Pro WebViewer, when I try to open the same Uri in the system default web browser I get an error.&lt;/P&gt;&lt;P&gt;Do you think there is a connection to the new Pro WebViewer causing a conflict in the background??&lt;/P&gt;&lt;P&gt;This is the line that I get the error on:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;System.Diagnostics.Process.Start(streetViewLink);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the error....can't find the file specified???&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrianBulla_0-1685644515651.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/72197iA4FABF2D095B4700/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrianBulla_0-1685644515651.png" alt="BrianBulla_0-1685644515651.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've never had issues with this until I replaced the old Web Control with this new Pro WebViewer control.&amp;nbsp; Here is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;if (Properties.Settings.Default.svBrowserSetting == true)
                {
                    //*****Use this code if you want to open the separate web browser
                    string streetViewLink = @"https://www.google.com/maps/@?api=1&amp;amp;map_action=pano&amp;amp;viewpoint=" + lat + "," + lng + "&amp;amp;Heading=";
                    System.Diagnostics.Process.Start(streetViewLink);        //opens the webbrowser 
                }
                else
                {
                    //Open the dockpane if it isn't already open
                    DockPane pane = FrameworkApplication.DockPaneManager.Find("StreetView_ArcPro_Dockpane");
                    pane.Activate();

                    //Access the web control through the View
                    DockpaneView myView = DockpaneView.MyDockpaneView;
                    Uri googleUri = new Uri(@"https://www.google.com/maps/@?api=1&amp;amp;map_action=pano&amp;amp;viewpoint=" + lat + "," + lng + "&amp;amp;Heading=");                    
                    myView.webViewControl.Source = googleUri;
                }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2023 18:38:11 GMT</pubDate>
    <dc:creator>BrianBulla</dc:creator>
    <dc:date>2023-06-01T18:38:11Z</dc:date>
    <item>
      <title>WebView2 control in a Dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1293499#M9870</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've added the Nuget for the most recent WebView2 control into my solutions, I add it to a ProDockpane, give it a source yet whenever I open the dockpane in ArcPro, the WebView control is always blank.&lt;/P&gt;&lt;P&gt;Any ideas as to where I might be going wrong?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;lt;wv2:WebView2 Name="webView" Source="https://www.microsoft.com" /&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 15:53:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1293499#M9870</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2023-05-26T15:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: WebView2 control in a Dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1293578#M9873</link>
      <description>&lt;P&gt;Follow these instructions:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#webviewbrowser-control" target="_blank"&gt;ProConcepts Framework · Esri/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 17:52:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1293578#M9873</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-05-26T17:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: WebView2 control in a Dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1293598#M9876</link>
      <description>&lt;P&gt;Perfect!&amp;nbsp; Thanks Wolf!&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 18:34:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1293598#M9876</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2023-05-26T18:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: WebView2 control in a Dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1295106#M9905</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;So this is strange, and only started happening after implementing the Pro WebViewer.&lt;/P&gt;&lt;P&gt;In my AddIn, the user can choose to open the Uri that gets generated in a it's own web browser or directly in a dockpane (using the Pro WebViewer....which is working great).&amp;nbsp; But now that I have replaced the old Web Control I was using with the Pro WebViewer, when I try to open the same Uri in the system default web browser I get an error.&lt;/P&gt;&lt;P&gt;Do you think there is a connection to the new Pro WebViewer causing a conflict in the background??&lt;/P&gt;&lt;P&gt;This is the line that I get the error on:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;System.Diagnostics.Process.Start(streetViewLink);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the error....can't find the file specified???&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrianBulla_0-1685644515651.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/72197iA4FABF2D095B4700/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrianBulla_0-1685644515651.png" alt="BrianBulla_0-1685644515651.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've never had issues with this until I replaced the old Web Control with this new Pro WebViewer control.&amp;nbsp; Here is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;if (Properties.Settings.Default.svBrowserSetting == true)
                {
                    //*****Use this code if you want to open the separate web browser
                    string streetViewLink = @"https://www.google.com/maps/@?api=1&amp;amp;map_action=pano&amp;amp;viewpoint=" + lat + "," + lng + "&amp;amp;Heading=";
                    System.Diagnostics.Process.Start(streetViewLink);        //opens the webbrowser 
                }
                else
                {
                    //Open the dockpane if it isn't already open
                    DockPane pane = FrameworkApplication.DockPaneManager.Find("StreetView_ArcPro_Dockpane");
                    pane.Activate();

                    //Access the web control through the View
                    DockpaneView myView = DockpaneView.MyDockpaneView;
                    Uri googleUri = new Uri(@"https://www.google.com/maps/@?api=1&amp;amp;map_action=pano&amp;amp;viewpoint=" + lat + "," + lng + "&amp;amp;Heading=");                    
                    myView.webViewControl.Source = googleUri;
                }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 18:38:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1295106#M9905</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2023-06-01T18:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: WebView2 control in a Dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1295171#M9906</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/132711"&gt;@BrianBulla&lt;/a&gt;&amp;nbsp; When you call Process.Start () you have to change the defaults in ProcessStartInfo:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;      Process.Start(new ProcessStartInfo
      {
        FileName = @"https://www.google.com/maps/@21.9000254,-159.5609088,3a,75y,15.95h,90t/data=!3m8!1e1!3m6!1sAF1QipMDaTpcy-_W_IIFOf9S5lc4L_nUhtu9nZ0H93Cm!2e10!3e11!6shttps:%2F%2Flh5.googleusercontent.com%2Fp%2FAF1QipMDaTpcy-_W_IIFOf9S5lc4L_nUhtu9nZ0H93Cm%3Dw203-h100-k-no-pi-8.217636-ya202.37381-ro0-fo100!7i6912!8i3456?entry=ttu",
        UseShellExecute = true
      });&lt;/LI-CODE&gt;&lt;P&gt;The snippet worked for me.&amp;nbsp; &amp;nbsp;I am not using a ProWindow with a web viewer &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you don't use the ShellExecute option the default browser will only start if you give an html path.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 20:49:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1295171#M9906</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-06-01T20:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: WebView2 control in a Dockpane</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1295216#M9907</link>
      <description>&lt;P&gt;Ah yes....now I am remembering that when I take these projects that I am migrating from 2.9 to 3.0, that I also need to update some code here and there....and the Process.Start is definitely one of those sections.&amp;nbsp; I totally forgot about that, so thanks for the heads up!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 23:12:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/webview2-control-in-a-dockpane/m-p/1295216#M9907</guid>
      <dc:creator>BrianBulla</dc:creator>
      <dc:date>2023-06-01T23:12:32Z</dc:date>
    </item>
  </channel>
</rss>

