silverlight

What is the Silverlight 3.0 equivalent for BasedOn="{StaticResource {x:Type TextBlock}}"

Hi, I am trying to extend a base style for a TextBlock. Simple think in WPF world, should be the same in Silverlight. But I get a error on x:Type. How can I translate BasedOn="{StaticResource {x:Type TextBlock}}" in Silverlight. Anyone out there who achieved this ? Thank you. ...

Silverlight Convert PlatformKeyCode to Character Code

Question: Is there a good way in Silverlight to intercept undesirable characters from being entered into a textbox? Background: I have a textbox which allows a user to enter a filename. I would like to exclude invalid file characters from being entered into the textbox. A few of these characters are: '?' '\' '<' '>' Although the...

Application Release/Upgrade Strategyfor Silverlight Business Application?

I am interesting in hearing if others have addressed release management for Silverlight applications. I have a business application that is to be released shortly andam concerned about how to "release" updates to this application. Typically this application's users will leave the application open all day (and potentially all night) w...

Accessing Silverlight 3.0 App from JavaScript

I'm trying to access properties on the RootVisual object: [ScriptableType] public class ApplicationInfo { public string Name { get; set; } public string Version { get; set; } } [ScriptableType] public partial class MainPage : UserControl { [ScriptableMember] public ApplicationInfo ApplicationInfo { get; set; } p...

Are there any major advantages to Upgrading Silverlight from 2 to 3?

Is it worth updating a Silverlight 2 project to Silverlight 3? Or should I just wait for four. We currently have several Silverlight 2 projects in a web application and would like to know if there are benifits. So far I have this: Moonlight(silverlight for linux) only supports V2 quite a few code changes in the projects I have which ...

Read Content in Dll programatically and write it into another file in Silverlight

As part of my project I need to download a Zipped folder from a remote server and then Unzip it . For unzipping I am using SharpZipLib. My doubt is if I use BinaryReader and BinaryWriter to read and write will my new dll work properly or weather the new dll will get corrupted. ...

How to get the popup to go full screen?

Hi, I am currently experimenting with the ChildWindowDialog and with prism I have created a controller class. I would like my popup to be displayed on all the screen (a bit like fullscreen mode). I have HtmlPage.Window.Eval() below but I am not sure if this is the correct thing to do. One of the reasons it feels wrong is I have no idea ...

How to use LoadingRowGroup in SilverLight DataGrid

Hello, I want to use LoadingRowGroup event in SilverLight DataGrid to display a group summary. I have an event: void dataGrid1_LoadingRowGroup(object sender, DataGridRowGroupHeaderEventArgs e) { // e.RowGroupHeader } but I don't know how to use e.RowGroupHeader to set group header value. Maybe I should us...

Silverlight - Add Pushpin to Bing Maps via C#

Hello, I'm getting started with the Silverlight Bing Maps control. How do I add a Pushpin to a map programmatically with C#? Thank you! ...

How to authorise users on an WCF Service hosted in a website

Hi, I have a WCF service that runs in my web application that provides data to a Silverlight application and is defined as follows (with an appropriate .svc file).... [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class DispatchService { ...

Silverlight Databind to a parametrized DataService

Hi, I'm building a Silverlight app using RIA Services. I want to implement a master/detail behaviour. The trick here is that the "detail" grid can not be filled directly with the "SelectedItem" property of the master grid, and what I have to do is get one of the fields from the master grid and use it as a parameter to the DataService. Ho...

Silverlight 3 - Passing a binding value to a behavior through XAML

Hi, I have created a custom behavior that I can pass properties to fine, currently just strings, my behavior looks roughly like this: public class ImageSourceBehavior : Behavior<Image>, INotifyPropertyChanged { public static readonly DependencyProperty ImageDirectoryProperty = DependencyProperty.Register("ImageDirectory", type...

Drag/Drop Issue In SL3

I have a UserControl in Silverlight 3. The LayoutRoot grid contains one child, a grid, which is made up of three columns and two rows. Below is the layout: <Grid x:Name="LayoutRoot" Background="White"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </...

Trying to use a ResourceDictionary, but styles in it come up as not found

I have a Silverlight class library, called MyClassLibrary. In it, I have a user control, called MyControl. Within the control I define user resources: <UserControl.Resources> <Style x:Key="ComboBoxStyle" TargetType="ComboBox"> (lots of xaml) </Style> </UserControl.Resources> The control consumes the style like this: ...

WCF: Where is GetRolesForUser? all I see is GetRolesForCurrentUser

Guys, When I create a custom role provider by inheriting from RoleProvider, I created a method called public override string[] GetRolesForUser(string username) .. However, when I try to use this Service Reference all I have access to is GetRolesForCurrentUser(). It works and calls my method behind the scenes ok. As in, GetRoleseForCurre...

Silverlight / Data form showing one record / what even to use

Warning - new to Silverlight / RIA Services / etc. I have a business requirement to show a DataForm with a single record. In nearly all the examples on the net the dataform is tied to a datagrid on the selecteditem property. In my case, the form has no grid to tie to. I know that I'm retrieving data with my ViewModel, but I need a ...

Silverlight application resources for global access to a singleton

I have a singleton which once hit will load user profile information, I want to make it an application level resource in my SL3 application so that elements across the application can bind to it. My code version of the instantiaion is a simple UserProfile x = UserProfile.GetInstance(); I want to be able to do this in xaml in the app...

AG_E_UNKNOWN_ERROR

Hi AM getting AG_E_UNKNOWN_ERROR while adding custom visual state groups to my generic.xaml. here is the code related to custom vsm in my class file. [TemplateVisualState(Name = "Normal", GroupName = "CommonStates")] [TemplateVisualState(Name = "Selected", GroupName = "SelectionStates")] [TemplateVisualState(Name = "UnSelected", Grou...

Silverlight Stability

Hi... I don't know if anyone can advise about this one. We have written and implemented a LOB Silverlight 3 application - which we are currently testing at a clients site. We have come across the problem, where on a few of the machines on site the browsers crash randomly. The machines run Windows XP SP3 - the browser is Firefox. We sus...

Silverlight Save image to IsolatedStorage

Is the following the correct way to save an image to isolated storage? public void imageToStore(Image imageIn) { IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication(); IsolatedStorageFileStream s = new IsolatedStorageFileStream(imageIn.Name, FileMode.Create, iso); using (StreamWriter wri...