silverlight-4.0

How to preserve TwoWay binding of CurrentItem when databinding to CollectionViewSource in ComboBox

♀尐吖头ヾ 提交于 2019-11-30 01:11:47
问题 Lets say we got a simple VM class public class PersonViewModel : Observable { private Person m_Person= new Person("Mike", "Smith"); private readonly ObservableCollection<Person> m_AvailablePersons = new ObservableCollection<Person>( new List<Person> { new Person("Mike", "Smith"), new Person("Jake", "Jackson"), }); public ObservableCollection<Person> AvailablePersons { get { return m_AvailablePersons; } } public Person CurrentPerson { get { return m_Person; } set { m_Person = value;

How to Learn Prism for Silverlight Fast?

旧巷老猫 提交于 2019-11-29 23:48:45
问题 I need to make Silverlight application With Prism. What could be best way to learn to make simple application with Silverlight + Prism? Also suggest any Good books for same. Thanks. 回答1: Great book, I started with this book myself: Developer’s Guide to Microsoft® Prism 4: Building Modular MVVM Applications with Windows® Presentation Foundation and Microsoft Silverlight® 回答2: I also have the book mentioned by 'daageu', and would also recommend it. But to accelerate the process of learning

Silverlight 4 RC File Upload with Upload Progress: how to?

≡放荡痞女 提交于 2019-11-29 22:56:53
问题 It's been stated that one of the new features of Silverlight 4 RC is that it now supports upload progress. I'm assuming this means it's possible to make an upload file progress bar without "chunking" but I can't figure out how to do this, so how do we do this? Source code examples would be great. Thanks! 回答1: Ok, after lots of playing I've got it figured out: private void UploadFile(string url, CustomPostDataInfo pdi) { // Use the client http stack! //HttpWebRequest webRequest =

Error HRESULT E_FAIL has been returned from a call to a COM component

徘徊边缘 提交于 2019-11-29 22:50:09
In Silverlight 4 app; what does this error mean?: "Error HRESULT E_FAIL has been returned from a call to a COM component." It's a very generic error. The VS debugger doesn't point to the exact location of the error when debugging. This is kind of an old question, but I figured I'd give my answer since I found this thread by Googling for the exact same problem. In my case, I'd copied some sample XAML from the web to get started with Silverlight Toolkit 4. That sample XAML contained a simple button with a click event handler that didn't relate to any handler that actually existed in my code

Resources for Windows Phone 7 development [closed]

本秂侑毒 提交于 2019-11-29 20:28:33
Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they appear EDIT: I've removed the speculation tag now that the covers are off An excerpt from Programming Windows Phone 7 Series by Charlez Petzold just became available online. geocoin Charlie Kindel has started a MSDN blog on WP7 development, along with a video on Channel9. windows phone twitter account: @windowsphone For WP7/XNA related information, keep an eye on Shawn Hargreave 's blog :-) Some info

How to use TextBox.Watermark in Silverlight 4?

与世无争的帅哥 提交于 2019-11-29 18:54:02
问题 While browsing MSDN documentation, you may come across this gem: TextBox.Watermark. "Awesome! I've been wanting a built-in way to do watermarking on my text boxes! This is great, let me go ahead and set that in XAML!" <TextBox Watermark="This is my watermark" Margin="20"></TextBox> Unfortunately, if you run this you won’t get what you expect: And the detail: What is this? Well, look at the MSDN documentation closely: That's right. It's supported in Silverlight 4, but it also says "Do not use

Dynamic query with WCF RIA Services

不羁岁月 提交于 2019-11-29 15:56:05
I use Silverlight 4 with WCF RIA Services (domain services with EF4). Now I'd like to add a functionality, which allow an user to query data based on the criteria user selected (ad-hoc query). I've found that: -WCF RIA Services doesn't allow anonymous types, so linq projection isn't possible. -Exposing OData doesn't help (much), because you can't filter data at client-side. Searching Internet, it seems I can use dynamic linq library described in the following link: http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx In short, the

Why can't I tap/click blank areas inside of a Border/ContentControl without setting the child's background to transparent?

痴心易碎 提交于 2019-11-29 15:24:39
I finally was able to create an "easy" transparent button control, based off a ContentControl . However, can someone explain why I couldn't click/tap any blank areas of the control until I set the background of the child element to transparent? I ran into this issue also when: I tried to use Border I set the ControlTemplate of a button rather than the ContentTemplate . Here's my "button" class: public class TransparentButton : ContentControl { public TransparentButton() { HorizontalContentAlignment = HorizontalAlignment.Stretch; } public override void OnApplyTemplate() { var child = Content as

SL4/MVVM: Handle MouseDragElementBehavior.Dragging event with void Foo() in VM

醉酒当歌 提交于 2019-11-29 15:15:24
I am trying to handle the MouseDragElementBehavior.Dragging event on a control I have. See here for background on why I want to do this. I am having trouble wiring up this event. From the XAML you can see I have added a behavior to the user control. Then I attempted to add a handler to the Dragging event on the behavior via the CallMethodAction EventTrigger. <i:Interaction.Behaviors> <ei:MouseDragElementBehavior ConstrainToParentBounds="True"> <i:Interaction.Triggers> <i:EventTrigger EventName="Dragging"> <ei:CallMethodAction MethodName="NotifyChildrenYouAreDragging" TargetObject="{Binding}"/>

IIS Smooth streaming low quality on start

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 14:21:23
问题 I m hosting some adaptive streaming video on windows azure and I have noticed that at the beginning the video start with the lowest avaiable bitrate. That is a big issue. I have seen by searching the internet that a trick can be done by hooking the manifestready event and removing the lowest bitrates and then adding them back after some time. It make sense but I have seen no sample code of doing that. I got the player code from expression encoder 4 and had a look but found nowhere where to do