silverlight

Can Silverlight WCF client read exceptions from an ASMX web service?

≯℡__Kan透↙ 提交于 2019-12-25 02:49:11
问题 I've seen no need to upgrade my services to WCF, but I have been using WCF clients for some time to access ASMX services from .NET 3.5 ASP.NET. I figured eventually I'd hit a wall in this mismatch and I just did - but with Silverlight. When using Silverlight to access ASMX web services I get an error like this in a popup : An exception occurred during the operation, making the result invalid. Check InnerException for exception details. If I'm debugging I get this error : The remote server

Silverlight WebRequest fails with “The URI prefix is not recognized”

让人想犯罪 __ 提交于 2019-12-25 02:44:47
问题 I have a silverlight library that is supposed to get make a web service request and receive an xml response: Uri uri = new Uri("http://some_server:51306/getStuff.xml?id=14"); WebRequest request = WebRequest.Create(uri); However, WebRequest.Create(uri) fails with the exception "The URI prefix is not recognized". Note that I am running the program using a unit test from a non-silverlight dll. I need to build a test suite for the app! Any ideeas? 回答1: Try setting the .Web project as the default

How can you use INotifyDataErrorInfo/ValidationSummary for server side validation?

人走茶凉 提交于 2019-12-25 02:25:00
问题 I have various client side validation rules I'm using such as Required on certain fields. I also have some database validation rules such as unique constraints that really need to be done server-side. I've bubbled the error messages back up to the client, but how can I show them using INotifyDataErrorInfo/ValidationSummary? If at all possible I'd like these errors to be shown in the ValidationSummary control as well as the control/property that caused the error. Is this even possible? 回答1:

How to copy the selected image from picture library to the images folder dynamically in the application?

萝らか妹 提交于 2019-12-25 02:23:11
问题 I am new to the windows phone 7 application development. I am accessing the picture library by using the PhotoChooserTask class. After selecting one of the picture from picture library I want to add that image (.jpg file) from picture library to the images folder of my application. How to do this ? I am using the following code public partial class MainPage : PhoneApplicationPage { PhotoChooserTask photoChooserTask; // Constructor public MainPage() { InitializeComponent(); photoChooserTask =

Bind datagrid to one ViewModel, column / combobox to another

时间秒杀一切 提交于 2019-12-25 02:22:39
问题 I a have a View Players, the datacontext is set to a ObservableCollection Players from the ViewModel MainPlayerViewModel. In the View I have a datagrid with columns TeamId, Name and Position. I want to bind the TeamId column with a combobox to a list of available teams from the MainTeamViewModel which has a collection property Teams but of course I want the MainPlayerViewModel to be updated whenever I update the team for a player. I hope you can follow me here.. This is my xaml: <data

Camerabuttons events just not firing in WP7.1 app

北城以北 提交于 2019-12-25 02:20:53
问题 I've diligently followed the instructions at http://msdn.microsoft.com/en-us/library/microsoft.devices.camerabuttons.shutterkeyhalfpressed(v=vs.92).aspx to try and hook the camera events in my WP7.1 Silverlight app. In my main form I have: protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { CameraButtons.ShutterKeyPressed += new EventHandler(CameraButtons_ShutterKeyPressed); } And then... void CameraButtons_ShutterKeyPressed(object sender, EventArgs e) { /

How to automatically change text in a silverlight textbox?

三世轮回 提交于 2019-12-25 02:19:14
问题 I am using MVVM/Caliburn.Micro in a silverlight 5 project and I have a requirement to automatically change the text the user enters in a silverlight textbox to uppercase. First, I thought I could just set the backing variable on the ViewModel to uppercase and the two way binding would change the text. That didn't work (though I believe it will if I use a lost focus event, but I cannot do that since I have other things I must do for KeyUp as well and attaching two events results in a xaml

Checkbox not saving state

风格不统一 提交于 2019-12-25 02:18:43
问题 I currently have a checkbox to adhere to MS location services rules, but it doesn't seem to save its state when you revisit the page. Code is below: private void cbLocationAllow_Checked(object sender, RoutedEventArgs e) { var settings = IsolatedStorageSettings.ApplicationSettings; settings["allowLocation"] = true; settings.Save(); } private void cbLocationAllow_Unchecked(object sender, RoutedEventArgs e) { var settings = IsolatedStorageSettings.ApplicationSettings; settings["allowLocation"] =

Load Operation failed for query 'Login'. The remote server returned an error: NotFound

与世无争的帅哥 提交于 2019-12-25 02:17:16
问题 I'm working with Siverlight 5.0, RIA Services and Entity framework in my project. When I deploy the application using VS, the application runs fine. However, when I use a web deployment project to publish the application, the first call to a RIA services service on the same system fails. An error similar to this is produced: Load Operation failed for query 'Login'. The remote server returned an error: NotFound I guess, the last message is not enough to get the concrete error. Suggest me what

AmChart customization for Windows Phone 8

怎甘沉沦 提交于 2019-12-25 02:17:08
问题 I have working on Windows Phone 8 app and i am trying to implement Charting library. I have used the charting example given here :http://mobile.dzone.com/articles/mango-sample-chart-data Its good, but i am not able to customize it. 3 issues is : 1) Onclick of slice i need to get the value. 2) How to add Double tap ? 3) legends should be at the bottom aligned horizontally. Here is the screen shot. EDIT This is my XAML file: <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,0,0"> <charts