POST
|
Thank you for your response, but I do not see it how this can help me. I would like to capture selected items from XAML, and I do not need to add more items in C#. Right now this line _strSelectedRoute = RoutesFound.SelectedValue.ToString(); captures a single selection, but I need to be able to capture multiple selection.
... View more
05-12-2015
12:05 PM
|
0
|
1
|
508
|
POST
|
I have two-step query: query 1 selects all routes for given school and displays route numbers in a ListBox. Query 2 allows for selecting one of routes from a ListBox. I am wondering how to select more than one route from a ListBox. So here is my ListBox: <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" > <TextBlock Text="Routes:" Width="100" TextAlignment="Left" Margin="5,5,-2,5"/> <ListBox x:Name="RoutesFound" Width="50" Margin="5" SelectionChanged="selectedRoute_SelectionChanged" SelectionMode="Extended" /> </StackPanel> private void selectedRoute_SelectionChanged(object sender, EventArgs e) { if (RoutesFound.SelectedIndex != -1) { _strSelectedRoute = RoutesFound.SelectedValue.ToString(); } _listSelectedRoutes.Add(_strSelectedRoute); } where I added SelectionMode ="Extended" with a hope that it will allow me for multiple selection, but this did not happen. I also tried to use SelectionMode ="Multiple", but without luck. Does anybody can suggest how to select multiple items from aListBox and capture them in a list?
... View more
05-08-2015
12:50 PM
|
0
|
3
|
4242
|
POST
|
I am looking for a way to compare values in my fieldA. Specifically I would like to compare my last value to the one in the row above. I used GetCount to know how many rows I have. So for example if GetCount returns that there is 10 rows, I would like to compare numeric values from row 10 and 9 in a fieldA. For some reason I have problem with accessing values with a specific index: I can access all values but not just one. I tried to modify code from http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000001q000000 with arcpy.da.SearchCursor(fc, ['fieldA',]) as cursor: for row in cursor: print(row) to something like with arcpy.da.SearchCursor(fc, ['fieldA',]) as cursor: for row in cursor: myValue=row[10] print (myValue) but it does not work. Did anybody figured out how to access just one specific value, not all of them?
... View more
03-27-2014
11:44 AM
|
0
|
6
|
2049
|
POST
|
I am using Visual Studio 2010 and I wanted to upgrade to Silverlight 5. According to the ArcGIS Resources: http://resources.arcgis.com/en/help/silverlight-api/concepts/index.html#//01660000000t000000 I need to install Expression Blend Preview for Silverlight 5, which does not exist on Microsoft website anymore. Does anyone know from where I can download it or have some experience with working in Visual Studio 2010 without it? Thank you!
... View more
10-16-2013
09:59 AM
|
0
|
1
|
1023
|
POST
|
I have a marker symbol with labels bind to the attributes of my feature class. Is there any way to define in a code scale dependency for labels only? In some cases I have more than one feature in the same spatial location and their labels overlap. Can/how I use in a code label placement properties to solve this issue? I am using ArcGIS 10.0 and Silverlight API 2.4. Thanks for your ideas. <esri:MarkerSymbol x:Key="MyMarkerSymbol" > <esri:MarkerSymbol.ControlTemplate> <ControlTemplate> <Grid> <Rectangle x:Name="Element" Width="15" Height="15" Fill="#ff9900" Stroke="White" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="SelectionPublic"> <VisualState x:Name="Unselected" /> <VisualState x:Name="Selected"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" To="Cyan" Duration="00:00:0.25"/> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Rectangle> <!-- lables--> <Grid Margin="50,-15,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" IsHitTestVisible="False" > <TextBlock Foreground="White" Text="{Binding Attributes[Code ]}" > <TextBlock.Effect> <BlurEffect Radius="5" /> </TextBlock.Effect> </TextBlock> <TextBlock Foreground="Black" Text="{Binding Attributes[Code ]}" /> </Grid> </Grid> </ControlTemplate> </esri:MarkerSymbol.ControlTemplate> </esri:MarkerSymbol>
... View more
03-19-2013
07:58 AM
|
0
|
0
|
511
|
POST
|
Thank you for your solutions. I had a problem with making it work: both codes returned an invalid syntax error and highlighted �??:�?� in a code. I did not do more research on this error, because I got another solution. I just learned that in ArcGIS 10 Null can be simply calculated in a field calculator by typing Null (VB parser) in a calculator window. My mistake is that after trying to do this for a single record during the edit session, I assumed that it is not working at all and did not try to use VB parser in a field calculator.
... View more
09-13-2012
11:19 AM
|
0
|
0
|
3553
|
POST
|
I already tried to do this. I received an error: ERROR 000539: error running expression: NONE <type'exceptions.NameError'> name 'NONE' is not defined. If I use None (not a NONE like above) there is no error, but also nothing happen.
... View more
09-12-2012
09:56 AM
|
0
|
0
|
3553
|
POST
|
Thank you for your answer. I run it and nothing happened. Anyway, I do not want to replace all my �??A�?� or �??B�?�, but I am looking for a way to calculate NULL /None value for only selected rows.
... View more
09-12-2012
05:32 AM
|
0
|
0
|
3553
|
POST
|
I have a field type string with the values of ???A???, ???B??? and ???C??? and NULL (empty string). I would like to replace selected letter values with NULL, which will be an empty string, not a string ???NULL???. I tried to use in a field calculator a Python parser: str!field_name! but this did not work. I found plenty of posts how to select a NULL value, but nothing helpful on how to calculate NULL in a way that it is visible as NULL/empty string also through SQL server connection. Any ideas?
... View more
09-11-2012
12:34 PM
|
0
|
6
|
23838
|
POST
|
Thanks a lot for a link to documentation �?? it helped me to better understand the entire process.
... View more
12-09-2011
04:35 AM
|
0
|
0
|
870
|
POST
|
If you just want to show or hide some layers, you don't need to change the LayerDefinitions. You can set the LayerIds with the sublayers that you want to show. Thank you for your advice. It turned out that the problem was much more complicated and required some changes in the way how layers are displayed and queries are made.
... View more
12-07-2011
04:51 AM
|
0
|
0
|
870
|
POST
|
I try to set my Identify tool to identify only the results of my query task instead all of them (this includes invisible). Setting LayerOption = LayerOption.visible does not work in my case, because the query task returns one result for polygon feature class and one for points, where the extent of polygons is much bigger than points. I would like to be able identify only these points, which were returned by a query, but all polygons. My guess is I should use Layer Definitions, but I do not know how exactly to do it. I tried something like this: private void IdentifyStart() { ESRI.ArcGIS.Client.Tasks.IdentifyParameters identifyParams = new IdentifyParameters() { Geometry = _clickPont, MapExtent = Map.Extent, Width = (int)Map.ActualWidth, Height = (int)Map.ActualHeight, SpatialReference = Map.SpatialReference, Tolerance = 10, IEnumerable < "PreKSitesGraphicsLayer" > IdentifyParameters.LayerDefinitions, }; But this is not working. Does someone have idea how to solve it, or can provide me with any code sample? Thank you!
... View more
12-02-2011
09:51 AM
|
0
|
14
|
4039
|
POST
|
Thank you for your answers! I found in custom line symbols one symbol which may work for me: <esri:LineSymbol x:Key="CustomRedYellowLineSymbol" Width="4"> <esri:LineSymbol.Color> <LinearGradientBrush StartPoint="0,0" EndPoint="4,4" MappingMode="Absolute" SpreadMethod="Repeat"> <GradientStop Color="Red" Offset="0.5" /> <GradientStop Color="Yellow" Offset="0.5" /> </LinearGradientBrush> </esri:LineSymbol.Color> </esri:LineSymbol> The question is now, how to implement it into code in a way I can still use Visual States (I would like still to be able to highlight my line, when the mouse is over it). Here is my original code: <esri:SimpleLineSymbol x:Key="2_D2DRouteLineSymbol"> <esri:SimpleLineSymbol.ControlTemplate> <ControlTemplate x:Name="D2DRoute2SymbolTemplate"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="D2DRoute2SelectionGroup"> <VisualState x:Name="Normal"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Stroke).(Color)" To="#FF6600" Duration="0:0:0.1" /> </Storyboard> </VisualState> <VisualState x:Name="MouseOver"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Stroke).(Color)" To="Cyan" Duration="0:0:0.1" /> </Storyboard> </VisualState> <VisualState x:Name="Selected"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Stroke).(Color)" To="Cyan" Duration="0:0:0.1" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Path x:Name="Element" Stroke="Aqua" Fill="{x:Null}" StrokeStartLineCap="Round" StrokeThickness="4" StrokeLineJoin="Round" StrokeEndLineCap="Round" /> </Grid> </ControlTemplate> </esri:SimpleLineSymbol.ControlTemplate> </esri:SimpleLineSymbol> I tried to past sample into few different places, but everything what I was able to do is: <esri:SimpleLineSymbol x:Key="1_D2DRouteLineSymbol" Width="4"> esri:LineSymbol.Color> <LinearGradientBrush StartPoint="0,0" EndPoint="4,4" MappingMode="Absolute" SpreadMethod="Repeat"> <GradientStop Color="#0033FF" Offset="0.5" /> <GradientStop Color="#FFFFFF" Offset="0.5" /> </LinearGradientBrush> </esri:LineSymbol.Color> </esri:SimpleLineSymbol> Which does not allows me for any highlighting.
... View more
11-04-2011
07:51 AM
|
0
|
0
|
349
|
POST
|
I would like to differentiate them, because they belong to the different group of variables. In general the application is used to query multiple datasets and display results in visual and tabular forms. I have three line datasets with thousands of features each, so defining symbology on map/gdb level looks not efficient for me. Since user can query not more than ten variables at a time, I am using ten different line symbols to display them (in each of three categories). Because my third category can be displayed on the map together with first or second (first and second cannot be displayed together), I need make its symbology different from these used to display first and second group of variables. I cannot just use different colors, so I am looking for the way of changing simple line symbol to line with outlines. I tried dashed line, but this does not work well in my case. So in summary: I am looking for a sample code how to draw line with outlines. Thanks in advance for helping out.
... View more
11-04-2011
05:28 AM
|
0
|
0
|
349
|
POST
|
I am using simple line symbol to draw my lines. I would like to differentiate some of them by adding outline. Could somebody point me to any sample with XAML code, or help to change my code? My current code for drawing lines looks like this: <esri:SimpleLineSymbol x:Key="2_D2DRouteLineSymbol"> <esri:SimpleLineSymbol.ControlTemplate> <ControlTemplate x:Name="D2DRoute2SymbolTemplate"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="D2DRoute2SelectionGroup"> <VisualState x:Name="Normal"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Stroke).(Color)" To="#FF6600" Duration="0:0:0.1" /> </Storyboard> </VisualState> <VisualState x:Name="MouseOver"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Stroke).(Color)" To="Cyan" Duration="0:0:0.1" /> </Storyboard> </VisualState> <VisualState x:Name="Selected"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Stroke).(Color)" To="Cyan" Duration="0:0:0.1" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Path x:Name="Element" Stroke="Aqua" Fill="{x:Null}" StrokeStartLineCap="Round" StrokeThickness="4" StrokeLineJoin="Round" StrokeEndLineCap="Round" /> </Grid> </ControlTemplate> </esri:SimpleLineSymbol.ControlTemplate> </esri:SimpleLineSymbol>
... View more
11-03-2011
11:41 AM
|
0
|
4
|
766
|
Online Status |
Offline
|
Date Last Visited |
01-12-2024
07:54 AM
|