silverlight

How do I use the icons provided with the WP7 sdk properly?

懵懂的女人 提交于 2020-01-12 03:40:06
问题 Icons have been provided in the SDK for either "Light" or "Dark" depending on the theme set on the phone. On the application bar when the theme changes the icons automatically change with it. Also, when you press the button the image is reversed (so it's still visible) no matter which theme you're on. I can easily figure out how to change the icon based on the current theme. However what's no easily figured out is how to change the icon when the button is pressed. To be more clear. Let's say

The HTTP verb POST used to access path '/Membership/user/' is not allowed

北慕城南 提交于 2020-01-11 11:51:34
问题 This code: private void Submit_Click(object sender, RoutedEventArgs e) { user temp = new user(); temp.Username = UserName.Text; temp.Password = Password.Text; dataBase.AddTouser(temp); IAsyncResult result = dataBase.BeginSaveChanges(new AsyncCallback (OnSaveChangesCompleted), temp); } void OnSaveChangesCompleted(IAsyncResult result) { try { string name = ((user) result.AsyncState).Username.ToString(); dataBase.EndSaveChanges(result); } catch (DataServiceRequestException ex) { MessageBox.Show(

The HTTP verb POST used to access path '/Membership/user/' is not allowed

自闭症网瘾萝莉.ら 提交于 2020-01-11 11:49:30
问题 This code: private void Submit_Click(object sender, RoutedEventArgs e) { user temp = new user(); temp.Username = UserName.Text; temp.Password = Password.Text; dataBase.AddTouser(temp); IAsyncResult result = dataBase.BeginSaveChanges(new AsyncCallback (OnSaveChangesCompleted), temp); } void OnSaveChangesCompleted(IAsyncResult result) { try { string name = ((user) result.AsyncState).Username.ToString(); dataBase.EndSaveChanges(result); } catch (DataServiceRequestException ex) { MessageBox.Show(

Silverlight MSBuild Task - execute command line after Xap copied to ClientBin

瘦欲@ 提交于 2020-01-11 11:28:33
问题 I have a silverlight project arranged as follows: Examples Silverlight Bin Debug ExampleCode {Multiple Sub directories} Silverlight.Web Bin Debug ClientBin Silverlight.Web.xap The code under {Multiple Sub Directories} is included in the silverlight DLL and compiled, however I also want to include these files as "Content" in the xap file. Think about demo applications for .NET controls that show you a demo but also the C#/xaml code to achieve it. This is what I'm trying to do. I cannot select

Dialogs must be user-initiated. Silverlight

柔情痞子 提交于 2020-01-11 09:44:49
问题 I have read almost all SO threads about this error. What i found is that Openfiledialog must be the first line of Button Click Handler in code behind file of your view. I have done this but still i got this error on random. Dialogs must be user-initiated. at System.Windows.Controls.OpenFileDialog.ShowDialog() at Portal.Presentation.SL.Views.AddEditPatient.Button_Click(Object sender, RoutedEventArgs e) any pointers? I am using silverlight 4 Regards. 来源: https://stackoverflow.com/questions

How can I prevent the user from resizing the silverlight out-of-browser window?

↘锁芯ラ 提交于 2020-01-11 09:44:29
问题 I have a silverlight app which can be installed as out-of-browser . I've defined the Height and Width in the main UserControl . I've defined the same Height and Width in the OutOfBrowserSettings.xml file. But the user can still resize the out-of-browser frame window. How do I prevent this? 回答1: The window hosting the Silverlight application cannot be controlled by the application when it is running with normal permissions, that would be a security issue. However, if you install the OOB

Silverlight Background Thread using WebClient

徘徊边缘 提交于 2020-01-11 07:57:18
问题 I'm using a WebClient to get infos asynchronously from my web service : wc.DownloadStringCompleted += DownloadStringCompleted; wc.DownloadStringAsync(service); I works fine, but I think the DownloadStringCompleted method is working on the UI Thread, and since i'm doing a lot of parsing there, my page takes a few seconds to appear. However, since I have so fixed data and a progress bar, I would'nt mind have it appearing instantly. How could I perfom this ? Thanks ! 回答1: Use HttpWebRequest

Connecting Silverlight to the local computers COM port

我与影子孤独终老i 提交于 2020-01-11 06:27:29
问题 I have been searching high and low for a way to get my silverlight application talking to the COM port on my local computer. Has anybody out there been able to get Silverlight to successfully connect to the COM port of you local computer? If so can you point me to the documentation. 回答1: This can not be done with Silverlight. Why not just use a standard .NET desktop app? If you need to easily deploy over the web, just use Click-Once for deployment. 回答2: There's no access to computer resources

Silverlight vs WPF

对着背影说爱祢 提交于 2020-01-11 05:27:09
问题 My organization is considering which technologies to use for our next generation of systems. We will be using .NET, but have not decided which user interface technology is best. Silverlight and WPF seem to be the most appropriate options. Can someone share the pros and cons of each approach? 回答1: As Gabriel (and Reed) mention, Silverlight is a slimmed down version of WPF. WPF is intended primarily for desktop applications, and it has advanced features around layout, animation, and data

IsTabStop = False on a SL4 Text box

左心房为你撑大大i 提交于 2020-01-11 05:20:12
问题 I set IsTabStop to false on a text box and I know that this makes the control unable to receive focus, but according to the Silverlight Forums, it should still be able to receive mouse events. I have the MouseLeftButtonUp event wired and a breakpoint in my tbxTotal_MouseLeftButtonUp method, and it never gets hit during debugging. The thread in the SL Forums is pretty old now, so maybe this was changed in an update somewhere. I want a text box that can't be tabbed to, but is still editable.