This sample demonstrates using an ESRI.ArcGIS.Client.Tasks
QueryTask class to Query an ArcGISImageServiceLayer to find and
display the outlines of image tiles and display them as
SimpleFillSymbols in a GraphicsLayer. MapTips containing attribute
information is displayed for those tiles that are returned from the
Query when the mouse is hovered over them. To use this sample, drag
a rectangle to query image tiles. Tile footprints will be displayed
and their attributes will be available in map tips.
<UserControlx:Class="ArcGISWPFSDK.QueryImageService"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:esri="http://schemas.esri.com/arcgis/client/2009"xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"><Gridx:Name="LayoutRoot"Background="White"><Grid.Resources><esri:SimpleFillSymbolx:Key="DrawFillSymbol"BorderBrush="Red"Fill="#33FF0000"/><esri:SimpleFillSymbolx:Key="FootprintFillSymbol"Fill="#01FFFFFF"BorderBrush="White"BorderThickness="2"/><LinearGradientBrushx:Key="PanelGradient"EndPoint="0.5,1"StartPoint="0.5,0"><LinearGradientBrush.RelativeTransform><TransformGroup><ScaleTransformCenterY="0.5"CenterX="0.5"/><SkewTransformCenterY="0.5"CenterX="0.5"/><RotateTransformAngle="176"CenterY="0.5"CenterX="0.5"/><TranslateTransform/></TransformGroup></LinearGradientBrush.RelativeTransform><GradientStopColor="#FF145787"Offset="0.16"/><GradientStopColor="#FF3D7FAC"Offset="0.502"/><GradientStopColor="#FF88C5EF"Offset="0.984"/></LinearGradientBrush></Grid.Resources><esri:Mapx:Name="MyMap"MinimumResolution="0.001"WrapAround="True"><esri:Map.Extent><esri:EnvelopeXMin="-13670997.592674"YMin="5697204.89662362"XMax="-13637149.3323152"YMax="5714270.45407472"><esri:Envelope.SpatialReference><esri:SpatialReferenceWKID="102100"/></esri:Envelope.SpatialReference></esri:Envelope></esri:Map.Extent><esri:ArcGISImageServiceLayerID="ImageServiceLayer"Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Portland/Aerial/ImageServer"ImageFormat="JPGPNG"/><esri:ArcGISTiledMapServiceLayerOpacity="100"Url="http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer"/><esri:GraphicsLayerID="FootprintsGraphicsLayer"><esri:GraphicsLayer.MapTip><BorderCornerRadius="10"BorderBrush="#FF222957"Background="LightGray"BorderThickness="2"Margin="0,0,15,15"><StackPanelOrientation="Vertical"Margin="5"><StackPanelOrientation="Horizontal"><TextBlockText="Name: "FontWeight="Bold"Foreground="Black"/><TextBlockText="{Binding [Name]}"Foreground="Black"/></StackPanel><StackPanelOrientation="Horizontal"><TextBlockText="Pixel Size (meters/pixel): "Foreground="Black"/><TextBlockText="{Binding [LowPS]}"Foreground="Black"/></StackPanel></StackPanel></Border></esri:GraphicsLayer.MapTip></esri:GraphicsLayer></esri:Map><GridHorizontalAlignment="Right"VerticalAlignment="Top"Margin="0,10,10,0"><RectangleFill="{StaticResource PanelGradient}"Stroke="Gray"RadiusX="10"RadiusY="10"Margin="0,0,0,5"><Rectangle.Effect><DropShadowEffect/></Rectangle.Effect></Rectangle><RectangleFill="#FFFFFFFF"Stroke="DarkGray"RadiusX="5"RadiusY="5"Margin="10,10,10,15"/><StackPanelOrientation="Vertical"Margin="30,20,20,30"><TextBlockx:Name="ResponseTextBlock"Text="Drag a rectangle to query image tiles. Tile footprints will be displayed and their attributes will be available in map tips."Width="200"TextAlignment="Left"TextWrapping="Wrap"Foreground="Black"/><ButtonContent="Clear Results"Margin="0,5,5,0"Click="ClearButton_Click"/></StackPanel></Grid></Grid></UserControl>