silverlight

XAP Caching in Out of Browser (OOB) Silverlight Applications

When a Silverlight 4 application is installed and run out-of-browser (OOB), is it possible to have the application automatically recognize updates to the .xap file (and either automatically install or prompt the user to update)? If you access the application from it's original web URL, you are automatically given the latest & greatest (...

Silverlight 4 PagedCollectionView with Multiple Filters

Hello, I'm new to Silverlight 4 and the PagedCollectionView. I know it's possible to add a filter to a PCV such as pvc.Filter = new Predicate(FilterProjectId); Where pvc is a populated PagedCollectionView. What I need to do is stack multiple filters to a PCV as I've got a search screen with about 6 fields on it and a DataGrid that...

Triggering a Silverlight Storyboard Behavior on Demand

I am messing with Silverlight trying to find out how to make it tick, and there is one thing I don't seem to be picking up on, with respect to Storyboards and getting a behavior to launch on demand. The following describes a blue ellipse which has a Transform Y-axis projection on the Y-axis so that when triggered it looks like a circle ...

Why Does ItemsControl Not Use My ItemTemplate?

I am able to use an ItemTemplate within an ItemsControl to render items in a specific format. However, if one of the items within the ItemsControl happens to be, say, a TextBox, that TextBox is rendered rather than an instance of the ItemsTemplate. From what I can tell, this is true for any FrameworkElement. Is this intended behavior ...

Silverlight printing busy\progress bar.

I'm using Silverlight 4 to print but I would like some sort of progress bar or busy indicator. I've tried to using a progress bar but it is not really working. The 2 issues I have are: the progress bar does not indicate progress, I have IsIndeterminate=True, but it does not animate when printing starts (Print dialog's Print button is...

How do I add a 'checked'/'unchecked' event handler to a checkbox in codebehind using Silverlight?

Okay this one's pretty straightforward. I'm creating a checkbox in my Page.xaml.cs file, and assigning it some params. I need to link to events for checked and unchecked. What is the syntax for this? Also, my current code looks like this: CheckBox cb = new CheckBox(); cb.IsChecked = true; System.Windows.Thicknes...

How to interact with sites in wp7?

I need to send and receive get post requests ...

Silver light web part could not be displayed while using it with ADO.NET service in SharePoint 2010

Hello Everybody, I have created a silver light application which leverages the ADO.NET Data Services in SharePoint 2010 and trying to achieve the CRUD functionality through ADO.NET data service. For that I have added service reference by specifying URL as http://:1111/_vti_bin/listdata.svc to my silver light application in visual 2010. ...

How to Insert row into SQL database with IDENTITY_INSERT set to OFF using WCF services?

An SQL table has auto increment property set for the primary key AnnotationID of INT type. The Silverlight application WCF service code: public void InsertImageAnnotation(int imageId, string imagePath) { DataClassDataContext db = new DataClassDataContext(); ImageAnnotation row = new ImageAnnotation(); r...

Binding in PrepareContainerForItemOverride method.

Hi! I try to implement PrepareContainerForItemOverride method of ItemsControl. It will put items to TextBox. It works nice, but how can I binding an item to the textbox text property? One way mode works nice, but when I want two way mode, I have to know the path. Here is my code: protected override void PrepareContainerForItemOverride...

Looking for a simple Silverlight map component

I am looking for a light-weight map component that displays a map of the US and allows users to click on a State and see information pertaining to that state. The data I want to display is in my database. I just need to know what state was selected so I can display the detail. This is something I am doing to get familiar with Silverlight...

What is the best easing function to simulate a GUI item dropping?

There are so many easing functions available in Expression Blend, and so many settings on each, it is often hard to know instinctively what easing function to choose. Trying all the options would take quite a long time. In this instance, I want to give the impression that the item has fallen forward and down. I am using a projection rot...

Using the DragDropTarget with a traditional Grid

Silverlight 4 now provides controls to handle Drag and Drop actions. All the Target Controls seem to inherit from DragDropTarget Like so public class MyControlDragDropTarget : DragDropTarget<TItemsControlType,TItemsContainerType> . . . A number of controls have pre-defined DragDropTargets including the DataGrid, ListBox, Panels Whic...

Passing array from aspx.cs to xaml.cs

Is there a way to pass an array or List<> from the aspx.cs to xaml.cs? ...

Data Binding + Adding extra information

Hello StackOverflow, Odd question as I've never attempted this before in my usual data binds. Say if I was binding data to a textbox and my data was a specific number "123", yet I wanted the textbox to display "Data: 123". Without adding that extra piece of information "Data: " to the return in the object itself, is this possible? Che...

How to clone Silverlight visual tree structure

I have the same problem as the question stated in "Printing in Silverlight 4". To get around the problem, I have tried to scale transform root of my visual tree before printing. void document_PrintPage(object sender, PrintPageEventArgs e) { var renderScale = 1.0D; if (LayoutRoot.ActualWidth > e.PrintableArea.Wid...

Silverlight - detect what is under a pressed button

Hi I am creating a card game in Silverlight. Each player has a Hand which contains multiple cards. A card is a customised button e.g. public partial class CardButton : Button When a player has 2 or more cards of the same rank, I want a mechanism to be able to select both of them. So I have attached a mouse over event to each card,...

How to display HTML in Silverlight application?

Hello, I would need to display some basic HTML (just some paragraphs, unordered lists and hyperlinks) in my Silverlight application. How would I go about that? Which control to use? ...

Multiple problems with HttpWebResponse

So I am trying to create a simple class which I could use to consume REST web services. However I am having some troubles with HttpWebRequest object. Here is my code: using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; ...

Silverlight page login/redirect/navigation

Hello, I am building a silverlight application that needs to have a login page and if the details are correct I need to redirect the user to the actual application. What would be the best way to proceed? This will be my first silverlight app. I was thinking of having a login page that redirects the user to another page that uses the si...