<?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: Custom Cursor from image in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/custom-cursor-from-image/m-p/57800#M273</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One simple approach is to just handle the mouse enter and mouse leave events on the map element and switch the cursor in those events. It needs to be a .cur file or .ani file (there are apps you can download to convert your images) and apparently it has to be referenced by absolute path too, as opposed to relative path or pack uri.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;XAML:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:Map x:Name="MyMap" MouseEnter="Map_MouseEnter" MouseLeave="Map_MouseLeave"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="MyLayer" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /&amp;gt;
&amp;lt;/esri:Map&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CODE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void Map_MouseEnter(object sender, MouseEventArgs e)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Cursor = Cursors.None;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Cursor cursor = new Cursor(@"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\VsGraphics\Assets\Cursors\magicwand.cur");
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Cursor = cursor;
}

private void Map_MouseLeave(object sender, MouseEventArgs e)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Cursor = Cursors.Hand;
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:11:23 GMT</pubDate>
    <dc:creator>MichaelBranscomb</dc:creator>
    <dc:date>2021-12-10T22:11:23Z</dc:date>
    <item>
      <title>Custom Cursor from image</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/custom-cursor-from-image/m-p/57799#M272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to change the cursor to a image as I click a button, but i can only find help in silverlight and i cant apply it to runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible or you are just able to change it to the "traditional" buttons? (hand, cross, etc...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If is possible, how can you do it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DC&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 14:03:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/custom-cursor-from-image/m-p/57799#M272</guid>
      <dc:creator>DavidCaseiro</dc:creator>
      <dc:date>2012-08-28T14:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Cursor from image</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/custom-cursor-from-image/m-p/57800#M273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One simple approach is to just handle the mouse enter and mouse leave events on the map element and switch the cursor in those events. It needs to be a .cur file or .ani file (there are apps you can download to convert your images) and apparently it has to be referenced by absolute path too, as opposed to relative path or pack uri.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;XAML:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:Map x:Name="MyMap" MouseEnter="Map_MouseEnter" MouseLeave="Map_MouseLeave"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="MyLayer" 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /&amp;gt;
&amp;lt;/esri:Map&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CODE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void Map_MouseEnter(object sender, MouseEventArgs e)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Cursor = Cursors.None;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Cursor cursor = new Cursor(@"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\VsGraphics\Assets\Cursors\magicwand.cur");
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Cursor = cursor;
}

private void Map_MouseLeave(object sender, MouseEventArgs e)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Cursor = Cursors.Hand;
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:11:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/custom-cursor-from-image/m-p/57800#M273</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2021-12-10T22:11:23Z</dc:date>
    </item>
  </channel>
</rss>

