silverlight

Silverlight Business Application template with WCF is throwing warning

南楼画角 提交于 2019-12-24 06:36:06
问题 I am using the Silvelight Business Application template. I wrote a function which uses Membership.getUserList function to return the user list. I tried exposing it as Service using WCF. But when I try to compile the client side code it throws a warning saying "Client Proxy Generation for user_authentication.Web.Service1 failed'. Why does it happen? The complete warning message is: Warning 4 Client proxy generation for service 'user_authentication.Web.Service1' failed: Generating metadata

Upload large files in Silverlight

回眸只為那壹抹淺笑 提交于 2019-12-24 05:53:08
问题 Is it possible to upload large files in Silverlight w/o resorting to the "chunked upload" or loading all of the file data into memmory? I read something about uploading using Silverlight streaming API, does that work and will it truly stream the data w/o preloading all of it in mem upfront first? 回答1: Silverlight doesn't implement any kind of "stream upload". Before post request goes to the server all data you want to send should be writen into the stream. So if you need to send truly large

How do I build a paged ItemsControl or Panel with a repeating header?

橙三吉。 提交于 2019-12-24 05:45:14
问题 I'm trying to build a Panel or ItemsControl that will display items in the form of: Header 1 Sub Item 1 Sub item 2 Sub Item 3 Header 2 Sub Item 1 Sub item 2 This is easy enough, but the catch here is that I need to be able to split the items in a Paged fashion. Based on the height of the control, whatever does not fit will be on the next Page (and so on). If a split occurs between subitems, I need to re-display the corresponding header on the next page as well. I made some progress working

Shall the DB ConnectionString within Web.config be encrypted when using Azure Cloud?

五迷三道 提交于 2019-12-24 05:22:00
问题 I have come across this excellent blog explaining how to encrypt/decrypt the database connection string with a PKCS12ProtectedConfigurationProvider inside Azure Cloud. http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-connection-security.aspx#create_aspnet Is this something that should be done, or is it rather security overkill? If Web.config cannot be accessed from internet due IIS restrictions, nobody would be able to read the DB connection string (incl. password etc)

WPF: Can I get the size of a UIElement AFTER a transform is applied?

被刻印的时光 ゝ 提交于 2019-12-24 04:54:26
问题 In WPF/Silverlight, can I get the calculated value of a UIElement after a transformation is applied? (Per the comment below): I've got a stack panel and I've applied a TranformGroup to it. There are two translate and one scale transforms in this group. (warning, psuedo code ahead) groupTransform.children.add(new TranslateTransform()); groupTransform.children.add(new ScaleTransform()); groupTransform.children.add(new TranslateTransform()); containerToScale.RenderTransform = groupTransform; ...

Popups in Pivot

馋奶兔 提交于 2019-12-24 04:36:04
问题 I have a Pivot layout with three items. One holds news for today, the second shows news for the week and in the third one you can search by date. If there aren't news for today yet, I show a message through a popup. I use a popup because I can put it over the datatemplate list. The problem is that if I show the popup in the pivotitem for today news, it is shown in all other pivot items, but in code is inside the first pivot item only! How can I solve this? Would you recommend me to use

Communicating with a Silverlight 4 LocalMessageReceiver from a Desktop Application

混江龙づ霸主 提交于 2019-12-24 04:35:37
问题 I am working on a little Helper Application for a Silverlight 4 OOB App that can be installed to enhance the capabilities of the SL a bit (improved Clipboard Support, Global Hotkeys etc). I know that Silverlight's Local Message API is based on ALPC which is a rather undocumented Windows API but still, is there a way to talk to the LocalMessageReceiver from a non-silverlight application that I might have overlooked? Otherwise I might need to stick to Plan B: a listening socket in the Helper

How to declare an event handler in an interface?

我的未来我决定 提交于 2019-12-24 04:34:08
问题 I have a few Silverlight 4 UI objects (Navigation Pages more like it) that have to implement two things: OnError event handler, and Refresh() method. So I tried the following: public interface IDynamicUI { event EventHandler<ErrorEventArgs> OnError; void Refresh(); } public class ErrorEventArgs : EventArgs { public string Message { get; set; } public Exception Error { get; set; } } but the compiler gives me errors saying that fields cannot be declared inside public interfaces. Well the

Windows Phone: RemoveBackEntry after navigate failing

耗尽温柔 提交于 2019-12-24 04:21:18
问题 I've got an intermediate "Loading" page for my game: I send them there and it has "Loading..." text that displays while the rather hefty game page loads up: private void OnLoaded(object sender, RoutedEventArgs e) { Dispatcher.BeginInvoke(() => { try { NavigationService.Navigate(new Uri("/GamePage.xaml", UriKind.Relative)); NavigationService.RemoveBackEntry(); } catch (InvalidOperationException) { } }); } Then when you hit the back button you go to the main page rather than back to the loading

Silverlight: How to force binding after setting the DataContext property

房东的猫 提交于 2019-12-24 04:16:08
问题 Is it possible to set the DataContext property of a usercontrol after the user control has been loaded, and force the usercontrol to rebind? 回答1: I'm pretty sure that if you just set the datacontext again, it will rebind 回答2: If you need to do extra work when the DataContext changes you can use a custom DependencyProperty and bind it to the DataContext property. Use the DependencyPropertyChangedEventHandler to know when the DP changed. For a more complete explanation see my blog post at http: