hi, I'm having some trouble getting a time slider to work. I'm trying to create a very simple time slider with 5 rasters having the same map extent, representing conditions in 5 different years (2020, 2040, 2060, 2080, 2100). Just want a time slider with 20 year intervals (i.e. beginning and end with 3 tic marks in between) displaying those rasters for those 5 years. So I followed the basic steps: created TIF images and added them to a mosaic dataset, added a date type field to the mosaic dataset and put in the dates, time-enabled it and set the start time field in ArcCatalog. Then I published an image service from that. When I run the application, I see a time slider with the proper time extent but there are no play/forward/backward buttons and no tic marks; the thumb can be placed anywhere on the timeline and rasters only display when I place it at the beginning or end of the timeline. It seems there's something wrong with the code-behind that has the intervals information. Really appreciate any tips..My XAML come straight from the sample:<!-- TIME SLIDER (from sample Time Slider) -->
<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" >
<Rectangle Fill="#77919191" Stroke="Gray" RadiusX="10" RadiusY="10" Margin="0,0,0,5" >
<Rectangle.Effect>
<DropShadowEffect/>
</Rectangle.Effect>
</Rectangle>
<Border Background="#FFFFFFFF" BorderBrush="DarkGray" CornerRadius="5" Margin="10,10,10,15"
Width="250" HorizontalAlignment="Center" VerticalAlignment="Top" >
<StackPanel Margin="5">
<StackPanel HorizontalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="16" Text="Sea Level Rise" />
</StackPanel>
<StackPanel DataContext="{Binding ElementName=MyTimeSlider, Path=Value}"
Orientation="Horizontal" Margin="5" HorizontalAlignment="Center">
</StackPanel>
<esri:TimeSlider x:Name="MyTimeSlider"
Loaded="MyTimeSlider_Loaded"
TimeMode="TimeInstant"
Height="20"
MinimumValue="{Binding ElementName=SeaLevelRiseMap, Path=Layers[9].TimeExtent.Start, Mode=OneWay}"
MaximumValue="{Binding ElementName=SeaLevelRiseMap, Path=Layers[9].TimeExtent.End, Mode=OneWay}"
Value="{Binding ElementName=SeaLevelRiseMap, Path=Layers[9].TimeExtent, Mode=OneWay}">
</esri:TimeSlider>
</StackPanel>
</Border>
</Grid>
And my code-behind: private void MyTimeSlider_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
List<DateTime> intervals = new List<DateTime>();
DateTime dt = MyTimeSlider.MinimumValue;
while (dt < MyTimeSlider.MaximumValue)
{
intervals.Add(dt);
dt = dt.AddYears(20);
}
MyTimeSlider.Intervals = intervals;
}
Thanks much for any help...Dan