silverlight

WriteableBitmap in .NET 4

Hi there, I have got a problem: I would like to use a method Render() for WriteableBitmap object. However, as I noticed, the method is not available without using a Silverlight assembly System.Windows.dll. I need to use RenderTargetBitmap in my project (PresentationCore assembly for standard .net). Here is the problem - there are defini...

DomainContext class is not created in a RIA services class library solution

I have created a RIA services class library project and things are not going as I expected. The problem is that when I add domain service classes to the server project, the corresponding domain context classes are not generated on the client project. I start by creating a new project of type WCF RIA services class library. The generated...

Animation with mvvm light on windows phone 7

Hello all, I have an intriguing question. Let's say I want to play an animation or change the visual state etc of my view FROM THE VIEW MODEL. How can I do that? Its for building an MVVM application on windows phone 7. ...

Why doesn't my viewmodel properties get populated

Hi. I've looked all over and I can't figure out why my viewmodel doesn't get populated. I have this code: _followersRepo = new NotesDomainContext(); _followersRepo.Load(_followersRepo.GetFollowersQuery(), lo => { _followers = new ObservableCollection(_followersRepo.aspnet_Users); }, null); _followingRepo = new NotesDomainConte...

Drag and drop between HTML 5 and Silverlight 4

Hi - Is it possible to drag an HTML 5 object, e.g. an <a draggable="true">, into a Silverlight 4 control and accept it? We've attempted to build a simple prototype using an HTML 5 example and a trivial Silverlight control but the cursor changes to the no-entry sign whenever we hover over the Silverlight control. We do, however, get drag...

Silverlight 3 DataBinding with ValueConverter: conditionally use the default value for property

I have a DatePicker for which I want to set the BorderBrush to SolidColorBrush(Colors.Red) if the SelectedDate is null. If a date has been filled in though, I want to just have the default BorderBrush. I still want to be able to style the default BorderBrush in Blend, so I don't want to hardcode the default borderbrush of the DatePicker....

Unit testing "hybrid" WPF/Silverlight controls

I'm starting a new WPF/Silverlight custom control project and wanted to do unit testing on this one. However I'm a little confused about how to approach this. This control would be based on the same codebase for both WPF and Silverlight with minor forking using #ifs and partial classes to tame the differences. I guess I could write unit...

Optimize loading an XAP file with an asp.net website

I've been developing a game using Silverlight 4 and silversprite (http://silversprite.codeplex.com/) This game is HEAVILY content dependent, using a lot of audio and images. My content folder is around 90 mbs worth of stuff. And because of that, my XAP file is around 60 MB, and takes 5 minutes to download from the website before any us...

Using 3D photos in silverlight?

Hi all. I want use photos captured by 3D cameras in Silverlight 3 or 4. I want use that photos like in maps.google.com. Is it possible to do with silverlight and if yes is there any book, tutorial, video or anything alse, from which I can learn how to use tham. Thanks. ...

How do I change the visual style of a listitem based on its bound value?

I have a listbox (here's the xaml): <ListBox MinWidth="300" ItemsSource="{Binding Relationships, Mode=OneWay}" SelectedItem="{Binding SelectedRelationship, Mode=TwoWay}" SelectionMode="Single" HorizontalAlignment="Left" > <ListBox.ItemTemplate> <DataTemplate> ...

Silverlight Assembly.Load() only works with the full/strong name

Apparently the implementation of Assembly.Load() in Silverlight needs a full/strong name. E.g. this works: Assembly.Load("MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=..."); while this will fail even if MyAssembly is already loaded: Assembly.Load("MyAssembly"); Is there a workaround so that it's possible to use the...

Silverlight 4 business application themes

Hi, We are starting a new SilverLight 4 Business Application project and are looking for theme. All we can find on the web are Navigation Application themes, which when applied to business application project, don't work. Most even have compilation errors. Is there a place on the web to get theme specifically for that project or is th...

Silverlight or MVC for Web Development

I was just wondering about the opinions out there. What do you think promotes faster development times for a web application? Silverlight or .Net MVC? And could Silverlight be a replacement for a true http web application? Feel free to rant or give as much details as necessary. ...

Getting started with silverlight 3 mvvm

I've just written my first silverlight 3 app. It's written using the code behind in a rater messy way. I want to refactor into mvvm. I'm finding it extremely difficult to find any tutorials on this. So far from what I can gather I'll probably need a mvvm framework. Mvvm-light toolkit sounds like it might be what I want, but I can't fin...

Silverlight 4.0 : How to acces to the strings of the ApplicationStrings file through the ResourceWrapper in a business application?

Hi everyone, I want to acces to the strings of the ApplicationStrings file through the ResourceWrapper like this : String loginlabel = ( (ResourceWrapper) App.Current.Resources["ResourceWrapper"] ).ApplicationStrings.LoginLabel; in order to get the good string according to the current culture (language) but it doesn't work at all. A...

VS2010 asking to upgrade SIlverlight??

I'm running the absolute latest versions of Silverlight and Visual Studio 2010 Professional and built a solution that contained a WPF project. From there, I added a SketchFlow project (based on Blend 4 RC) and I can run each project within the solution just fine by setting whenever I switch between them as startup projects. From there,...

Silverlight 4 - MVC 2 ASP.NET Membership integration "single sign on"

Scenario: I have an ASP.NET MVC 2 site using ASP.NET Forms Authentication. The site includes a Silverlight 4 application that needs to securely call internal web services. The web services also need to be publically exposed for third party authenticated access. Challenges: Securely accessing webservices from Silverlight using ...

Fill panel with rectangles

I want to fill a panel with rectangles, and when the panel is resized, the rectangles should resize as well. Why doesn't the following work? <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <StackPanel HorizontalAlignment="Stretch" VerticalAlignment...

Reference not showing in VS 2010 project

Hello, Has anyone had an issue adding an existing project to a Silverlight business application and unable to use that new reference? I had an existing project folder that I am trying to import into a new app and I am unable to see any of the properties of the new project that I added. using dt.Model; The above gives me a red line ...

Silverlight 3 with WCF Service -

I've got a SL3 app trying to connect to a WFC service. Both the app and the service are on different secure servers on the same domain. The SL3 app lives here: https://www-r.aetc.af.mil/fm/tools/batsnet/authenticated/modules/blah blah When the SL app starts, it immediately connects to the service, but when it makes it's first call int...