Trace Geometric Network

The sample uses a Geoprocessing Package which contains a Model involving the Trace Geometric Network (Data Management) geoprocessing tool to perform an upstream trace from the "incident location" to determine the affected water distribution mains and system valves.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.TraceGeometricNetwork"
             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">
    <Grid x:Name="MainGrid">
        <Grid.Resources>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
            <esri:PictureMarkerSymbol x:Key="IncidentMarkerSymbol" Source="/Assets/Images/Incident_48x48.png" Width="48" Height="48" OffsetX="18" OffsetY="40"/>
            <esri:PictureMarkerSymbol x:Key="ValveMarkerSymbol" Source="/Assets/Images/Valve_48x48.png" Width="48" Height="48" OffsetX="24" OffsetY="24"/>
        </Grid.Resources>  
        <esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" Extent="-9552200, 3812271, -9550728 , 3813197">
            <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" 
                  Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" InitializationFailed="ArcGISTiledMapServiceLayer_InitializationFailed"/>
        </esri:Map>

        <Border HorizontalAlignment="Right" Background="White" VerticalAlignment="Top" 
                Margin="15" MinHeight="50" 
                BorderBrush="Black" BorderThickness="1">
            <Border.Effect>
                <DropShadowEffect/>
            </Border.Effect>
            <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="5" >
                <TextBlock FontSize="18" HorizontalAlignment="Center" >
                    Click to perform an upstream trace <LineBreak/>on the geometric network.
                </TextBlock>
                <Button x:Name="TraceUpstreamButton" Content="Trace Network" IsEnabled="False" 
                        Width="160" Margin="5" FontSize="18"
                        HorizontalAlignment="Center" Click="TraceUpstreamButton_Click" />
            </StackPanel>
        </Border>
        <ProgressBar x:Name="MyProgressBar" IsIndeterminate="True" VerticalAlignment="Bottom" Width="200" Height="20" Margin="10" Visibility="{Binding Path=IsBusy, Converter={StaticResource BooleanToVisibilityConverter}}"></ProgressBar>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014