silverlight

Silverlight Map Tiler

Hi there! I just started learning Silverlight and onTop of that I have to create a map viewer that displays our map tiles. I have search EVERYWHERE online and cant find anything that helps me. All Im looking for is a way to Display the tiles and have it draggable so that it starts pulling off more Tiles from the server. I'd like to build...

Whats the best way to resize all the elements in the silverlight canvas on resize?

Hi, I just started learning SL. I have tried to resize all the elements inside the canvas on its resize. But i cant find the right way. this is what i did Iterate throgh the all child elements in canvas calaculate the scale X & Y based on the new size And multiply the scale values with each elements size properties But in SL3.0 i...

Styling my listbox in xaml

Hi all xaml-geeks ;) I've just been fooling around with a ListBox control that I want to style a certain way. For now it looks just like I want it to with rounded corners and no padding. However, the rounded corners seems to cause a problem with the items in the ListBox. A screenshot so you can see what I mean: The thing is, that th...

Visual Studio 08 will not allow me to create Silverlight project

So I installed the Silverlight 3 SDK a while ago and VS worked fine. Yesterday I unisntalled the Silverlight 2 SDK. Then when I tried to create a Silverlight project I got an error stating You need to install the silverlight 2 sdk before creating a silverlight project Why? Is this required? I unisntalled the Silverlight 3 SDK and ...

Silverlight enabled WCF service port suddenly changed

I have a Silverlight web app solution with a Silverlight-enabled WCF service included. Everything has worked fine for the past 6 months or so. I can access data through the service with no problem. I came into work today, opened up the solution, ran it again, and suddenly, there's a mismatch between the WCF service port and the port t...

Silverlight client identity not always passed to server?

I have a Silverlight client that has some problems talking to the server it originates from via a WCF basicHttpBinding. The service configuration is as follows: <system.serviceModel> <bindings> <basicHttpBinding> <binding name="silverlightBinding"> <security mode="TransportCredentialOnly"> <transport client...

Sketchflow + DataGrid Exception Being Thrown

This is my first time using Sketchflow and I followed a video tutorial explaining how to use a DataGrid and a Sample Data Source within a SketchFlow project. Everything renders fine in Blend but when I attempt to run it within the SketchFlow player I get the following exception: Message: Unhandled Error in Silverlight Application Except...

Silverlight 3 - Changing Merged Dictionary Dynamically

Hello, how to go from: <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="teste.App"> <Application.Resources> <!-- Resources scoped at the Application level should be defined here. --> <ResourceDictionary> <ResourceDictionary.MergedDic...

ItemContainerStyle in Custom Control Derived From ListBox

Please bear with me Silverlight Designer Gurus, this is compicated (to me). I'm creating a custom control which derives form the Silverlight 3.0 ListBox. In an effort not to show tons of code (initially), let me describe the setup. I have a class library containing a class for my control logic. Then I have a Themes/generic.xaml t...

How to write sum calculation based on ria service?

When using ria service for SL app, I can issue following async call to get a group of entity list. LoadOperation<Person> ch = this.AMSContext.Load(this.AMSContext.GetPersonQuery().Where(a => a.PersonID == this.performer.PersonID)); But I want to get some calculation, for example, sum(Commission), sum(Salary), the result is not entity...

Anyway to start/stop/resume/pause a Storyboard in pure XAML in Silverlight, for any event?

Any way in Silverlight to write pure XAML code for controlling story boards, by responding to any given event for a given control? For eg, when the user move the mouse over a panel, I might need to start the storyboard, and pause it when he moves the mouse out. ...

Silverlight event MouseLeftButtonDown not fired

I ran into the problem where in Silverlight event MouseLeftButtonDown is not being fired for Button and hyperlinkButton. Looks like it is handled somewhere in the framework. How I can override this behavior In the XAML code below When I click on the button Named Cancel, Button_MouseLeftButtonDown is not fired. I tried putting textblock...

The model in MVVM: business object or something else?

I'm trying to get to grips with MVVM and so I've read a bunch of articles - most focus on the View -> ViewModel relationship and there's general agreement about what's what. The ViewModel -> Model relationship and what constitutes the Model gets less focus and there's disagreement. I'm confused and would like some help. For example, t...

Do you use ServiceReferences in LoB applications?

Do you use auto-generated WCF service references in line of business applications? Or do you roll your own? And why? EDIT For anyone looking to roll their own, I found this article which may prove useful: Understanding WCF Services in Silverlight 2. There's another article on the site for Silverlight 3 which may be a useful additio...

Silverlight marshalling DLLs and cross platfrom / cross browser question?

I am not too familiar with Silverlight and need some advice. We have a DLL that is written in C , I beleive. Currenlty, we have a windows application that allows a user to select some files and then pass the files (an array of file names from the file system) to the DLL to be processed. We would like to have the application be an add-in ...

JSON Parsing in Silverlight 3.0

I have a bunch of little JSON object fragments of the form: { id: "wow", foo: 45.4, bar: "hello, world!" } By "a bunch" I mean about 6 GB worth. :-) (And yes, I know, this isn't technically JSON. The full story is that it originally came from YAML data, but I find that most "JSON" parsers can handle this subset of YAML just fine.) Cu...

When is the MVC Pattern appropriate?

Note: I'm not referring to any particular framework's interpretation of MVC If I'm designing a rich client Silverlight application for instance, that involves a relatively complex UI behavior such as dragging and dropping rows between two GridViews populated by a dynamic user-defined query, would this be an appropriate pattern to use? ...

Silverlight: TemplateBinding a Rectangle

Hi, I'm having a heck of a time trying to template bind the StrokeThickness of a rectangle. My goal is to allow a user of my custom control to set a property called SelectedBorderThickness which will, in fact, set the StrokeThickness of a rectangle. I thought I understood templating but I guess I really don't. If I do this: <Rectangl...

Programmatically triggering the HyperlinkButton navigation

I'm using the Silverlight 3 HyperlinkButton and I want to programmatically trigger the navigation that normally occurs when the button is clicked. There does not appear to be a public method that supports this. The OnClick method is protected so I could inherit from this control to gain access to this method from a custom control but is...

How to play MPEG-TS (transport stream) from WPF and Silverlight

I've tried MediaElement with a .ts file - its not interested (HRESULT: 0xC00D11B1). The TS file plays with WMP no problems (Cannot seem to play it in graphedt though?) I thought MediaElement was supposed to support what WMP supported? Update: This is on Windows 7 by the way (apparently it has a slightly different media stack if that m...