|
POST
|
This seems to be a limitation on WPF Browser Application as discussed in this link http://www.netframeworkdev.com/windows-presentation-foundation-wpf/problem-with-popup-bakground-in-xbap-application-77838.shtml I tried creating a popup outside our API and followed the suggestion of setting AllowsTransparency to False and explicitly setting a Background. However, when Background is set to {x:Null} or Transparent, the background remains black. It only accepted Background when set to "White" or other colors.
<Grid>
<ToggleButton x:Name="ShowPopup" Content="ShowPopup" VerticalAlignment="Top" HorizontalAlignment="Center"/>
<Popup AllowsTransparency="False" PlacementTarget="{Binding ElementName=ShowPopup}" Placement="Relative" IsOpen="{Binding ElementName=ShowPopup, Path=IsChecked}" Opened="Popup_Opened">
<Popup.Child>
<Border Background="{x:Null}">
<TextBlock Text="Test"/>
</Border>
</Popup.Child>
</Popup>
</Grid>
Due to this limitation, we also cannot support it at this time.
... View more
10-04-2010
03:03 PM
|
0
|
0
|
1022
|
|
POST
|
I think you are referring to one of the bugs we fixed for 2.1. But just to clarify, are you using Editor or EditorWidget to make your selection? What Mode is your layer set? When you make your selection and it fails to unselect features, could it be because no new selection is made on that specific layer? To answer your question though -there are several events you can tap into to find out if new features are selected (i.e. layer's PropertyChanged event where e.PropertyName == "SelectedGraphics" or "SelectionCount", editor's EditCompleted event where e.Action == Editor.EditAction.Select). At any point, you can iterate through the Graphics to verify that the graphic's Selected property is set to true/false. If you need to unselect the graphic, you can do either: graphic.Selected = false or graphic.UnSelect(). There is no need to change the Renderer for this purpose. Setting SelectionColor property on the layer only dictates how the feature will be displayed when selected. It would be great if you can give us more information on how to reproduce the issue so we can determine if this is the bug we fixed or if it is separate. Let us know the steps you've taken when you find that features are supposed to be deselected but they are not. Thank you.
... View more
10-04-2010
02:04 PM
|
0
|
0
|
364
|
|
POST
|
I cannot reproduce this. Do you mind sharing more information? Maybe a screenshot? I'm using the sample from our SDK http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowCoordinatesBehavior and tried it with SL4, WPF4, and WPF3.5 projects, and none of them have a Background set to Black (kindly see attached image). By default ShowCoordinatesBehavior template has 2 TextBlocks (one with Black Foreground and the other with White Foreground that appears like an outline). This template does not set Background property and it also cannot be modified.
... View more
10-04-2010
01:09 PM
|
0
|
0
|
1022
|
|
POST
|
You did not do anything wrong. If you also subscribe to Initialized event, you will also notice that the ArcGISDynamicMapServiceLayer went through the initialization process, thereby setting IsInitialized property to true. This property only tells you that the layer has attempted to initialize. If there were any error during this stage, the layer's InitializationFailure will not be null. You can test this by setting an invalid URL.
... View more
10-04-2010
01:02 PM
|
0
|
0
|
940
|
|
POST
|
You may want to visit the following forum posts: http://forums.arcgis.com/threads/11825-Change-map-contrast-brightness http://forums.arcgis.com/threads/6470-Opacity-on-a-Layer-level-vs-Service-Level
... View more
10-04-2010
12:16 PM
|
0
|
0
|
422
|
|
POST
|
You say that the NullRef exception occurs in this line, right? ArcGISTiledMapServiceLayer arcgisLayer = _Parent.MyMap.Layers["AGOLayer"] as ArcGISTiledMapServiceLayer; Can you check if _Parent is not null? I don't see _Parent defined in your XAML. It's best to check this while debugging. Check also that none of these values are null: _Parent.MyMap _Parent.MyMap.Layers _Parent.MyMap.Layers contains a layer with ID "AGOLayer" and _Parent.MyMap.Layers["AGOLayer"] is ArcGISTiledMapServiceLayer
... View more
10-04-2010
11:40 AM
|
0
|
0
|
869
|
|
POST
|
Oh right. Thank you for your post. This bug is fixed in version 2.1.
... View more
10-04-2010
11:31 AM
|
0
|
0
|
791
|
|
POST
|
You are right. Thank you for your post. This is a bug.
... View more
10-02-2010
03:10 PM
|
0
|
0
|
363
|
|
POST
|
In a FeatureLayer Update() will re-query the data underlying your feature layer. If layer or table contents have changed on the server, you can call this method to see changes in the feature layer on the client. Note, you may need to disable client caching. You are right, selections and unsaved edits will be lost on Update. Refresh() on dynamic layer will re-draw the layer at the current view/extent.
... View more
10-02-2010
02:45 PM
|
0
|
0
|
1257
|
|
POST
|
What are you trying to do, always rotate by 90 degrees? Setting Rotation="90" is for the initial map rotation.
... View more
10-02-2010
02:30 PM
|
0
|
0
|
791
|
|
POST
|
You just need to some pieces in your code: In XAML, change MouseClick="QueryPoint_MouseClick" to MouseRightButtonDown="QueryPoint_MouseClick" In code-behind, change private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e) { ESRI.ArcGIS.Client.Geometry.MapPoint clickPoint = e.MapPoint; to private void QueryPoint_MouseClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { e.Handled = true; // to get rid of the default "Silverlight" Context Menu. ESRI.ArcGIS.Client.Geometry.MapPoint clickPoint = this.MyMap.ScreenToMap(e.GetPosition(MyMap)); rest of the code can stay the same.
... View more
10-02-2010
02:21 PM
|
0
|
0
|
1469
|
|
POST
|
If you can submit geoprocessing task outside your SL app and still get the same odd behavior of the task completing successfully without applying the supposed updates, you might get better response from ArcGIS Desktop team. I can only guess that there's something wrong with the model you published or maybe the input parameters were incorrect but you say that task completes successfully too so it's really hard to guess. Do you also subscribe to Failed event? You can also use Fiddler to see what requests/response are exchanged between the browser and your service.
... View more
10-02-2010
02:00 PM
|
0
|
0
|
332
|
|
POST
|
If you wish to return all records, you can update your query's Where clause to "1=1". This is similar to performing the query outside of SL, through the browser like so: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/LandusePlanning/MapServer/0/query?text=&geometry=&geometryType=esriGeometryPoint&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&objectIds=&where=1%3D1&time=&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outSR=&outFields=&f=html
... View more
09-29-2010
04:52 PM
|
0
|
0
|
615
|
|
POST
|
One way of achieving this is to create your own class MyLayerInfo with additional property IsVisible, using an ObservableCollection of this type as ItemsSource for your listbox, and adding a method that updates IsVisible property by checking dynamic layer's VisibleLayers. Xaml-code: (update ListBox)
<ListBox x:Name="SubLayerListBox" Margin="0,5,0,0"
Grid.Row="1">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Margin="2"
Name="DynamicLayerCalifornia"
Content="{Binding LayerInfo.Name}"
IsChecked="{Binding IsVisible}"
Tag="{Binding LayerInfo.ID}"
ClickMode="Press"
Click="CheckBox_Click" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Code-behind: (update ListBox' ItemsSource)
ObservableCollection<MyLayerInfo> MySubLayers = new ObservableCollection<MyLayerInfo>();
public SubLayerList()
{
InitializeComponent();
this.SubLayerListBox.ItemsSource = MySubLayers;
}
private void ArcGISDynamicMapServiceLayer_Initialized(object sender, EventArgs e)
{
ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer dynamicServiceLayer =
sender as ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer;
foreach (LayerInfo l in dynamicServiceLayer.Layers)
MySubLayers.Add(new MyLayerInfo(l));
if (dynamicServiceLayer.VisibleLayers == null)
dynamicServiceLayer.VisibleLayers = GetDefaultVisibleLayers(dynamicServiceLayer);
UpdateIsVisibleProperty(dynamicServiceLayer.VisibleLayers.ToList());
}
//TODO: call this method everytime dynamicServiceLayer.VisibleLayers is updated
private void UpdateIsVisibleProperty(List<int> visibleLayerList)
{
foreach (MyLayerInfo info in MySubLayers)
info.IsVisible = visibleLayerList.Contains(info.LayerInfo.ID);
}
public class MyLayerInfo : INotifyPropertyChanged
{
public MyLayerInfo(LayerInfo info)
{
LayerInfo = info;
}
private LayerInfo layerInfo;
public LayerInfo LayerInfo
{
get { return layerInfo; }
set
{
if (layerInfo != value)
{
layerInfo = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("LayerInfo"));
}
}
}
bool isVisible;
public bool IsVisible
{
get { return isVisible; }
set
{
if (isVisible != value)
{
isVisible = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("IsVisible"));
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
... View more
09-29-2010
02:25 PM
|
0
|
0
|
1090
|
| 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
|