|
POST
|
It's hard to tell without knowing the error message or stack trace. Could you share your code? Thanks.
... View more
09-08-2010
07:33 PM
|
0
|
0
|
1314
|
|
POST
|
Please try to use Fiddler as explained in this blog post:http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx
... View more
09-08-2010
07:30 PM
|
0
|
0
|
1050
|
|
POST
|
Kindly refer to this forum post: http://forums.arcgis.com/threads/9868-Bind-graphics-of-GraphicLayer.-Bind-GraphicCollection
... View more
09-07-2010
08:11 PM
|
0
|
0
|
307
|
|
POST
|
If you look at the TemplatePicker's DefaultStyle, it's ItemTemplate's DataTemplate is a Button that uses Command, which dictates when the button will be enabled. If you will be using your own function to determine when these buttons are enabled, maybe you don't need a TemplatePicker?
... View more
09-07-2010
01:52 PM
|
0
|
0
|
357
|
|
POST
|
Hi, I am not able to reproduce the problem. If I understood correctly, you need to replace the layer at run-time. I am using the following code: XAML
<Grid x:Name="LayoutRoot" Background="White">
<esri:Map x:Name="MyMap" ExtentChanged="MyMap_ExtentChanged">
<esri:ArcGISTiledMapServiceLayer Url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
</esri:Map>
<Button Content="Replace Layer" Click="Button_Click" VerticalAlignment="Top" HorizontalAlignment="Center"/>
</Grid>
Code-behind:
private void Button_Click(object sender, RoutedEventArgs e)
{
ArcGISDynamicMapServiceLayer dynamic = new ArcGISDynamicMapServiceLayer() { Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/MapServer" };
dynamic.Initialize();
ArcGISTiledMapServiceLayer tiledLayer = this.MyMap.Layers[0] as ArcGISTiledMapServiceLayer;
if (tiledLayer != null)
{
this.MyMap.Layers.Remove(tiledLayer);
this.MyMap.Layers.Add(dynamic);
}
}
private void MyMap_ExtentChanged(object sender, ESRI.ArcGIS.Client.ExtentEventArgs e)
{
// placed a breakpoint here to make sure the map's extent still get updated after replacing layer.
}
... View more
09-07-2010
01:27 PM
|
0
|
0
|
1314
|
|
POST
|
You can refer to this forum post re: Undo editshttp://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget Basically you will need to set the FeatureLayer's AutoSave property to false and subscribe to TemplatePicker's Template Editor EditCompleted event to have control over SaveEdits(). In the event handler, you will have the chance to check the graphic attributes prior to calling SaveEdits().
... View more
09-07-2010
01:06 PM
|
0
|
0
|
542
|
|
POST
|
Thank you for your post. We will mark this as defect. For the meantime, you can set the map's extent to be outside the layer's extent to avoid the features from being loaded.
... View more
09-07-2010
12:09 PM
|
0
|
0
|
395
|
|
POST
|
The feature layer has SelectedGraphics property. Instead of passing the graphic's geometry directly to your Spatial query, you can create an Envelope based on the SelectedGraphics' geometries. You can then use this Envelope for your query.
... View more
09-07-2010
11:48 AM
|
0
|
0
|
385
|
|
POST
|
You can use MouseEnter, MouseLeave events on your GraphicsLayer and mark the e.Graphic.Selected to true/false to select/unselect feature as you hover. If you do not want to affect the feature's selected property, you can add another GraphicsLayer that will always have one feature. In your MouseEnter, MouseLeave event handlers, instead of setting e.Graphic's selected property, you can simply add e.Graphic to the GraphicsLayer you just created. Be sure that this GraphicsLayer provide a different symbol for the graphic so that it can be identified on hover. You may use a renderer or set symbol on the new graphic instance.
... View more
09-07-2010
11:34 AM
|
0
|
0
|
1956
|
|
POST
|
This will be fixed in the next release of our API for SL/WPF.
... View more
08-27-2010
12:59 PM
|
0
|
0
|
1259
|
|
POST
|
Thank you for reporting this. AreaUnit binding was failing because the registered DependencyProperty name did not match the property name. We'll be sure to fix this. Thanks again. I tried similar code: XAML
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Orientation="Horizontal">
<ComboBox x:Name="DistanceUnitCB" />
<ComboBox x:Name="AreaUnitCB" />
<Button Content="Measure">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<esri:MeasureAction AreaUnit="{Binding ElementName=AreaUnitCB, Path=SelectedItem}" DisplayTotals="True" DistanceUnit="{Binding ElementName=DistanceUnitCB, Path=SelectedItem}" MapUnits="DecimalDegrees" MeasureMode="Polygon" FillSymbol="{StaticResource DefaultFillSymbol}" TargetName="MyMap" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
Code-behind:
public MainPage()
{
List<DistanceUnit> distanceUnits = new List<DistanceUnit>();
distanceUnits.Add(DistanceUnit.DecimalDegrees);
distanceUnits.Add(DistanceUnit.Feet);
distanceUnits.Add(DistanceUnit.Kilometers);
distanceUnits.Add(DistanceUnit.Meters);
distanceUnits.Add(DistanceUnit.Miles);
distanceUnits.Add(DistanceUnit.NauticalMiles);
distanceUnits.Add(DistanceUnit.Undefined);
distanceUnits.Add(DistanceUnit.Yards);
List<AreaUnit> areaUnits = new List<AreaUnit>();
areaUnits.Add(AreaUnit.Acres);
areaUnits.Add(AreaUnit.Hectares);
areaUnits.Add(AreaUnit.SquareFeet);
areaUnits.Add(AreaUnit.SquareKilometers);
areaUnits.Add(AreaUnit.SquareMeters);
areaUnits.Add(AreaUnit.SquareMiles);
areaUnits.Add(AreaUnit.Undefined);
InitializeComponent();
this.DistanceUnitCB.ItemsSource = distanceUnits;
this.DistanceUnitCB.SelectedIndex = 0;
this.AreaUnitCB.ItemsSource = areaUnits;
this.AreaUnitCB.SelectedIndex = 0;
}
... View more
08-27-2010
09:54 AM
|
0
|
0
|
1259
|
|
POST
|
AreaUnit in MeasureAction is also a DependencyProperty, which allows it to be bindable just as DistanceUnit. However, you cannot bind them to the same combobox because they take different enum values. Could this be the issue? If not, what error message do you get and can you share us your code? Thanks.
... View more
08-27-2010
06:25 AM
|
0
|
0
|
1259
|
|
POST
|
I think adding that code will just hide the reason for the compile error. Below is actually most helpful error message. Generate method stub for 'InitializeComponent' in 'SilverlightApplication_Web.SilverlightApplication _Web.MainPage' As you can see "SilverlightApplication_Web" was written twice. I suspect that your XAML only has one but in your code-behind, you may have defined this twice.
... View more
08-26-2010
07:41 PM
|
0
|
0
|
3212
|
|
POST
|
CodedValueDomain, FeatureSymbol and Relationships properties are only available in a FeatureLayer.
... View more
08-26-2010
07:33 PM
|
0
|
0
|
291
|
|
POST
|
This error usually occurs when the namespace for Xaml and Code-behind do not match. Have you tried building this in VS2010? Do you get the same compile error? Can you check that all project references are there (there should be warning icon next to them if they are not)? Can you also check project properties for namespace?
... View more
08-25-2010
08:56 PM
|
0
|
0
|
3212
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-11-2025 01:30 PM | |
| 1 | 06-06-2025 10:14 AM | |
| 1 | 03-17-2025 09:47 AM | |
| 1 | 07-24-2024 07:32 AM | |
| 1 | 04-05-2024 06:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-12-2026
09:38 AM
|