silverlight

How would I organize these calls using Reactive Extensions (Rx) in Silverlight?

I have some calls that must execute sequentially. Consider an IService that has a Query and a Load method. The Query gives a list of widgets, and the load provides a "default" widget. Hence, my service looks like this. void IService.Query(Action<IEnumerable<Widget>,Exception> callback); void IService.Load(Action<Widget,Exception> callba...

Faking synchronous calls in Silverlight WP7

I'm porting some code from the full .NET framework to the WP7 version and I'm running into an issue with synchronous vs async calls. string response; string requestString = GenerateReqString(); HttpWebRequest req = (HttpWebRequest) WebRequest.Create("endpoint"); req.Method = "POST"; req.ContentType = "text/xml"; req.ContentLength...

How to change itemTemplate of an item in itemControl at runtime in silverlihgt 4

I have a ItemControl in silverlight 4 with a Canvas as a ItemPanel, the idea is to simulate a canvas area with drag and dop items. ItemsControl has a ItemTemplate with a image and one button. The idea is that when the button of itemTemplate Click the itemTemplate change. Some of my code: (Items Control) <ItemsControl ItemsSource="{Bin...

ComboBox drop down not dropping

I have a style for a ComboBox that I've been using for awhile, but I wanted to tweak the color of the drop down arrow. To do this, I just took the default template for the comboBox and pasted it into my style, and changed the arrow color fill. It looks perfect - until I hit the drop down! Nothing happens. If I cut the template from the ...

DesignInstance: Type was not load

Attempt to make a stub data for custom Silverlight 4 control failed. Here is XAML code: <UserControl x:Class="VfmElitaSilverlightClientView.Pages.FieldItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expressio...

Silverlight: How to implement CodeBehind code in XAML

There is an int property of the 'CustomControl' (in Silverlight 4 application), TextBlock is displayed inside of the 'Canvas' control: <Canvas Name="canvas" > <Ellipse Fill="Yellow" Canvas.Top="8" Canvas.Left="8" Height="16" Width="16"> </Ellipse> <TextBlock Name="TeamNumberTextBlock" Text="9" Canvas.Top="8" Canvas.Left="8" ...

Silverlight scrolling animation utilizes large amounts of CPU time

In our app, we have some scrolling credits in a ChildWindow. When showing this window, our CPU utilization is very high. The text is using a BitmapCache and hardware acceleration is enabled. Even after removing the clipping rectangle and the drop shadow from the child window, the CPU usage climbs to 80-90%. When I enable redraw regio...

Silverlight Browser App to Desktop App

I saw this Silverlight application that works inside the browser but if you clicked Install it will be downloaded on your machine and runs as Desktop Application how this can be done !! http://os75.com/apps/Translator.html ...

silverlight XAP gets downloaded everytime

Hi All, Ive just uploaded my silverlight webpage to my production webserver. The issue im having is that everytime I open the website in the browser it is downloading a new copy of the XAP. Any ideas what could be causing this issue? Thanks ...

XAML usage question

Hi, As far as I know, XAML is only used in WPF and Silverlight, isn't it? Thanks. ...

VS2010 Silverlight project add reference defaults to GAC

I have the SL Control toolkit installed on my machine and I have added a reference to the toolkit DLL (System.Windows.Controls.Toolkit.dll) I like to have all my external dependencies in a lib folder under the SL project, so I copied over the DLL from the installation dir of the control toolkit to the lib folder, but if I try to add ref...

How to create Custom Spalsh screen while Silverlight downloader download Application Library Cache files ?

Hello, I have created a sample application suing Application cache, My some files are located on server. its working fine. But Now I have added appx 10 MB ZIP file and now want to downlaod, Silverlight downloader show 100% in xap download and then no progress show just circle appears. I have tried the http://pagebrooks.com/archive/200...

Silverlight : Create Generic Control from backgroundWorkder Thread

Hi, I'm in trouble when using the background worker to create my object model. As I understand why, I'm unable to find a workaround. Here is the pseudo logic : Call Webservice async When received, open a background worker, and load data into controls in the background in the Load method, search for an existing object and if not foun...

Three state button in Silverlight

I have a button with 3 States Start/Resume/Pause. 1 Is this a good pattern to solve this or maybe there is some toggle button mode that I am not aware of? private void cmdStart_Click(object sender, RoutedEventArgs e) { if (m_end) { // Reset the game. m_end = false; cmdStart.Conten...

Custom DataGrid column with a CellTemplate and binding

I need to create a reusable DataGrid column with a custom CellTemplate. This CellTemplate should, among other things, contain a TextBlock control to which I need to bind values to display in the DataGrid. All examples I've seen so far specified the CellTemplate for a column directly when using it in a DataGrid's Columns property and also...

SharePoint 2010 Silverlight application server object model?

I am currently getting myself up to speed with SharePoint 2010 and I am working my way through the different way SharePoint can expose silverlight applications. As I understand it, the client object model is more restricted, and is for other applications to interact with SharePoint via WCF for example. An example would be a custom bui...

How can I control the SpeedRatio of a Storyboard inside a VisualState?

Given a Storyboard started by the VisualStateManager as part of a ControlTemplate, how would I adjust the SpeedRatio of that animation based on property changes of the control? <ControlTemplate> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup> <VisualState> <Storyboard Name="SpinningThing" ...

why does my silverlight reference to my wcf service blow up when I add a method to the wcf service that returns a generic list

I have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple: public String SfTest() { return "SF Test"; } No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this: ...

Silverlight, SOAP, and GZip - troubleshooting

How do I turn off gzip compression on my SOAP requests from Silverlight 3 or 4? I'm getting a 500 error from my server page (asmx) and for some reason the debugger doesn't catch it. Because the 500 error response is encoded I can't tell what the problem is from Fiddler. Or if I could turn it off from the asmx side that would be fine too...

Binding a combobox to a list in the viewmodel

I have a viewmodel with a property Animals of type list. I am trying to bind this list to a combobox in my xaml page. I cannot seem to get this combobox to bind. What am I doing wrong? <ComboBox x:Name="uxAnimal" Grid.Row="0" Grid.Column="1" Width="130" HorizontalAlignment="Left" ItemsSource="{Binding Path=Animals}" > Thanks ...