silverlight-4.0

ItemsSource vs DataContext in binding case

Hi My main question is about binding case in the scene that we have multiple sources for a control(a combobox inside a datagrid)(or having both datacontext and itemssource). Then how can we know which source the binding will use? (any syntax to clarify that) Assuming a datagrid has an itemssource="List of Players" datacontext="Manager" ...

Custom toggle button and states - how to give same effect to both MouseOver and Checked?

I have made a custom button based on an image by more or less using the process found here: http://www.kirupa.com/blend_silverlight/creating_custom_button_pg1.htm I added a MouseOver state that enlarges the image 1.5x so when you hover over the image, it grows slightly bigger and then shrinks back to normal size when you move the mouse...

In a Silverlight 4 (OOB) app can you move the main window in code

Hi all, In a Silverlight 4 out of browser app (oob) is there any way to programatically move the main window after the application start-up event. The reason / Use case: A user selects an option on a silverlight desktop gadget app, the apps window grows to accomodate extra details. If the app started very near the right of the screen t...

What is the replacement for DataTrigger in Silverlight

This is my scenario. I have 2 Properties. Type and State. Type is an Enum with 3 values eg, ball, car, arrow. State is an int which would accept 3 state values eg., -1, 0, 1. Also, I have 9 images for each state values. Like, if I select type as ball and value as -1, I want to display a Red color ball. If I select type as arrow and va...

Add a assembly to GAC and Add reference dialog in visual studio 2010

HY, Know someone how can i add a assembly to GAC and Add reference dialog automatically in same time. I have a setup project which i set him to add the assembly automatically to GAC, but i can`t add that in add reference dialog from visual studio 2010. I search on the internet but i didn't found how to do it. The idea is that i have a ...

Silverlight - tab navigation with arrow keys

How to cycle between controls with arrow keys. I want the same effect as I get with Tab key. Is it even possible? ...

Silverlight equivalent to jQuery UI Sortable Lists?

Damn, I'm so ignorant. I'm looking to replicate this in Silverlight http://jqueryui.com/demos/sortable/ But where to start? Thanks ...

Linq to SQL vs Entity Data Model: Getting a stored proc to run

Was I was previously messing with Silverlight and RIA, I was using a an ADO.NET Entity Data Model and domain context. I'm teaching myself how to run a stored procedure from RIA, and could not get it to work with the previous setup so I then started to try out using the LINQ to SQL method. I did the following: Added the DBML Drag and d...

Programmatically create silverlight animation with easing in C#

I'm messing around with making a clock in silverlight. I am trying to set up the animation code programmatically because I want to reuse the same code for each of the 3 clock hands (and I don't think I can do this with a single storyboard in xaml). public void Rotate(double toAngle, RotateTransform rotate) { Storyboa...

First Silverlight application causing problem. Developer Runtime error

Hello, I have installed Visual Studio 2010 and Silverlight 4 tools. Still, i am getting an error while running my Silverlight application :- Unable to Start Debugging. The Silverlight Developer Runtime is not installed. Please install a matching version Why is this happening? Thanks in advance :) ...

In Silverlight, how do I handle an error during an asynchronous call?

In my SL4 app, I have a call to a service, svc.SubmitAsync(). Since this is an async call, once the method is hit, my code goes on to the next line. This is fine as long as the user enters the correct user name and password. If they don't, EndSubmit() throws an exception. EndSubmit() is in References.cs, part of the auto-generated Silver...

How do I save Data in Silverlight C#?

I want to make to make a site where a user can post to a string shown on front page. how do i do this? ...

Silverlight 4: how to setup properties of the control in custom list

I have a list of object and want to bind for display purposes to a list of custom controls. XAML code: <Pages:MyItemsControl ItemsSource="{Binding SquadFieldPlayers}"> <Pages:MyItemsControl.ItemsPanel> <ItemsPanelTemplate> <Canvas Height="180" Width...

Silverlight control in VisualWebPart loads to 100% and not apear

I have silverlight control in VisualWebPart (Sharepoint 2010) and when I add my webpart to Sharepoint site control loads to 100% (loading animation sill runs) and not apear. Same Silverlight app works in SilverlightWebPart but i need to use VisualWebPart/WebPart. this is what i add to empty VisualWebPart: <object data="data:application...

DependencyProperty not updating BusyIndicator

I'm attempting to connect a IsBusy boolean property defined on my child window to a BusyIndicator provided by silverlight ria services codegen. Here is the busy property: public bool IsBusy { get { return (bool)this.GetValue(IsBusyProperty); } set { this.SetValue(IsBusyProperty, value); } } public stati...

importing an aspx page into silverlight in expression blend

Hi, I have an aspx masterpage that I would like to use in Sketchflow in ExpressionBlend as a Silverlight project. I am totally out of my comfort zone here and am not even sure how to ask this question. This masterpage has a Header and a Footer and the middle section will contain the Content - which will actually be Silverlight. Is there ...

Is it possible to have WPF/SL4 perform operations on a property binded to another control?

Using SilverLight, one can bind the value of a control to a property from a datacontext. That's fine. It is possible to use StringFormat along with the binding declaration to format the value. Again, that's cool! However, I can't find a way to have the binding with some operation done to it before it gets displayed. I know I can code a...

Silverlight ContentProperty on abstract class Panel

Hi Guys, Here is a hierarchy of my class MyContainer. Notice that the Panel has a Children as well as MyContainer. Can I still use the Children from Panel as well? What is the meaning of [ContentProperty("Children", true)]? The summary explains: Specifies which property of a class can be interpreted to be the content property...

Silverlight 4: Running a stored procedure which returns a string

I have a problem executing a stored procedure in Silverlight 4/RIA. The only value I get back is null. Am I doing my client and server side code wrong? Client Side : public ZipCodesDomainContext _ZipcodesDomainContext = new ZipCodesDomainContext(); /// <summary> /// Creates a new <see cref="MainPage"/> instance. ...

Silvelight 4: why items are not moveable?

There is a "field" on which some items are draggable: Here is a XAML code: <Canvas Height="180" Width="169" > <Image Canvas.Left="0" Canvas.Top="0" Height="180" Width="149" Source="../Picts/field.png" /> <Pages:FieldItem x:Name="Item2" Canvas.Left="129...