silverlight

Custom MediaStreamSource and MediaElement.Naturalduration property

i have written a custom mediastreamsource, that can play media from growing source files (mpeg transport streams). Once it reaches the end of its mediastream, it reads the new duration from the mediafile and continues to deliver samples. The MediaElement plays continously. Unfortunately i haven´t found a way to update the MediaElement.N...

WCF RIA +SL4 - how to validate a collection?

Hello! I'm using WCF RIA + Silverlight 4.0 in my project. On client and server side I need to check (via validation process) if collection (e.g. Orders) that belongs to e.g. Manager is filled or not. The rule is that at least one Order should be there otherwise validation failed. Orders are loaded together with Manager via [Include] a...

Silverlight vs expression blend

I am a bit confused about the difference between Silverlight and Expression Blend. From my understanding, Silverlight is used to create a better interface, and Blend is used to create animations? Meaning you can use Silverlight without having to use Expression Blend (there is much demand for Silverlight developers, but I from what I know...

Retrieve only one item with MVVM light in Silverlight

Hello, To grab some content from a WCF Data Service into my View Model is straight forward: public const string RequestsPropertyName = "Requests"; private DataServiceCollection<Request> _requests = null; public DataServiceCollection<Request> Requests { get { return _requests; } set { if (_requests == value) { return; } ...

Best Practice: Authentication between Silverlight Client and a.Net Server

Hello, I'm working on a Project where I run a Server that is basically a .Net C# Application with a SQL Server Express DB and will now use WCF for Webservice implementation and then there are Silverlight Clients that different Companies will use to interact with this Server. How do I implement User Authentication in a good and reliable ...

Silverlight plugin crash

I have encountered numerous times when a silverlight program is running perfectly, but after a random interval, I will see the silverlight plugin crash message. It happens on my own projects before which just display a static page with UI for me to test. Was running on localhost. Happened at a networked area where my frenz access my ii...

String Localisation Problem in Silverlight Application

I have an odd problem in silverlight. I use the following XAML to bind the content of a label to a double property in my viewmodel. Content="{Binding FeePeriodActual, Mode=OneWay,StringFormat=\{0:c\}}" However, the display string always shows the $ Dollar Currency symbol rather than the the £. This is the same on the production serv...

Import many pages from a xap file in Html

I'm starting at silverlight and I tried to import two pages(.xaml) from a .xap file in one HTML. ...

Is it possible to import Photoshop PSD to Expression Blend to fill in an existing layout structure?

I need to create a fairly complicated layout for a widget in Expression Blend, with the visual design not yet set to stone, while having fairly refined functional wireframes. So I started to lay out the UI controls and choosing layout structures based on the wireframes, but as far as I have seen so far while experimenting, PSD files wil...

How to get the target of a Drag Drop operation on a TreeViewDragDropTarget in Silverlight?

I've looked at the Drop and ItemDroppedOn Target event handlers but it appears that you can only access the source. The sender is the TreeViewDragDropTarget when I actually want to see the item in the TreeView that is being dropped on. ...

SL 4: Strange behavior with templated control

Hello, We have some xaml: <Style TargetType="local:V_RelLine"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:V_RelLine"> <Grid x:Name="LayoutRoot"> <VisualStateManager.VisualStateGroups> </VisualStateManager.VisualState...

combining resources in xaml

I have a window that is composed of several UserControls, three of which are DataGrids. It looks like this: <DockPanel LastChildFill="True"> <local:MainRibbon DockPanel.Dock="Top" .../> <local:LeaveTimeActivityGrid ... /> <local:AdminActivityGrid ... /> <local:TotalsFooter ... /> <local:ProjectActivityGrid ... />...

OnSubmitted event

Hi. I have a silverlight 4 ria app, and I'd like to fire an event after entities have been submitted to the database. I thought that I could use the dataclassescontext methods like OnCreated() OnIdChanged() but they are called before submitted, and I only want to fire the event once a new entity is added to the db, and once an id chang...

Need to transform a rectangle's color in Windows Phone 7

I have a rectangle, and I have a storyboard: <Storyboard x:Key="PressAndHoldColorBar"> <ColorAnimationUsingKeyFrames Duration="0:0:10" FillBehavior="Stop" Storyboard.TargetName="rectWarning" Storyboard.TargetProperty="Fill"> <LinearColorKeyFrame KeyTime="0:0:0" Value="Green" /> <LinearColorKeyFrame KeyTim...

How to detect MouseLeave on a UIElement that is a Drag source in Silverlight when Dragging?

I have a StackPanel with MouseLeave events. I have run into an issue where MouseLeave events are not occurring for this StackPanel when elements are being dragged from this stack panel to other outside elements. How can I have the MouseLeave event detected when Dragging? Thank you. ...

Is there any way to develop Silverlight applications on OS X?

While all of my machines are Macs, I actually really enjoy working in .NET. I thought it would be fun to try my hand at writing a Silverlight application. Unfortunately, as near as I can tell, Silverlight is not a part of Mono that actually works on OS X. Is it possible to develop Silverlight on OS X, or will I need to use a VM? If it's...

How can I include PDB files in a Silverlight XAP?

Is there a way in VS 2008 to specify I want to include pdb files for all/some dlls in the xap generated? Background We have written a Silverlight framework that is used by multiple projects with some base UI controls and functionality. These framework dlls and pdbs are brought into projects via svn:externals into a lib folder. The Si...

Is it possible to change how DomainContexts are generated by Silverlight RiaServices?

Hi guys, Is it possible to change (maybe there is a T4 hidden somewhere...) the way Silverlight Ria Services generates the Domain Contexts classes? I would like to add an interface to them so my ViewModels can use the interface instead of the class making them more unit testable. Tks, André Carlucci ...

WebBrowser control has different results for loading URL and setting DocumentText containing Silverlight

I have a .NET 2.0 app (using C#) that shows some dynamically constructed HTML pages, some of which contain Silverlight. Here's a simple example of the HTML (Note, I am using absolute paths): <html> <head></head> <body> <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" he...

Is there a way to programmatically cancel editing a text box?

In my windows phone 7 App I have a single line textbox. When the user presses {ENTER} I want to accept the textbox value and switch the textbox back into normal non-edit mode. Basically, is there a way to programmatically cancel editing a textbox? I have tried force the Visual State Manager into Normal mode which does change the v...