silverlight

Get Asynchronous HttpResponse through Silverlight (F#)

I am a newbie with F# and SL and playing with getting asynchronous HttpResponse through Silverlight. The following is the F# code pieces, which is tested on VS2010 and Window7 and works well, but the improvement is necessary. Any advices and discussion, especially the callback part, are welcome and great thanks. module JSONExample open ...

Setting content of TextBlock and text of HyperlinkButton in silverlight custom control

I am trying to create a custom control that will display a hyperlink button with some text below the link. The idea is to have urgent messages show up on a screen of a Silverlight page. From what I have read, I thought that I should be able to create a new control and then create some dependancy properties and bind the dynamic parts of t...

MSBuild command-line error - Silverlight 4 SDK is not installed

My MSBuild command line is as follows: msbuild e:\code\myProject.csproj /p:Configuration=Debug /p:OutputPath=bin/Debug /p:Platform=x86 /p:PlatformTarget=x86 The project builds fine on my development machine in VS2010 but not with the command above. I am running Win 7 64 - Bit. I'm getting an error that says I don't have the Silverli...

Silverlight Prism Module Not Ready

I'm building a Silverlight 4.0 application with Prism (a.k.a. Composite Application Guidance). I have two modules, both defined in my ModuleCatalog.xaml as WhenAvailable. My Application_OnStart instantiates my Bootstrapper and invokes it's Run() method. Well after my application is started and up and running (in fact, the user has to ...

where does IValueConverter.Convert source the CultureInfo parameter from?

I'm going through some silverlight apps and reviewing date formatting to make sure the presentation is appropriate for the viewer. with an implementation of IValueConverter, where does the culture parameter come from in the Convert/ConvertBack functions? it seems to not be CultureInfo.CurrentCulture which I think is what I want. ...

MVVM, Animations, Binding - I need a quick question answered.

http://stackoverflow.com/questions/2455963/wpf-mvvm-dynamic-animation-using-storyboards There is a question i have found that relates directly to the issue I am having. The answer provided in that thread is a bit short, however. I did a little looking on google for 'attached properties' and i still remain a bit confused. Could someon...

Binding to 'To' In Storyboard

I'll try to make this as simple as I can. I want to do this: <Storyboard x:Name="MoveToLocation"> <DoubleAnimation Duration="0:0:0.5" To="{Binding X}" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="grid" d:IsOptimized="True"/> </Storyboard> As you may have noticed the...

silverlight treeview not loading subitems

I'm interested in finding out why this isn't working: I have a treeview with some hierarchicaldatatemplates looking like this: <UserControl.Resources> <sdk:HierarchicalDataTemplate x:Key="nodeEntry"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Path=Title}" /> ...

Sharing assemblies between .Net 4 and Silverlight 4

At the last PDC (can't remember which talk it was) they gave us the information that it will be possible to share assemblies between regular .Net 4 and Silverlight 4. Unfortunately I can't find anything on this. Was this feature dropped? What options/limitations are there? (There are similar questions on SO but they don't say if they a...

Set ContentTemplate in CodeBehind: XamlParseException 2260 Error

Hi, I'd like to change the ContentTemplate of a ContentPresenter in the CodeBehind file. But if I run the Silverlight 4 application a XamlParseException with the error code 2260 occures. foreach (ContentPresenter item in Headers) { item.ContentTemplate = Parent.UnselectedHeaderTemplate; } if ((index >= 0) && (index < Headers.Count...

Retrieving selected data from DataGrid with IEnumerable<IDictionary> (Silverlight)

I have an application that can dynamically load data into a DataGrid. What's needed is an object of IEnumerable<IDictionary>, and a List<Dictionary<string,object>> is supplied (each Dictionary in the list has exactly the same keys). The data is loaded into the DataGrid and shown, but now I want to retrieve the data the user has clicked ...

Richtexbox persistence in Silverlight 4

Hi to all, I want to save the contents a user puts in a richtext box to a database. Currently it is just text with formatting (bold text etc). I know there is a xaml property with all the formatting which I could store, however other users who use the database directly may want to have access to only the text that was input by the user...

2 (or more) ComboBoxes dependent on each other

Hi, EDIT: The issue underneath is fixed, GO TO EDIT2 in this post. I have an Organisation entity and a Region entity. An object of type Organisation can have one or more Region objects connected to it, thus I have a foreign key in my Region entity to the Organisation Entity. The Organisation and Region objects are pulled from my databa...

Is it possible to dynamically change the style/template of a control?

I am creating a UserControl in Silverlight 4 which has a watermarked background. The watermark should change depending on the underlying 'type' the UserControl is representing. The watermark is created using a Path and I have extracted all the properties into a style. I was wondering if it would be possible to change the style of the ...

Blend 4 breaks VS2010 for Silverlight

Hi, I had VS2010 running fine with Silverlight development. Then I installed Expression Blend 4. Now when I run VS2010 and try to debug a silverlight app I get an error saying "Unable to start debugging. The silverlight developer runtime is not installed. Please install a matching version." I've tried uninstalling silverlight tools, and...

Relative Links in PDF

Hi, Need some advice on what course of action to take next. Have written an ASP.Net application. Part of the application deals with being able to view PDFs. The initial PDF viewed acts as an index to access other PDF documents. You click a link in the Index PDF and it jumps to another PDF file. Legal documents, agreements, etc. This s...

Silverlight Issue : Save in Jpeg format

Hi All, I am new to Silverlight. We are working on silverlight 3.0 and telerik controls. I want to implement a functionality that specific part of the file like stack panel or grid needs to be export or print to the image format. I mean when i click on specific button then that part of the application needs to export in image format. ...

Using embedded resources in Silverlight (4) - other cultures not being compiled

I am having a bit of a hard time providing localized strings for the UI in a small Silverlight 4 application. Basically I've put a folder "Resources" and placed two resource files in it : Statuses.resx Statuses.ro.resx I do have an enum Statuses : public enum Statuses { None, Working } and a convertor : public class Statu...

Silverlight Line Graph with Gradient

I have a series of points which I will turn into a line on a graph. What I want is to give the area under the graph a gradient fill. It would look somewhat similar to a Bloomberg graph like this; My question really has three parts; First, how should I fill only the area under the graph? Second, how do I fill that with a gradient? F...

how many lines of code does my class library have

for metrics reasons I need to know how many lines of code my class library has. I'm doing this for code coverage.... So if Class library 1 has 50 lines of code and 100% coverage And if Class library 2 has 500 lines of code and 0% coverage My total coverage is 90% Any idea how to do this? Is there a utility or a way to use Visual Stu...