For this post I have used the web service which are free to use. I have used the currency conversion from one country currency to another country currency rate. Below is the screen shot of the example application. The GUI is very simple as you have to select from the conversion from currency and then select Conversion to currency and press the convert button.
<TextBlock Margin="4,0,0,0" VerticalAlignment="Center" Text="{Binding Path=SelectedItem.CurrencyName, ElementName=cboConversionFrom, Mode=OneWay}" TextWrapping="Wrap" Grid.Column="1" Foreground="{StaticResource CheckBoxBrush}" />
Here you can see that Text property of the text block, I have set the path of the to selectedItem.CurrencyName and the element name is cboConversionFrom. Every time the selectedItem from the cboConversionFrom change the text property is also changed.
To consume the asmx service I have create asmx service in my web project which will be consumed by the silverlight project. For the communication purpose the service should be running when you made web service call.You can download the source code from here
All and any comments / bugs / suggestions are welcomed!
No comments:
Post a Comment