<?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: time slider displaying values from a field? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10596#M203</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can format the string in your binding statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Text="{Binding End, StringFormat='{}{0:yyyy}'"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also do it by code for adjusting the format to the most significative format.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did it it this &lt;/SPAN&gt;&lt;A href="http://broux.dominique.free.fr/Silverlight/InteractiveSDK/Default.htm#AutoTimeSliderSample"&gt;sample &lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2012 05:37:36 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2012-10-04T05:37:36Z</dc:date>
    <item>
      <title>time slider displaying values from a field?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10595#M202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a time slider and I'd like to display certain values in a text block as the time slider moves.&amp;nbsp; Each value is associated with a time stamp on the time slider.&amp;nbsp; So I've added a field to the mosaic dataset table associated with the time slider, and added the appropriate values within it.&amp;nbsp; But I'm not quite sure what the syntax is for binding this with the time slider.&amp;nbsp; I've been playing with the code below, which just displays the year of the time slider:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;lt;StackPanel DataContext="{Binding ElementName=CurrentTimeSlider, Path=Value}" Orientation="Horizontal" Margin="5" HorizontalAlignment="Center"&amp;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;lt;TextBlock Text="{Binding End.Year}" FontSize="12" /&amp;gt;
&amp;lt;/StackPanel&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Text that I want to display is within the TextBlock - does anyone know the syntax for what I set the Text equal to?&amp;nbsp; Do I need to change the DataContext as well?&amp;nbsp; Is this kind of binding even possible?&amp;nbsp; Thanks much, appreciate any help..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 19:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10595#M202</guid>
      <dc:creator>DanielSchatt</dc:creator>
      <dc:date>2012-10-03T19:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: time slider displaying values from a field?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10596#M203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can format the string in your binding statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;Text="{Binding End, StringFormat='{}{0:yyyy}'"&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also do it by code for adjusting the format to the most significative format.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did it it this &lt;/SPAN&gt;&lt;A href="http://broux.dominique.free.fr/Silverlight/InteractiveSDK/Default.htm#AutoTimeSliderSample"&gt;sample &lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 05:37:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10596#M203</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-10-04T05:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: time slider displaying values from a field?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10597#M204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks much Dominique, I don't know if I made myself clear, sorry.&amp;nbsp; I'm just not sure how to bind the time slider to another field that I've added in my mosaic dataset table in order to display the field's values.&amp;nbsp; How do I specify that particular field?&amp;nbsp; Quite honestly, I'm really in the dark here and I don't even understand what this "End" refers to in the Binding or how to use it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, for example, I have a raster "2020" that represents conditions in the year 2020 and which is one of the rasters displayed by the time slider.&amp;nbsp; That raster is one of the rasters in the mosaic dataset (and therefore the image service built from the mosaic dataset) that the time slider is based on.&amp;nbsp; I have added an integer field "Test" to the mosaic dataset table.&amp;nbsp; The "2020" raster has a "Test" value associated with it.&amp;nbsp; I'd like to display that "Test" value in a text block when the time slider displays the 2020 time, i.e. the 2020 raster.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I type "{Binding End.Test}"?&amp;nbsp; Or "{Binding Test}"?&amp;nbsp; Or "{Binding [Test]}"?&amp;nbsp; etc. I've tried all these and they don't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this clarifies, thanks so much for any tips...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 14:03:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10597#M204</guid>
      <dc:creator>DanielSchatt</dc:creator>
      <dc:date>2012-10-04T14:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: time slider displaying values from a field?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10598#M205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no direct answer to your quetion but I can just explain some points you highlighted:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I'm really in the dark here and I don't even understand what this "End" refers to in the Binding or how to use it. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;DataContext="{Binding ElementName=CurrentTimeSlider, Path=Value}" &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The datacontext of your stack panel is set to the 'Value' property of the TimeSlider.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This property is documented &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client.Toolkit~ESRI.ArcGIS.Client.Toolkit.TimeSlider~Value.html"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As you can see in the doc, this property is of type &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.TimeExtent.html"&gt;TimeExtent &lt;/A&gt;&lt;SPAN&gt;which has 2&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/silverlight-api/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.TimeExtent_properties.html"&gt; properties &lt;/A&gt;&lt;SPAN&gt;of type DateTime: Start and End.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So that explains why a binding such as &amp;lt;TextBlock Text="{Binding End}" FontSize="12" /&amp;gt; works and displays the end time of the timeslider current position (if your time slider is in 'Instant Mode' the start time will always be equal to the end time).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That explains also your result:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Do I type "{Binding End.Test}"? Or "{Binding Test}"? Or "{Binding [Test]}"? etc. I've tried all these and they don't work.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;You can't change that easily the existing types : TimeExtent and DateTime &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; (though you can change the display format as I explained in my first post)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you want to display new properties in the timeslider, one option is to create you own timeslider control subclassing the toolkit timeslider and add in this control the dependency properties you need (as I did in the sample I pointed out)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That being said, in your case, I am not sure you need to subclass the timeslider.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The info you need to display doesn't seem related to the time slider (it's more an info coming from service) and you are trying to display it outside of the timeslider. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, at first glance, I would say that you could:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- create a dependency property 'Test' in your user control&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- set this property with the value coming from your service (tho not sure how since it's depending on your context and I don't know much about mosaic dataset).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- bind a textblock inside your usercontrol to this dependency property&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 16:21:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10598#M205</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-10-04T16:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: time slider displaying values from a field?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10599#M206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks! Really appreciate the info, obviously this will be more involved than I thought.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 17:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/time-slider-displaying-values-from-a-field/m-p/10599#M206</guid>
      <dc:creator>DanielSchatt</dc:creator>
      <dc:date>2012-10-04T17:03:19Z</dc:date>
    </item>
  </channel>
</rss>

