silverlight

Event that fires after element is resized.

Here is a problem: after loading some visual elements, I need to change something knowing their new sizes. There is MeasureOverride method, but it is called before changing the size. Is there any method that is called after it? P.S. I know that I can calculate new sizes having old ones, but new sizes aren't calculated simply. It would b...

What is the proper way to create a dependency property bindable to an observable collection?

Hi, I need to create a dependency property on a custom control. The problem is that the propertyChangedCallback does not get called when the collection changes. How should I properly handle this scenario? I am afraid of memory leaks caused by simply event hooking to the CollectionChanged event during the initial property change (when t...

Silverlight, WPF or Windows Forms?

I need to create a desktop application for Windows and I'm in doubt about which technology to choose. Fact is that the application must do interaction with local resources: Communication with SQL (need support for SQLite and MSSQL - local and remote, and would love to use NHibernate; maybe even with Castle's ActiveRecord) Interaction ...

Silverlight list example...Where is it?

Hi to all, I remember a few months back looking at a silverlight 3 or 4 example where a list of products where shown. The products where games (for the XBox I believe). I cannot remember if it was a data services example but there were some nice mouse over animations and when clicking on one of the images of the games, a pop up was show...

Silverlight TreeView in ComboBox (or just a custom dropdown control)

Hi I was wondering if I can have a ComboxBox with a Treeview as the selector rather than a list? I note that there is a ComboBox.ItemsPanelTemplate, but I don't know what I need to do to get this to work? I could build a control 'from the ground-up' with a separate TextBox, Button and TreeView in a PopUp control, but wondered if there...

Silverlight RichtextBox Xaml Property, cannot set value (exception)

Hi I want to set the Xaml property of my silverlight richtext box. this.Dispatcher.BeginInvoke(() => { richTextBox1.Xaml = "<Paragraph>Blah</Paragraph>"; }); However I get the following exception.. System.ArgumentException: value at System.Windows.Controls.RichTextBox.set_Xaml(String value) Can anybody explain this ? M...

Require an old version of silverlight

We're using a combination of Silverlight 4, .net 4 and VS2010 for several internal projects. When building a project, we're not manually specifying the build of silverlight that we require anywhere other than in the page that gets auto-generated. We're having problems with the clients requiring the absolute latest build of silverlight t...

How to highlight listbox's item on rightclick event?

Hello, I don't know if I'm the first to ask this question(I searched the whole board) but I never found any answers. As said in the title I am trying to highlight/select an item in my Listbox whenever I right click it. Here is the XAML code: <ListBox Grid.Row="1" x:Name="ContactList" Margin="6" ItemsSource="{Binding ''}"> <ListBox...

Bind a fill property in a path to a Foreground property from the ContentControl in a style

I have silverlight problem I'v used two days to fight: a template with a style controls a button. In the concrete button I have a canvas with paths as content. The problem is that I want the paths fill color to bind to the Foreground from the ContentControl in the template. However, I haven't been able to figure out how to construct th...

In a button's control template, how can I set the color of contained text?

Using Silverlight 4 & WPF 4, I'm trying to create a button style that alters the text color of any contained text when the button is mouseover'd. Since I'm trying to make this compatible with both Silverlight & WPF, I'm using the visual state manager: <Style TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> ...

How to create limit marker lines in Silverlight 4 Chart

Hello, I'm creating LineSeries Sivlerlight chart to display changes of the system performance in real time. The Y coordinate is numeric performance value, X is the date when this value was retrieved. I need to add line that would represent upper limit for those values that are considered to be normal, so the user can easily see what l...

Exception with type System:Char

I am trying to create a reusable System:Char value in my xaml resources. I have: xmlns:s="clr-namespace:System;assembly=mscorlib" Then: <s:Char x:Key="MaskPromptChar">#</s:Char> I get an exception: The type 'Char' was not found. [Line: 8 Position: 44] But... I also have: <s:Double x:Key="DefaultControlWidth">200</s:Double> ...

Collision Handling for moving rectangles

Hi folks, in my Silverlight 3 application, I display a tree. A self made user control is used for the treenodes, the LineArrow object for the connections. After initial displaying the tree, I want the nodes to move by the following "physical properties" there is a gravitational force, that pulls the node down there is a force vector t...

How to programatically detect if a DataForm is in edit mode

I'm using a DataForm in Silverlight 4. Several DataForms, actually, and they share a common RIA Services context. Here's the problem I'm having... If I start editing a DataField in one of the DataForms, then click on a button that calls Context.SubmitChanges(), I get the following error: �Entity 'foo' is currently being edited and ...

Bind TreeView Only to Root Node

I have a service that retrieve only one node that has subNodes. I want to bind this node to the treeview by HierarchicalDataTemplate The problem is that itemsSource require a collection. Can I Somehow Bind the treeView to this node without wrapping it with a collection? ...

Can you bind a whole object to a CommandParameter in XAML?

I have a linkbutton inside a listbox that receives a list of objects. I'm using the ListBox.ItemTemplate and DataTemplate to lay out the listbox items. Can I bind the entire object that is currently binding to the command parameter of the linkbutton? I've tried using CommandParameter={Binding Data} and CommandParameter={Binding ...

Silverlight, CGI, and the Debugger

I've got a Silverlight app that has to accept some initial data when it fires up. That data, unfortunately, MUST come from XML input. In addition, I can't just pass it through the URL because the actual request is coming from a server external to my own. So the basic setup is this: Remote server needs to launch my app. Remote server po...

How to notify object from which a method has been called

I'm trying to make a simple class for my REST calls so I won't have the same code in multiple places in my application. The problem is, I don't know how to notify an object that called the UploadStringAsync() method from inside the UploadStringCompleted() event handler. Here is my class, I have added comments to mark the place where I ...

Using wordpress as landing page that works with silverlight back end

I am web developer working on a wordpress landing page that will lead the user into an all silverlight page. Now my programmer says this can't be done and it's not supported php conflicts with silverlight/asp and so on. My web address will be www.maddog.net... I need the wordpress and silverlight portions of the website to reside in the...

Questions related to Installing Silverlight on Mac

We are planning to develop a Silverlight 'cross platform' application, that is expected to run on both Windows and Mac with elevated permissions. Mono alone is not an option, as the application requires Silverlight specific video features, supported only in SL 4.0 So, here are some considerations. 1 - The 'Application', should interfa...