silverlight

How binding of Silverlight UI to .NET Classes works

I am looking at binding a certain silverlight UI to a C# class. In the example code below there are two textboxes in the XAML page. Any changes made to one textbox is reflected in the other the minute it loses focus and vice-versa. While the example I have works as I want it to, I have no clue as to what is goin on under the hood and how...

Siliverlight databound combobox doesn't display initialized value

I am databinding a view to a viewmodel and am having trouble initializing a combobox to a default value. A simplification of the class I'm using in the binding is public class LanguageDetails { public string Code { get; set; } public string Name { get; set; } public string EnglishName { get; set; } public string DisplayName {...

simple silverlight databinding listbox to List<>

It seems like this should be simple... I have a usercontrol that I am going to use on several tabs of a tab control. I want all instances of the usercontrol to be synchronized. In my usercontrol I have a list of strings: public static List<string> fonts = new List<string>() { "Arial", "Courier" }; And a ListBox: <ListBox x:Na...

DataGrid & Excel selection

Hi guys, How can I implement selection logic for DataGrid like in Excel. Sample http://www.viblend.com/silverlight/controls/examples/livedemo.html ...

Loss of Silverlight mouse up events after mouse capture?

I created a very simple test control that has a Rectangle on a canvas (within other containers, but inconsequential). The Rectangle has event handlers for mouse down, mouse move, and mouse up. If I capture the mouse in the Rectangle's MouseLeftButtonDown event, I do not receive a corresponding MouseLeftButtonUp event. Some code: priv...

WCF and Ajax interoperability using YUI

I'm currently building a corporate website using YUI. I have a Silverlight component left from a previous project. It's functionality is needed. Since this current project must support Linux I'm thinking of recreating it using Javascript. Using Moonlight would be an option - but the component relies on a few November 2009 Silverlight To...

How to bind RadDataPager.PageSize to RadNumericUpDown.Value in code

I have a RadGridView, a RadDataPager and a RadNumericUpDown all defined in code. Now i want to bind the RadDataPager.PageSize to the RadNumericUpDown.Value so the pagesize of the pager is changeable via the RadNumericUpDown control. Thus i try: RadDataPager dataPager = new ...; RadNumericUpDown pageSizeSelector = new ...; Binding b =...

Casting error for UIElement on runtime

Hi Guys, I get runtime error when I do this... I have this class... public abstract class AnnObject : DependencyObject and when I do this it compiles fine, but throws a runtime error... AnnObject aa; var b = (DependencyObject)aa; var c = (UIElement)b; The error I get is cannot cast AnnObject to UIElement.... Can someone please b...

PollingDuplexHttpBinding over HTTPS

I am trying to setup a Silverlight 3 application to use a WCF web service through the PollingDuplexHttpBinding. I have this working over basic HTTP, but I need to get it to work over HTTP*S*. Server web.config: <system.serviceModel> <extensions> <bindingExtensions> <add name="pollingDuplexHttpBinding" ...

DataBinding in an ItemsControl to a custom UserControl property

I am having major problem in Data Binding. I have a stackpanel with an ItemControl in my MainPage.xml: <StackPanel> <ItemsControl x:Name="TopicList"> <ItemsControl.ItemTemplate> <DataTemplate> <local:TopicListItem Tit...

How to animate visibility of a StackPanel in Silverlight to expand and collapse?

In my case, I would like the expand/collapse to happen from left to right and right to left respectively. The animation should happen when the visibility changes. Thank you. ...

Accordion control hides behind another control, how to bring it to front?

How can I get the accordion control which is defined in Grid row 0 go ON TOP of another panel which is defined in Grid row 1..... <Grid x:Name="MainGrid" Background="White"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.R...

In Silverlight, how can I get an animation from the template and use it through C# code?

I have a control template that looks like as follows: <ControlTemplate x:Key="anchorButton" TargetType="Button"> <Grid x:Name="CommonGrid" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"> <Image x:Name="CommonPic" Source="anchor.png" Width="{TemplateBinding Width}" Height="{TemplateBinding H...

Silverlight merged resource dictionary outside xap

How can I have my merged resource dictionary live outside of the xap file in plain text so my clients can edit it ...

What state is contained in a WCF Client object?

Like the title says, I'm curious to know what state is contained in a WCF client proxy object - should I be new'ing up tons of these casually and not caring? Or are they more heavyweight and I shouldn't be so cavalier about creating them? ...

How does Silverlight work?

Hi, Can anyone point me to a link with detailed description on how Silverlight works. I mean in the sense that, does it run as a separate process or does it run in the same process as browser? Does the silverlight plugin responsible for parsing the XAML and rendering the Silverlight run in the same address space as the browser? Basicall...

Find the path to my WSDL

I have a silverlight 4 app. When I made that it created 2 projects. My actual silverlight app and one called MySolutionName.web (not sure what that does except host my silverlight page). Based on feed back from this question I added my WCF stuff to the MySolution.web project. But when I call the service from my silverlight app the val...

How to get the binding UI to see my Objects in VS 2010

I have a Silverlight object (call it QuestionAsker.xaml) and another object I use as the data context for that silver light page/object (call it QuestionAskerVM.cs) My QuestionAskerVM instance is called QuestionAskerViewModel and is defined in QuestionAsker.xaml.cs. My QuestionAsker.xaml looks like this: <UserControl x:Class="IsAProgr...

using silverlight for user interface only

I am planning to make a web application, using silverlight for frontend. requirement is: this frontend will be just an empty shell, and it must be language independent. it will get everything it needs to display and use from server, therefore making it language independent. i tried to find tutorials, but there is nothing. as far as i u...

silverlight .xap packaging bug (references of reverenced assemblies)

I encountered this strange issue and was lost for several hours before i found something interesting about how the .xap is packaged. among several things, i came to know that if my project was named "References", it would not be included in the xap, and more strange was another problem that if my SL app is referenceing assbly1 project ...