|
POST
|
<ScrollBar x:Name="HorizontalScrollBar" Grid.Column="0" Height="15" IsTabStop="False" Maximum="{TemplateBinding ScrollableWidth}" Margin="-1,0,-1,-1" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="Visible" Value="{TemplateBinding HorizontalOffset}" ViewportSize="{TemplateBinding ViewportWidth}"/> There is not an "Auto" value allowed in this context. You have to set HorizontalScrollBarVisibility="Auto" on the ScrollViewer (not on the ScrollBar) <ScrollViewer Style="{StaticResource CustomScrollViewerStyle}" IsTabStop="False" Background="{x:Null}" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"> <ContentPresenter x:Name="ContentPresenter" Margin="12,12,6,12"/> </ScrollViewer>
... View more
06-27-2012
11:29 PM
|
0
|
0
|
1472
|
|
POST
|
For the graphicslayer I used the above procedure, but it seems to reset itself to what it was before I apply the templated symbology. Are you adding the features in a graphicsLayer that is in fact a FeatureLayer? That might explain why features coming from the server and features added by code are mixed. If your graphicsLayer is just a simple graphicslayer with features added by code, I still don't get what you mean by 'it seems to reset itself to what it was before I apply the templated symbology'. A graphicsLayer don't know anything about the symbology defined at server side so the only symbology that can be used by a graphicslayer is the symbology that you defined by code or XAML.
... View more
06-27-2012
11:23 PM
|
0
|
0
|
997
|
|
POST
|
The simplest way is to add the bing layer in the map by code after getting the token. it's done that way in the bing samples. The problem with the event Map.Loaded is that the layers are already on the way to initializating and the initialization fails if the token is wrong or not set.
... View more
06-27-2012
11:14 PM
|
0
|
0
|
782
|
|
POST
|
To get result in feet, you also need to change this binding : Width="{Binding MetricSize, RelativeSource={RelativeSource TemplatedParent}}"> from MetricSize to USSize. Did you do it?
... View more
06-27-2012
12:30 AM
|
0
|
0
|
1687
|
|
POST
|
You can look at how are displayed the relationships with this sample : http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSPetro/MapServer If you click on one layer, you will see a description of the relationships for that layer.
... View more
06-27-2012
12:25 AM
|
0
|
0
|
1092
|
|
POST
|
Yes it's possible to edit features from ArcGIS API for Silverlight verion 2.0. But at the server side, you also need a featureservice which is availbale from ArcGIS server 10.0.
... View more
06-27-2012
12:22 AM
|
0
|
0
|
1087
|
|
POST
|
You can't access by code to inner elements of a control template. All you can do by code is to manipulate your control template as a string and then create the controltemplate object using XamlReader.
... View more
06-27-2012
12:15 AM
|
0
|
0
|
723
|
|
POST
|
I have upgraded our test instance of ArcGIS for Server to the release version 10.1. It's more depending on the ArcGIS for SL version. Check that you have the latest 3.0 version (3.0.0.388)
... View more
06-27-2012
12:13 AM
|
0
|
0
|
424
|
|
POST
|
But then it resets itself to what it was before the templated custom symbol is applied. What do you mean by 'then'? Is it due to a user action or to the execution of another code? I don't understand either what you mean by 'what it was before the templated custom symbol is applied' ? Your graphics seem directly created with your custom symbol.
... View more
06-27-2012
12:12 AM
|
0
|
0
|
997
|
|
POST
|
Thank you very much Dominique, that worked... why? (if you've got the time to answer) Because due to the authorization error, the layers the user has no access fail to initialize and so the application crashes if you don't handle this failure on InitializationFailed event.
... View more
06-25-2012
09:50 AM
|
0
|
0
|
465
|
|
POST
|
You can use PagedCollectionView.SortDescription as well and set it on event AutoGeneratingColumns. Something like: MyDataGrid.AutoGeneratingColumn += (e, args) =>
{
if (args.PropertyName.Equals("OBJECTID"))
{
var pagedCollectionView = MyDataGrid.ItemsSource as PagedCollectionView;
if (pagedCollectionView != null)
pagedCollectionView.SortDescriptions.Add(new SortDescription(args.PropertyName, ListSortDirection.Ascending));
}
};
... View more
06-25-2012
09:49 AM
|
0
|
0
|
512
|
|
POST
|
Did you set an InitializationFailed handler for all your layers?
... View more
06-25-2012
06:51 AM
|
0
|
0
|
465
|
|
POST
|
I don't know if it's a bug but by default the HorizontalScrollbarVisibility is not visible. To change that you have to retemplate the FeatureDataForm. You can use Expression Blend and right-click on your FeatureDataForm and select "Edit Template" --> "Edit a copy...", then you will get the default control template. Look for the ScrollViewer and add HorizontalScrollBarVisibility="Auto"
... View more
06-25-2012
12:13 AM
|
0
|
0
|
1472
|
|
POST
|
You are right, unfortunately GraphicsLayer has no SelectionColor property. The way to do it is by defining your own symbols with 'Selected' selectionStates. As sample, here is how the X feature symbol is defined:
<ControlTemplate x:Key="FS_SimpleMarkerSymbol_X">
<Path x:Name="Ex"
Stretch="Fill"
Data="M0,1 L1,0 2,1 3,0 4,1 3,2 4,3 3,4 2,3 1,4 0,3 1,2 Z"
Width="{Binding Symbol.Size}"
Height="{Binding Symbol.Size}"
RenderTransformOrigin="{Binding Symbol.RenderTransformPoint}"
Fill="{Binding Symbol.Color}"
Stroke="{Binding Symbol.OutlineColor}"
StrokeThickness="{Binding Symbol.OutlineThickness}"
StrokeDashArray="{Binding Symbol.OutlineStyle, Converter={StaticResource DashArrayConverter}}"
StrokeLineJoin="Round">
<Path.RenderTransform>
<RotateTransform Angle="{Binding Symbol.Angle}"/>
</Path.RenderTransform>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected" />
<VisualState x:Name="Selected">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Ex"
Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{Binding Symbol.SelectionColor}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Path>
</ControlTemplate>
... View more
06-25-2012
12:00 AM
|
0
|
0
|
621
|
|
POST
|
One way would be to bind Tag to the SubLayerID Right. Or get the layerId directly by code without any binding: private void TextBlock_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
TextBlock textSender = (TextBlock)sender;
string layerName = textSender.Text;
var layerId = (textSender.DataContext as LayerItemViewModel).SubLayerId;
}
... View more
06-24-2012
11:46 PM
|
0
|
0
|
887
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|