silverlight-4.0

Silverlight 4 and Implicit styling

In Silverlight 4 it's possible to use implicit styling - and that is amazing! But what if I want to apply a style to all of my Buttons, CheckBoxes and RadioButtons (all inheriting from ButtonBase)? I can't set TargetType on the Style to ButtonBase - that doesn't work. Do I need to create a style to each of the 3 control types? ...

Using Native dlls in C# Com wrapper and Use dll in silverlight

As part of my project I need to use some Unamanged code dlls in Silverlight. If I wrap these unmanaged dlls in a C# dll will I be able to access the native dlls from silverlight. I use Visual Studio 2010 and Silverlight 4.0 ...

How do I pass windows credentials to an ADO.NET Data Services call from Silverlight 4 when running out of browser (OOB)?

I have a Silverlight 4 client application that is calling out to an ASP.NET Data Services service hosted inside IIS 7, restricted to Windows Authentication. Both are hosted in the same location in IIS. When running the application within the browser, I am prompted for credentials via the browser, and when provided everything works fine. ...

Style property on Blocks/Inlines - Is there a way to get this?

I'm using the new RichTextBox control in SL4Beta and want to create styles for paragraphs and runs (blocks and inlines). I noticed that I can create a style for a <Block/>, like so: <Style x:Key="lvl2Paragraph" TargetType="Block"> <Setter Property="FontFamily" Value="Times New Roman"/> <Setter Property="FontStyle" Value="Italic"...

Silverlight 4 Out Of Browser and Upgrade

Can someone explain how the Silverlight 4 OOB upgrades happen? Is it click one? Would the OOB shell automatically download the latest xap from the server? ...

Code sample for slartoolkit project

Does anyone has the code to a full working example of slartoolkit (http://slartoolkit.codeplex.com/) ? ...

RoutedCommands in Silverlight

Is it possible to use RoutedCommands such as ApplicationCommand.Copy, ApplicationCommand.Paste, etc in Silverlight 4 beta version ? ...

Silverlight: How to open a system application to open a file.

I want to create a silverlight application by providing the URL of a file, then it opens the right system application. Example: if the file is .pdf - it opens acrobat reader .doc - opens winword ...

Audio recording and playback in Silverlight

I have a Silverlight 4 application that records user's voice through the mic. Now, as soon as the recording is completed, I need to play the recorded voice back to the user before posting it to the server. Is it at all possible to play it back to the user without getting into format conversions etc? Any ideas are welcome. Thanks! ...

Using MEF with exporting project that uses resources (xml) contained in the xap.

I'm doing a proof of concept app in SL4 using MEF and as part of the app I am importing another xap from an existing Silverlight Project and displaying it in my host project. The problem is that the existing app uses some .xml files (as content) and it uses linq2xml to load these files which are (assumed to be) bundled in the xap. When...

Adobe Flex 4.0 vs Silverlight 4.0

While this not necessarily a technical question, I believe it will help a lot of developers (including myself!). With Silverlight 4.0 and Flex 4.0 both in beta, I thought I would put out an open question to the community and see what everyone likes and dislikes about each framework and why. I've worked with Flex in the past but have de...

Recording and Uploading Audio with Silverlight 4

I've been reading about Silverlight 4's support for web cam and microphone. I'd like to be able to record audio from the browser and upload it to an ASP.NET MVC site. I've seen some mixed information about whether uploads are supported in Silverlight 4. I'm also looking to encode the audio to MP3 before upload and have seen some refer...

Silverlight Byte[] to its original file format

Hi, is there a way to convert byte[] to its original file format? Byte[] tempByte = new Byte[content.Length]; tempByte = Convert.FromBase64String(content); ...

Siverlight 4.0: How open a file

I want to create a program which opens my file onClick by providing its content in byte[] format in new page. Please help. ...

Silverlight 4 RIA does not return anything using DomainContext

Hi everybody! Just learning Silverlight 4/RIA and i 'm stuck in a weird problem: setup an ASP.NET MVC project as the project hosting the Domain service. In this i tried to get data from the Domain Service which worked fine (i'm using a repository which gets resolved using Windsor Castle). Now i tried to setup a SL4 project. I though i ...

Check for updates periodically

I have a SL 4.0 app running out of browser with full priviliges. How can I check for updates (CheckAndDownloadUpdateAsync()) every 10 minutes without affecting UI thread. I've tried using the Timer, but the CheckAndDownloadUpdateCompleted doesn't get executed. I think it is erroring out silently. Thanks in advace... ...

Implementing the double-click event on Silverlight 4 Datagrid

Any good soul have an example of implementing the "Command Pattern" introduced by Prism on a double click event in a Silverlight 4.0 DataGrid? I tried the following: <data:DataGrid x:Name="dgUserRoles" AutoGenerateColumns="False" Margin="0" Grid.Row="0" ItemsSource="{Binding Path=SelectedUser.UserRoles}" IsReadOnly="False"> <data:D...

Users need Silverlight 4.0 for Expression Blend?

I have Visual Studio 2010 beta 2 installed and Expression Blend Preview for .NET 4. When I began to debug it, it asked me to install Silverlight 4.0 beta. So now I am wondering if people who are going to view my application need to install Silverlight 4.0 instead of Silverlight 3.5. If so, how can I downgrade from 4.0 to 3.5? ...

FileInfo..ctor(string fileName) throwing exception: bug in SL 4.0 or .NET 4.0?

The following test case passes in .NET 4.0: var fiT = new FileInfo("myhappyfilename"); Assert.IsNotNull(fiT); ... but fails in Silverlight 4.0 with the following error: System.ArgumentNullException: Value cannot be null. Parameter name: format at System.String.Format(IFormatProvider provider, String format, Object[] args) at Sy...

Silverlight 4.0: How to increase quota in Isolated File Storage

Got this line of code here but its not working. private void Button_Click(object sender, RoutedEventArgs e) { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication()) { long newSpace = isf.Quota + 1523456786435; try { if (true == isf.Increa...