silverlight

qtbrowserplugin vs flash/silverlight ?

Our team is looking for alternative to ActiveX for our browser based client. So far flash, silverlight, HTML5 are being considered. Since I have some prior experience of Qt I am thinking of suggesting Qt. From documentation it seems QtBrowserPlugin is req for our purposes. There are three criteria that any alternative must satisfy Mu...

Using Image Control in Silverlight (4)

I'm trying to use the Image control is a very basic way, like here: http://www.silverlightshow.net/items/Using-the-Image-control-in-Silverlight-2-Beta-1.aspx So I'm ending up with XAML like this: <Image x:Name="imgSmall" Stretch="Fill" Source="../Img/Small/105.jpg" Margin="10,0,0,0"></Image> Which isn't working. The Image is blan...

Uploading file from silverlight to WCF service

I am having trouble to upload(from Silverlight 4) a wav file to the server(WCF .NET 4). The file is uploaded from SL to server and write it to disk. But the uploaded file is changed. The two files(before uploading and the uploaded one) have exact same size but different content. And I tried the uploading in a normal console program, it w...

WCF RIA Services - returning custom class of two already defined classes

I have a Silverlight / WCF RIA Services application that uses EF 4. Currently, there is a domain service that returns two types of classes, OrderItem and Event. I'd like to create a class that contains both of these items for easier manipulation of the data at the XAML level. Here is what the class that combines the two classes looks ...

WrapPanel in Silverlight 4 toolkit

This seems like such a silly question, but I can't for the life of me figure out how to use the WrapPanel in the most recent (April 2010) Silverlight toolkit. Apparently they thought it was a good idea to change the namespaces/assemblies around, and not put anything on their codeplex site about this. And their samples for these control...

How do you prevent PrintDocument in Silverlight 4 of producing extremely large spooling data?

I've created a bare bones example to try and figure out why the data being sent to the printer is so large. I'm sending one text box with "Printing text." as its content. This results in ~90MB being sent to the printer. Why is this so large? Can someone please explain how I can avoid this? Here is my example <StackPanel x:Name="L...

Deadend whilst Debugging Silverlight with WinDBG and SOS

I'm new to WinDBG. I'm looking for the cause of a memory leak and I've got as far as my current knowledge can take me. My MVVM App is leaking MyLovelyView objects. In WinDBG I run !dumpheap -type MyLovelyView and get the following: Address MT Size 05f2a978 0bc948d4 12 05f39638 04d51114 36 05f398d4 04d2...

How to get Custom validation error?

Suppose I have entity Person with properties typeid and salary. I build a business rule for this two properties like: public static partial class MyRules { public static ValidationResult Rule1(Person p, ValidationContext context) { if ((p.typeid == 1) && ((p.salary == null)) { ...

Is there a prefered approach for introducing a delay before a WCF call

As my user changes the CurrentItem of a dataForm, I need to go the server to get addtional data. It's quite likely that the user could scroll through several items before finding the desired one. I would like to sleep for 500ms before going to get the data. Is there a component already in the SDK or toolkit like a background worker th...

Control Library Issue: Failed to create a 'System.Type' from the text 'local:SolidGloss'

I'm working on a library of custom controls and I'm stuck on this error. Can anyone tell me what I'm missing? SolidGloss.cs: using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Anim...

WP7 Disabled Button Style

I am trying to do change the color of a disabled button's border/text. Code: <Style x:Key="TopTabChooserButtonDisabled" TargetType="Button"> <Setter Property="Foreground" Value="Orange" /> </Style> But it doesn't affect the button at all in Silverlight. Does anybody know what will make it change? THanks. ...

Finding Child Objects in ViewBox/Canvas Object

I've implemented a drag and drop that is mostly working in my Silverlight 4 app. Once the users have dropped the shapes onto the canvas, I wanted to use Size & Child Decorators. I've tried to implement the sample code. Code below is problem section of much larger app. xmal - <ScrollViewer Grid.RowSpan="1" Grid.Row="2" Grid.ColumnSpa...

Generally speaking, how do I implement a realtime monitoring system?

Suppose I have either an ASP.NET displaying my results, or a Silverlight client. And I'd like to show the current status of my server, or embedded device. (pretend the device reads temperature and humidity stats) How should I send the status information from my device to the front end? Should I poll the device and save the results to...

Silverlight 4 - simple control template

<DataTemplate x:Key="dirtSimple"> <TextBlock Margin="10,0,0,0" Text="{Binding Path=CurrentBook.Published, StringFormat=d}"></TextBlock> </DataTemplate> <ControlTemplate x:Key="lbWrapPanelTemplate"> <StackPanel Orientation="Horizontal" Margin="2" Background="Aqua"> <ItemsPresenter></ItemsPresenter>...

Silverlight ItemsPanel - WrapPanel

<ItemsPanelTemplate x:Key="lbWrapPanelItemsPanelTemplate"> <wp:WrapPanel Margin="2" Background="Beige" HorizontalAlignment="Stretch"> </wp:WrapPanel> </ItemsPanelTemplate> ..... <Grid Background="LightCoral" MinWidth="500" MinHeight="500"> <Grid.ColumnDefinitions> <ColumnDefinition Width="200"></Col...

MediaPlayer.Play(song) - can't be called twice with the same song?

this is what i have: MediaPlayer.Play(DataFile.AllMusicTitles[0].SongFile); System.Threading.Thread.Sleep(3000); MediaPlayer.Play(DataFile.AllMusicTitles[1].SongFile); System.Threading.Thread.Sleep(3000); MediaPlayer.Play(DataFile.AllMusicTitles[0].SongFile); play s0, sleep, play s1, sleep, then play s0, then 2nd time i pla...

How to switch UI Culture of data binding on the fly in Silverlight

I have a TextBlock control, which is data bound to DateTime property. The text displayed something like this: Thursday, October 21, 2010 I need to switch UI Culture on the fly, using something like this: Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInf...

For a user control, how to set the binding of a item template item to a user property?

I have a simple user control, which is essentially just an AutoCompleteBox with some custom logic. For a specific instance (a collection of Persons), I want it to look like this: <sdk:AutoCompleteBox Name="myACB" ItemsSource="{Binding People}" FilterMode="StartsWith" MinimumPrefixLength="2" ValueMemberBinding={Binding LastName}> <sdk...

two questions about rectangle and canvas in silverlight 4

I have a rectangle on canvas. I can already moving this object using with mouse, but I can't find how can I resize it in runtime using mouse too? And second question, how can I programatically check positions of each objects (e.g rectangles) on the canvas? ...

Visual studio web

Whats the easiest way to create a web application for tcp server/client or socket? Ive looked at silverlight but im not sure if thats the way to go. ...