silverlight-4.0

WCF Return Types

I've got a WCF web call which returns the result of a SQL Command. However this SQL Command is dynamic so i don’t know how many columns and what data types there are going to be. How do i the results over WCF to a Silverlight application? (Btw i then want to be able to put this data into a data grid) Thanks ...

putting Button inside a TextBlock(or maybe something else) to make it work like the one on video??

Hi with Silverlight 4, I am trying to create the TextBlock just like the one on the Microsoft LightSwitch(Modal Window Picker) . So I can use it as a customControl inside the GridView columns. this is the link from youtube: you can see the one i am talking starting at time 08:54 / 14.50 on the Business label http://www.youtube.com/w...

OOB constantly asking for update in silverlight

When I launch my OOB App, it keep asking for Update available and downloaded, even nothing changed. ...

Silverlight 4 [Telerik 2010, VS 2010] - Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

Hi All, We are just migrating from silverlight 3 to Silverlight 4. and also from telerik 2009 to 2010. There is one functionality of GridView, that when click on the cell it will open the popup. Because of the upgration, we have newly implement some classes like "Public Class GridViewCustomColumnCellProperty : GridViewBoundColumnBase"...

Hilighting nodes of xml file in silverlight on selection of treeView Item

Hello, I had xml file in web project. I bind it with treeview using WCF. Now when user click on the treeItem then corresponding xml node must be highlighted. How to do this. Please anyone help me? Thanks. ...

Image within Silverlight 4 user control is not being set

Hi, I have a Silverlight user control that has an Image control within it. This image needs to be set by another page that contains the above mentioned control, through a datamember of a bound list of items. Currently, the image does not get set when the URL is sent through to the user control. In actual fact, no code other than the Set...

Why Visual states do not work ?

I'm trying to create animatable control but it seems animation does not works. What happened with VisualStateManager ? <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="loginStates"> <VisualState x:Name="ready"> <Storyboard> <ObjectAnimationUsingKeyFrames BeginTime="...

Change applicationbar buttonicon at runtime

hey, I'm developing a WP7 app and needs to change the icon of a button on the application bar given the state of a request. I have tried: if (App.Servers[index].ServerState == "Enabled") { DetailsAppBar.btnStart.IconUri = new Uri("/AppBar/appbar.stop.rest.png"); } else { DetailsAppBar.btnStart.IconUri = ne...

silverlight 4 and ListBox Binding inside the DataTemplate

Hi All, I have a ContentControl which has a DataTemplate defined as the ContentTemplate. In the DataTemplate I have two TextBlocks and a ListBox. I have the two entities(Parent/child) as the data source. What I want is to Bind the Two TextBlocks with the Parent fields and the ListBox with the Child record's list (Customer/Orders). My qu...

Drop Event Listbox

Hello, I am trying to add the contents of my textfile to listbox. Here is the code :- This is my MainPage.xaml :- <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/...

Cannot find a Resource with the Name/Key

I'm trying to unit test a user interface using the Silverlight 4 Toolkit. When I attempt to instantiate the UserControl, it's throwing an exception because in the XAML of the UserControl it's using a Style defined App.xaml. Is there a way to load the resource somehow before I instantiate the UserControl? Am I going about this the wron...

Entity Framework 4 and SQL Server 2008 R2 Change Data Capture Not Playing Nicely Together

When I try to use these two features together, I get a compilation error on my model (note, I've renamed the entity for my _CT table "ContentHistory" and my SL4 Unit Test project is called "DomainServices.UnitTest": Error 39 Property 'DomainServices.Web.ContentHistory.C___seqval' is marked as a key property and is of Type 'System.Byte[]...

Silverlight 4 : Uploading file to server

Hi Guys, Here is an easy one: I need a stable simple file uploader with a progress bar, I have found lots of fancy ones from the search. However, I need the community opinion on which ones to go with? Tutorial links would be appreciated. BOUNTY: I have a FileStream which I would like to upload to a server, below is a sample server se...

How to replace a ResourceDictionary of a 3rd Party UserControl (in this case PivotViewer)

The current version of the Microsoft Live Labs PivotViewer control for SilverLight 4 has no way to style the elements of the control. Looking at the control in Reflector, I can see much of the style info is set in a ResourceDictionary in the assembly (assets/defaultcolors.xaml). What I would like to do is create my own copy of this fil...

[silverlight 4]OpenFileDialog: How to copy files in a local folder?

Hello everyone, In my silverlight application I would like to be able to select a file from an OpenFileDialog window and upload/copy it to a local folder in my Silverlight project. I am already able to setup a OpenFileDialog window and set some options to it, but unfortunately I can't find a way to create a filestream and then copy it t...

Silverlight Textblock set lines...

Hi All, I have to develop a control having one datagrid. now datagridtextcolumn have to be binded with one property of collection created in viewmodel. based on data i have do one thing... if for a row no of lines is more than 3 in last column's cell then show a button having text "More" with last cell else with text "Less" and on click...

Silverlight 4 OOB App with elevated trust and signed cert does not update? Need to re-install?

I have a OOB app that did not require elevated trust and was not signed. Many people have downloaded it and use it OOB. I then needed to use elevated trust features, so I bought a legitimate certificate from Comodo and I now sign it. Everything works great on localhost - it is trusted and recognises the certificate. However, once I upl...

How to disable mouse wheel scroll in listbox in silverlight 4?

I am not able to disable default behavior of mouse wheel scrolling in listbox control of silverlight 4 and apply my custom scrolling animation to listbox on mousewheel event. When I added my animation to mouse wheel event of listbox, first list box items get scrolled according to mouse wheel movement and then my custom animation to scrol...

No intellisense for dynamic keyword?

Hello, I am reading Silverlight 4 in Action and simultaneouly trying examples in it. However, i can't seem to understand the new dynamic keyword and why is it needed for COM. This is my code :- if (AutomationFactory.IsAvailable) { dynamic excel = AutomationFactory.CreateObject("Excel.Applica...

How can you prevent Silverlight Client Http request from caching respones?

I am using a HttpWebRequest created from WebRequestCreator.ClientHttp.Create() to fetch data from a webservice. And everything seemed to be working fine until I found out the calls where being cached. I was pretty sure that the ClientHttp did not include caching, but after a bit of searching I found this little note: Client HTTP Pro...