silverlight

e.DetailsElement in silverlight

hi, is there any way i can write this code in a function() right now what is happening in function is it tells e.Row.DetailsVisibility e.DetailsElement.ActualHeight it is not able to find this it is telling is there any way i can get this e.DetailsElement.ActualHeight if (e.Row.DetailsVisibility == Visibility.Visible) ...

newbee silverlight: how do i load a new Page?

Hi, i have multiple Pages (classes which derive from the Page object) in my silverlight app. I can load one in the app.xml with this statement: this.RootVisual = new ZoomData (); But what should i do when i have this page loaded, and i want to navigate to another page? ...

silverlight: Change the uri to my dataservice after deployment

Hi, i've made a service reference from my silverlight app to my local dev server. but now i want to deploy this on the testserver, but how can i change the uri of the dataservice now? all i deploy is a XAP file, and in the asp.net world i was used to change the uri in the web.config, but obviously that isn't present in a silverlight app...

WCF Service method synchronous/async

Hi I have a problem with calling WCF Service methods with Silverlight 3. private bool usr_OK = false; clientService.CheckUserMailAsync(this.mailTF.Text); if (usr_OK == true) { isValidationOK = true; } else { isValidationOK = false; MessageBox.Show("User already exists.", "User registered succes!", MessageBoxButton.OK); } CheckUs...

Silverlight System.Random sequencing cross platform

Hi Guys, I need to know the effect of different platforms on the System.Random object (Silverlight). Is the sequence created the same on Mac, PC and across 32 / 64 bit? Regards Tris ...

Good Sites that are describing about MVVM Pattern

Hi, i started the learning MVVM pattern. So could anybody help me to list Some Good Sites that are describing about MVVM Pattern. thanks in advance. ...

How can I change the binding for template elements at runtime?

I've found few solutions which assumes that I have 2 or 3 binding objects(or data templates) - that is not good solution for me. Is there an easy way to do this? I can think of cycling through the visual tree and set the binding that way but still this solution doesn't look very neat. Thank you in advance. ...

Silverlight 4: Binding to a calculation of control properties

What I would like to do is pretty simple. Given textboxes for ItemPrice, Tax and Total, I need the text value for Total to be bound to ItemPrice + Tax and the Tax value to display ItemPrice * taxRate. Could someone offer a brief explanation as to how this would be accomplished or point me to an appropriate example? I see property bindin...

why is there no interface file with silverlight enabled wcf services

Using Visual Studio 2010 when creating a wcf service the template creates a class file, svc endpoint and an interface file. Why is it that when adding a silverlight-enabled wcf service they don't follow this pattern. As discussed here this seems like a bad idea. After adding the silverlight-enabled service, should one go back and inco...

String Length in Pixels

How can I obtain the lenght of a string (given a font , size weight etc) in Pixels? I have seen recomendations to try System.Drawing.Graphics.* but that Assembly / Namespace doesn't seem to be available to me in silverlight. I hope to center a text box under an image, but the text is provided dynamically. ...

Silverlight Self-Tracking Entities vs. RIA Services

One of the features provided by RIA services is that your server-side model objects get automatically proxied in your Silverlight front end and are automatically serialized back to the server for operations such as saving to the database. This seems to be a very similar goal to what "Self Tracking Entities" are providing, which is a tec...

Passing Parameters to Silverlight

Hi, Any ideas on how to pass parameters to Silverlight on startup from URL QueryString? Thank You ...

XAML - Binding Command to ItemsControl Contents

I have a UserControl with a ICommand-derived object as a Resource as follows: <commands:SetRegionContentCommand x:Key="SetContentComand"/> I then try to bind the command to the DataTemplate tag within an ItemsControl like so: <ItemsControl ItemsSource="{Binding Path=Items}"> <ItemsControl.ItemTemplate> ...

Silverlight 4 HttpWebRequest user agent string is null

The problem I have a page with a silverlight object. It attempts to retrieve XML from another (external cross domain) page. But I am struggling with a security exception. I have this code working brilliantly in WPF. When using a website hosting a silverlight application with the same code, the user agent string of the HttpRequest obj...

Don't show Data in DataGrid

Hi in my app, I used WCF Services for load data from SQL DB then in Completed Event Handler of my ServiceClient write this code: void svc_GetOrdersCompleted(object sender, GetOrdersCompletedEventArgs e) { if (e.Error == null) { dgOrders.ItemsSource = e.Result; txtStatus.Text = ""; } else txtSta...

How to style a treeview in Expression Blend

(Using Expression Blend 4 RC, Silverlight 3) I have a treeview with several different item templates for different levels. When I open this project in Blend, it seems I can only really style the top-most DataTemplate (via right-click the TreeView in the Objects/Timeline view, Edit Additional Templates->Edit Generated Items (ItemTemplate...

Cross-site images in Silverlight

Is it possible to load in an image from another domain using JavaScript, and then pass the image to a Silverlight control on my page? ...

Puzzle - Dynamically change data template control from another data template

I have a DataTemplate that contains an Expander with a border in the header. I want the header border to have round corners when collapsed and straight bottom corners when expanded. What would best practice be for achieving this (bonus points for code samples as I am new to XAML)? This is the template that holds the expander: <D...

Iterating through StaticResource loaded by ResourceDictionary

Given a resource dictionary loading some static resources into memory - is there any way to iterate through theResources loaded into memory? My silverlight application keeps telling me it cannot find a static resource. I wonder if I have a naming convention issue or somehting - was hoping iterating through the resources in memory would...

What's the VB.NET equivalent of this C# code for wiring up and declaring an event?

I'm working on a tutorial to build a media player in Silverlight and am trying to wire up an EventHandler to the timer.Tick event of a DispatchTimer object so that the time of the video is synced with a Slider object. The sample code is in C# and I can't for the life of me figure out the proper syntax in VB.NET with RaiseEvent and/or Ha...