silverlight

Forms Authentication for a Silverlight application in Windows Azure

二次信任 提交于 2019-12-24 11:22:08
问题 I am migrating a n-tier Silverlight application to Windows Azure and I've hit a brick wall. Once I am logged in, the web service cannot know who is authenticated. My cloud project has two roles: Web UI: On Azure, its IP is 111.222.33.44:80 Web Service: On Azure, its IP is 111.222.33.44:8080 Configuration for Web UI: <system.web> <compilation debug="true" targetFramework="4.0" /> <authentication mode="Forms"> <forms name="COOKIENAME" loginUrl="~/Login/login.aspx" timeout="2880" /> <

CollectionViewSource bind source to webservice (using WCF RIA services and LINQ) - Silverlight

亡梦爱人 提交于 2019-12-24 11:13:04
问题 I have a small problem, probably stupid but I can't figure this out.. Anyways all I'm trying to do is bind my CollectionViewSource.Source to my resulting query in Silverlight 4 with WCF RIA services. This is my XAML : <UserControl.Resources> <CollectionViewSource x:Name="cvsServiceTypes" /> </UserControl.Resources> <Grid> <ComboBox Height="23" HorizontalAlignment="Left" ItemsSource="cvsServiceTypes" DisplayMemberPath="Type" SelectedValuePath="IDServicesType" Margin="154,51,0,0" Name=

Adding back and forward button for WebBrowser control

*爱你&永不变心* 提交于 2019-12-24 11:12:31
问题 I have a WebBrowser element in a page, to which I would like to add a back and forward buttons, and have those buttons disabled when there's nothing to go back to and nothing to go forward to. In Cocoa, the UIWebView has methods to easily check that: canGoBack and canGoForward, and you have goBack and goForward methods available (along with reload etc..) Android has the exact same method names for achieving the same. I see those methods are available in .Net 4 and 3.5 SP1. I've found some

Turn event into a async/blocking call on Windows Phone 7 (C#)

那年仲夏 提交于 2019-12-24 11:08:03
问题 (I asked this question earlier, but had forgotten to mention some constraints. This is for Windows Phone 7.1 (Mango) with Silverlight 4 and C# 4, which lacks System.Threading.Tasks , await and more. I'm asking again in hope for a native solution without 3rd party libs like this.) I'm wrapping a library for my own use. To get a certain property I need to wait for an event, which fires pretty quick. I'm trying to wrap that into a blocking call. Basically, I want to turn void Prepare() { foo =

When do I unsubscribe from events inside Custom Control

不打扰是莪最后的温柔 提交于 2019-12-24 11:06:20
问题 I'm creating custom control that contain multiple parts. Inside template creation I'm subscribing for different events like so: public override void OnApplyTemplate() { base.OnApplyTemplate(); this.partAreaCode = this.GetTemplateChild(PartAreaCode) as TextBox; this.partExchange = this.GetTemplateChild(PartExchange) as TextBox; this.partSubscriber = this.GetTemplateChild(PartSubscriber) as TextBox; if (this.partAreaCode == null || this.partExchange == null || this.partSubscriber == null) {

Silverlight: get event when children of panel changes

自古美人都是妖i 提交于 2019-12-24 11:00:25
问题 Is there a way to get a event from a Panel when a child is added or removed? I'm deriving from a WrapPanel atm. 回答1: There is no public event or protected override that tracks changes Children membership. However a change in the membership of the Children property will ultimately result in a LayoutUpdated event. If you just need to know if the members have been changed then a simple copy of the last count of children would suffice. However if you need to keep track of which members have been

How to port C# Console application to Windows Phone

回眸只為那壹抹淺笑 提交于 2019-12-24 10:56:26
问题 Basically, the console application consumes a web service, and I want to do the same with windows phone application. I know that things work differently with WP7 with respect to web services, and I would like to know if this is possible. The console version uses the namespace System.Web.Services which is not allowed for the wp7. How else could I achieve the same? 回答1: You have to write a WCF service and using that service you can execute all the functionality that you want to do via console

Pass 2 parameters to Silverlight control from SharePoint web part project into Silverlight application

心不动则不痛 提交于 2019-12-24 10:38:35
问题 I have 2 parameters defined in SharePoint web part project, meant to be passed into Application_Startup() in a Silverlight application when a user selects from 2 combo boxes (browsable properties). Somehow the Silverlight control does not render when i load it on the SharePoint site. With 1 parameter passed in, the control displays without error. Any ideas? Syntax? Examples? App.xaml.cs: private void Application_Startup(object sender, StartupEventArgs e) { //testing string _setArticles = null

How to do a server-side Insert/Update (Upsert) from Silverlight RIA services

落花浮王杯 提交于 2019-12-24 10:25:36
问题 While RIA services seems very good for table operations & queries, I am stuck on one traditional update situation. The UPSERT (Update if exists, else Insert new): First: I want to add a record server-side if the record does not already exist, otherwise if it already exists, I want to update one of its current field values. Second: I do not want to query the database from client-side, to see if the record exists. I just want to call an "UpsertData" method on RIA services and have the add or

Silverlight (WP7) loading a resource

左心房为你撑大大i 提交于 2019-12-24 10:15:58
问题 I have the following code. It's not finding my resource: string filename = "Resources/Functions.plist"; Uri fileUri = new Uri(filename, UriKind.Relative); StreamResourceInfo sr = Application.GetResourceStream(fileUri); But after the above executes, sr is null. Not good. I do have a file named "Functions.plist" in a directory named "Resources", which is a subdirectory of my project directory. When I right click it in the solution explorer, I see its build action as "Resource" and its copy to