Saturday, June 26, 2010

Editing Graphics Geometry in Graphics Layer With ESRI Silverlight ArcGIS API

I have implemented Editing a polygon Graphic on a Graphic Layer, it is simple, we are going to bind Mappoint collection to a grid. deleting a vertex is also available in the grid.

Grid XAML:
 <data:DataGrid x:Name="dgRequestLocationPoints" AutoGenerateColumns="False" MaxHeight="500" Foreground="Black" IsReadOnly="False" >
<data:DataGrid.Columns>
<data:DataGridTextColumn Header="Long" Width="90" Binding="{Binding X, Mode=TwoWay}" IsReadOnly="False" />
<data:DataGridTextColumn Header="Lat" Width="90" Binding="{Binding Y, Mode=TwoWay}" IsReadOnly="False" />
<data:DataGridTemplateColumn Width="50">
<data:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button x:Name="DeletePoint" Click="DeletePoint_Click" Width="16" Height="16">
<Image Source="images/delete.png" Stretch="Fill"/>
</Button>
</DataTemplate>
</data:DataGridTemplateColumn.CellTemplate>
</data:DataGridTemplateColumn>
</data:DataGrid.Columns>
</data:DataGrid>


Binding the vertices to the gird:

Thursday, June 24, 2010

Implementing iPhone Button using SilverLight

Hello,
I've implemented an iPhone-like Button using Silverlight;
Here's my implementation; hope you enjoy it :)

http://www.blog.alkumait.net/arcgisserverblog/IPhoneButton.xaml


Regards

Sunday, June 20, 2010

SilverLight WCF Size Problem



Hello;
I've been recently developing an application using Silverlight 4 as with WCF service back end, so some of the functionalities in the project required to upload dome files and store them in a database, but I had a problem reagrding the size of the uploaded file, after googling a lot; all sites were talking about the configuration of the WCF service and the client (you know maxReceivedMessageSize and maxBufferSize="2147483647" and so...); but after changing the configuration it seemed that the problem remains.

The exception I kept receiving when the file is about 3 MB is:

System.ServiceModel.CommunicationException was unhandled by user code
Message=The remote server returned an error: NotFound…

Today I found out the solution in some site; it has nothing to do with the configuration of the WCF and SL client; it is related to the httpRuntime in system.web :)

So if you had the same problem just add this in system.web in your service config file: