<?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 FeatureLayer has no graphics collection unless I give it to the Map ... in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514813#M2651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the need to create a FeatureLayer (local or not) and gain access to its Features --without the use of a Map--.&amp;nbsp; I haven't been successful.&amp;nbsp; The following steps are what I assumed would work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Create a LocalFeatureService.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; Point it towards a valid MapPackage file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Start the Service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4.&amp;nbsp; On StartCompleted -&amp;gt; Create a LocalFeatureLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5.&amp;nbsp; Give the LocalFeatureLayer the 'Service' and a valid 'LayerName' (a corresponding, editable layer within the MapPackage).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6.&amp;nbsp; Initialize the Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7.&amp;nbsp; OnInitialized -&amp;gt; Call ::Update() on the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;8.&amp;nbsp; Cast to GraphicsLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;9.&amp;nbsp; Get the Graphics Collection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assumed I would see all the Features within the Layer as graphics; I don't (its count = 0).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE:&amp;nbsp; If the LocalFeatureLayer is created and given to a map it will have a valid Graphics Collection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone see another way around this??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Sep 2012 10:58:09 GMT</pubDate>
    <dc:creator>MikeShaw</dc:creator>
    <dc:date>2012-09-09T10:58:09Z</dc:date>
    <item>
      <title>FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514813#M2651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the need to create a FeatureLayer (local or not) and gain access to its Features --without the use of a Map--.&amp;nbsp; I haven't been successful.&amp;nbsp; The following steps are what I assumed would work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; Create a LocalFeatureService.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; Point it towards a valid MapPackage file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Start the Service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4.&amp;nbsp; On StartCompleted -&amp;gt; Create a LocalFeatureLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5.&amp;nbsp; Give the LocalFeatureLayer the 'Service' and a valid 'LayerName' (a corresponding, editable layer within the MapPackage).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6.&amp;nbsp; Initialize the Layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;7.&amp;nbsp; OnInitialized -&amp;gt; Call ::Update() on the layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;8.&amp;nbsp; Cast to GraphicsLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;9.&amp;nbsp; Get the Graphics Collection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assumed I would see all the Features within the Layer as graphics; I don't (its count = 0).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE:&amp;nbsp; If the LocalFeatureLayer is created and given to a map it will have a valid Graphics Collection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone see another way around this??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2012 10:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514813#M2651</guid>
      <dc:creator>MikeShaw</dc:creator>
      <dc:date>2012-09-09T10:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514814#M2652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am also looking for an answer to this. What I am writing is a class library to plug into our in-house CMS application. I need to be able to update features completely through code. Based on what values are passed into me I must see if that specific record already exists in that feature layer. If so, I update it, if not I add it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: I guess my post shouldn't be in here, since I'm just using ArcObjects that come with Server 10.1, but we'll see!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2012 21:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514814#M2652</guid>
      <dc:creator>JustinHunter</dc:creator>
      <dc:date>2012-09-09T21:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514815#M2653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;All,&lt;BR /&gt;&lt;BR /&gt;I have the need to create a FeatureLayer (local or not) and gain access to its Features --without the use of a Map--.&amp;nbsp; I haven't been successful.&amp;nbsp; The following steps are what I assumed would work:&lt;BR /&gt;&lt;BR /&gt;1.&amp;nbsp; Create a LocalFeatureService.&lt;BR /&gt;2.&amp;nbsp; Point it towards a valid MapPackage file.&lt;BR /&gt;3.&amp;nbsp; Start the Service.&lt;BR /&gt;4.&amp;nbsp; On StartCompleted -&amp;gt; Create a LocalFeatureLayer.&lt;BR /&gt;5.&amp;nbsp; Give the LocalFeatureLayer the 'Service' and a valid 'LayerName' (a corresponding, editable layer within the MapPackage).&lt;BR /&gt;6.&amp;nbsp; Initialize the Layer.&lt;BR /&gt;7.&amp;nbsp; OnInitialized -&amp;gt; Call ::Update() on the layer.&lt;BR /&gt;8.&amp;nbsp; Cast to GraphicsLayer.&lt;BR /&gt;9.&amp;nbsp; Get the Graphics Collection.&lt;BR /&gt;&lt;BR /&gt;I assumed I would see all the Features within the Layer as graphics; I don't (its count = 0).&lt;BR /&gt;&lt;BR /&gt;NOTE:&amp;nbsp; If the LocalFeatureLayer is created and given to a map it will have a valid Graphics Collection.&lt;BR /&gt;&lt;BR /&gt;Does anyone see another way around this??&lt;BR /&gt;&lt;BR /&gt;-Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.QueryTask.html"&gt;QueryTask &lt;/A&gt;&lt;SPAN&gt;to work directly with the map service without the map. I have been using this approach in many cases (well, mainly in Windows Phone projects but nonetheless). I might be a bit old fashioned but I like to work directly with the features when they are the only that I need. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Check &lt;/SPAN&gt;&lt;STRONG&gt;ArcGIS Runtime SDK for WPF samples&lt;/STRONG&gt;&lt;SPAN&gt; / &lt;/SPAN&gt;&lt;STRONG&gt;Search / QueryTask &lt;/STRONG&gt;&lt;SPAN&gt;category to give a starting point. &lt;/SPAN&gt;&lt;STRONG&gt;Query only &lt;/STRONG&gt;&lt;SPAN&gt;is good place to start.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 04:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514815#M2653</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2012-09-10T04:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514816#M2654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Antti,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the query task to query against my feature service, I am able to retrieve a FeatureSet collection that contains all the features that match my query, but from this point I am not able to do anything with them. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My goal is to delete the features returned by my query, but I am not able to get them into a FeatureLayer so that I can edit. If I add the results to a feature layer, and then delete them from the feature layer, no edits are registered, as the feature layer is in the same state as before I started. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any advice I might try to accomplish my goal of deleting the features from the feature service without first adding them to a map control?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Patric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 05:55:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514816#M2654</guid>
      <dc:creator>PatricTrollope</dc:creator>
      <dc:date>2012-09-10T05:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514817#M2655</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;Your workflow is almost right. You can work with FeatureLayers / ArcGISLocalFeatureLayers without adding them to the map. The main difference when not adding the layer to the map is that you should use Snapshot instead of the default mode, OnDemand, which uses the map extent to request features. Snapshot mode gets a snapshot of all features or all available features up to the service imposed limit (determined by the service published when using ArcGIS for Server or you can set this for local feature services). For more info see &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer+QueryMode.html"&gt;http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer+QueryMode.html&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It�??s also worth noting the different behaviour of the following methods:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;.Update() = Selections and unsaved edits will be lost on Update. Performs a new refreshed query against the service and refreshes the graphics layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.SaveEdits() = Save edits to the layer. Only required if AutoSave is false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.Refresh() = Forces a full redraw of all graphic features but does not affect selections or unsaved edits.&lt;/SPAN&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>Mon, 10 Sep 2012 07:40:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514817#M2655</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2012-09-10T07:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514818#M2656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mike,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the feedback, I have tried it but I seem to be getting conflicting information to what you provide.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the documentation, the default mode is Snapshot:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~Mode.html"&gt;http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.FeatureLayer~Mode.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Gets or sets the selection mode. Default is Snapshot mode. If Where is specified, mode becomes Snapshot.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regardless, I tried to set the query mode explicitly, with the same results - the graphics collection is empty &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is the code I use to create my feature layer object, perhaps you will see something that I am doing wrong...?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FeatureLayer myFeatureLayer = new FeatureLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://myserver.com/arcgis/rest/services/myproject/test_service/FeatureServer/0" rel="nofollow" target="_blank"&gt;http://myserver.com/arcgis/rest/services/myproject/test_service/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID = "TestEdit",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mode = FeatureLayer.QueryMode.Snapshot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.Initialized += new System.EventHandler&amp;lt;System.EventArgs&amp;gt;(myFeatureLayer_Initialized);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.InitializationFailed += new System.EventHandler&amp;lt;System.EventArgs&amp;gt;(myFeatureLayer_InitializationFailed);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.Initialize();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my myFeatureLayer_Initialized() method I then cast the sent object to a feature layer and a graphics layer and use a control break to inspect both objects, and the graphics collection is empty...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void myFeatureLayer_Initialized(object sender, System.EventArgs e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureLayer = sender as FeatureLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphicsLayer = featureLayer as GraphicsLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once again thanks for taking the time to respond.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Patric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 08:47:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514818#M2656</guid>
      <dc:creator>PatricTrollope</dc:creator>
      <dc:date>2012-09-10T08:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514819#M2657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This should work in your case:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private FeatureLayer myFeatureLayer;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public MainWindowViewModel()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer = new FeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url = "YourAddRess",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID = "TestEdit",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mode = FeatureLayer.QueryMode.Snapshot,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.Initialized += this.myFeatureLayer_Initialized;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.InitializationFailed += this.myFeatureLayer_InitializationFailed;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.UpdateCompleted += MyFeatureLayerOnUpdateCompleted;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.Initialize();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void MyFeatureLayerOnUpdateCompleted(object sender, EventArgs eventArgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Magic here.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void myFeatureLayer_InitializationFailed(object sender, System.EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void myFeatureLayer_Initialized(object sender, System.EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myFeatureLayer.Update();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
 &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: Another solution is to use ArcGIS Server Rest API directly within your application but if you go that road, you need to write a lot of code more than in this approach.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514819#M2657</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2021-12-11T22:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514820#M2658</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;As Antti posted - you need to make sure that after the layer has initialized you're calling the Update() method on the layer and handling the UpdateCompleted event. At that point the layer should be populated with features.&lt;/SPAN&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>Mon, 10 Sep 2012 11:49:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514820#M2658</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2012-09-10T11:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514821#M2659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm still not having any luck following these examples.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's an example of what I'm looking to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;FeatureLayer layer = new FeatureLayer();
layer.Url = "http://localhost:6080/arcgis/rest/services/QueryMap/FeatureServer/0";
layer.Where = "1=1"; // Hard-coded for now, until we can retrieve results
layer.Mode = FeatureLayer.QueryMode.SelectionOnly;
layer.OutFields = new OutFields() { "*" };
layer.Initialized += FeatureLayer_Initialized;
layer.Initialize();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have my breakpoint in FeatureLayer_Initialized and everything up until then. I have yet to come across the layer where the graphics count has been &amp;gt; 0 other than when I add the feature directly to my map, which isn't an option in the long run because this is going to be a class library.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have noted there is a 'SelectedGraphics' but that is also 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My work around so far has been to not use the SDK/API tools given to me but instead directly query my REST service through an HttpRequest and parsing the HttpResponse to figure out if that feature exists, and then again use the REST add/update feature necessary, depending on my query results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Though I've found this somewhat speedier, I'd still like to know a way to do this through the tools given.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all the help so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: After seeing mbranscomb's post, I added .Update() to the layer in the FeatureLayer_Initialized event handler, but never does my breakpoint hit inside my layer_UpdateCompleted or layer_UpdateCompleted events. Am I not putting the .Update() in the right spot? There is no where that I can see it become IsInitialized=true before my code execution ends.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:29:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514821#M2659</guid>
      <dc:creator>JustinHunter</dc:creator>
      <dc:date>2021-12-11T22:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514822#M2660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm still not having any luck following these examples.&lt;BR /&gt;&lt;BR /&gt;Here's an example of what I'm looking to do:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;FeatureLayer layer = new FeatureLayer();
layer.Url = "http://localhost:6080/arcgis/rest/services/QueryMap/FeatureServer/0";
layer.Where = "1=1"; // Hard-coded for now, until we can retrieve results
layer.Mode = FeatureLayer.QueryMode.SelectionOnly;
layer.OutFields = new OutFields() { "*" };
layer.Initialized += FeatureLayer_Initialized;
layer.Initialize();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I have my breakpoint in FeatureLayer_Initialized and everything up until then. I have yet to come across the layer where the graphics count has been &amp;gt; 0 other than when I add the feature directly to my map, which isn't an option in the long run because this is going to be a class library.&lt;BR /&gt;&lt;BR /&gt;I have noted there is a 'SelectedGraphics' but that is also 0.&lt;BR /&gt;&lt;BR /&gt;My work around so far has been to not use the SDK/API tools given to me but instead directly query my REST service through an HttpRequest and parsing the HttpResponse to figure out if that feature exists, and then again use the REST add/update feature necessary, depending on my query results.&lt;BR /&gt;&lt;BR /&gt;Though I've found this somewhat speedier, I'd still like to know a way to do this through the tools given.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the help so far.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As Mike pointed earlier in this thread, use &lt;/SPAN&gt;&lt;SPAN style="color: #3E3E3E; font-family: Courier New;"&gt; FeatureLayer.QueryMode.Snapshot&lt;/SPAN&gt;&lt;SPAN&gt; as a Mode. You can see how to initialize layer from my previous post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514822#M2660</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2021-12-11T22:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514823#M2661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It worked! Sorry about the confusion, I thought I read SelectionOnly as the mode to use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I call .Update() inside my FeatureLayer_Initialized my next breakpoint brings me into my layer_UpdateCompleted! When I look at my (sender as FeatureLayer).Graphics.Count I get me 1000, which is the limit that my server will return to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much for this. :)!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 12:01:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514823#M2661</guid>
      <dc:creator>JustinHunter</dc:creator>
      <dc:date>2012-09-10T12:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514824#M2662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Mike.&amp;nbsp; Working like a charm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone wants my code I can push it out ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 03:43:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514824#M2662</guid>
      <dc:creator>MikeShaw</dc:creator>
      <dc:date>2012-09-11T03:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer has no graphics collection unless I give it to the Map ...</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514825#M2663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Confirmed, works perfectly! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all for your time and assistance, it is very much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Patric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 06:56:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/featurelayer-has-no-graphics-collection-unless-i/m-p/514825#M2663</guid>
      <dc:creator>PatricTrollope</dc:creator>
      <dc:date>2012-09-11T06:56:22Z</dc:date>
    </item>
  </channel>
</rss>

