silverlight-4.0

Silverlight 4 - How can I change button background color when focused with an Implicit button style?

三世轮回 提交于 2019-12-22 08:44:22
问题 I'm having a great deal of difficulty trying to achieve something that should be trivial. I'm using an Implicit Button Style defined in a global XAML resource file. I just want to change the background color of the focused button to red with a ColorAnimation. I've tried a number of different combinations in Storyboard.TargetProperty and Storyboard.TargetName and nothing has worked. How can I achieve this? Thanks in advance. <Style TargetType="Button" > <Setter Property="Template"> <Setter

System.UnsupportedException using WCF on Windows Phone 7

穿精又带淫゛_ 提交于 2019-12-22 08:07:09
问题 Has anyone been able to communicate using WCF on Windows Phone Series 7 emulator? I've been trying for the past two days and it's just happening for me. I can get a normal Silverlight control to work in both Silverlight 3 and Silverlight 4, but not the phone version. Here are two versions that I've tried: Version 1 - Using Async Pattern BasicHttpBinding basicHttpBinding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress("http://localhost/wcf/Authentication.svc");

Silverlight open uri link being blocked by browser

坚强是说给别人听的谎言 提交于 2019-12-22 07:57:07
问题 The problem is simple but annoying. I have a button and the click event just opens a link by HtmlPage.Window.Navigate(uri, "_blank"); But it keeps being blocked by the browser. I searched a lot. It seems everyone is using this method but no one mentioned the new tab/windows is being blocked. So what should I do? UPDATE Problem solved. It seems that to navigate to outside web pages, HyperlinkButton should be used. This is not blocked by the browser. "To enable user navigation to other Web

What is the return type for a anonymous linq query select? What is the best way to send this data back?

时光总嘲笑我的痴心妄想 提交于 2019-12-22 06:39:50
问题 This is a basic question. I have the basic SL4/RIA project set up and I want to create a new method in the domain service and return some data from it. I am unsure the proper easiest way to do this.. Should I wrap it up in a ToList()? I am unclear how to handle this anonymous type that was create.. what is the easiest way to return this data? public IQueryable<ApplicationLog> GetApplicationLogsGrouped() { var x = from c in ObjectContext.ApplicationLogs let dt = c.LogDate group c by new { y =

how to declare dataset in silverlight for windows phone7 using c#?

◇◆丶佛笑我妖孽 提交于 2019-12-22 01:32:33
问题 Please post the answer for how to declare dataset in silverlight for windows phone7 using c#? 回答1: There is no support for datasets in WP7. You have to build your own datacollections. (For example you could use the ObservableCollection). My suggestion would be to check the code samples on the MSDN page. (The WeatherForecast example uses webservices to retrieve data). Also I would suggest to read some on the MVVM pattern. (MSDN Article) 回答2: Instead of Dataset you should use

Live streaming with silverlight 4

倖福魔咒の 提交于 2019-12-21 23:35:06
问题 Greeting, Is there a live streaming server for silverlight 4 from Microsoft like Flash Media Server from Adobe that support live streaming for Flash??? I know that there are many open source live streaming server that support silverlight 4 but I did not find some one good as Flash Media Server which support Flash!!! please tell me if Microsoft has a media server for live streaming or if there is a good open source server for that. I'm working in building web conference system using

How to open window pop-up from Silverlight Out-of-Browser?

房东的猫 提交于 2019-12-21 21:17:06
问题 I need to open window pop-up from Silverlight Out-of-Browser application. I've added parameter <param name="enablehtmlaccess" value="true" /> in Index.html, but executing this from code behind: HtmlPage.Window.Navigate(new Uri(myUrl), "_blank", myFeatures); still returns error: Silverlight OOB Error: The DOM/scripting bridge is disabled. I've read about this post, does it mean that I can't open pop-up from OOB? Why I need to do this, because actually I've shown the HTML page in OOB

Getting an object reference by name from a DataTemplate

随声附和 提交于 2019-12-21 20:45:41
问题 If I have the following XAML: <toolkit:DataForm Height="100" x:Name="form"> <toolkit:DataForm.EditTemplate> <DataTemplate> <StackPanel Name="stack"></StackPanel> </DataTemplate> </toolkit:DataForm.EditTemplate> </toolkit:DataForm> I can get a reference to "form" by this.FindName("form") from the View. How can I get a reference to "stack"? FindName returns null. 回答1: The problem here is that the xaml content of a DataTemplate belongs to a different NameScope than the outer Xaml. Calling

Silverlight 4 + MVVM + KeyDown event

蓝咒 提交于 2019-12-21 16:33:52
问题 I'm trying to build a sample game in Silverlight 4 using the MVVM design pattern to broaden my knowledge. I'm using Laurent Bugnion's MvvmLight toolkit as well (found here: http://mvvmlight.codeplex.com/ ). All I want to do right now is move a shape around within a Canvas by pressing specific keys. My solution contains a Player.xaml (just a rectangle; this will be moved around) and MainPage.xaml (the Canvas and an instance of the Player control). To my understanding, Silverlight doesn't

Silverlight 4 + MVVM + KeyDown event

非 Y 不嫁゛ 提交于 2019-12-21 16:33:46
问题 I'm trying to build a sample game in Silverlight 4 using the MVVM design pattern to broaden my knowledge. I'm using Laurent Bugnion's MvvmLight toolkit as well (found here: http://mvvmlight.codeplex.com/ ). All I want to do right now is move a shape around within a Canvas by pressing specific keys. My solution contains a Player.xaml (just a rectangle; this will be moved around) and MainPage.xaml (the Canvas and an instance of the Player control). To my understanding, Silverlight doesn't