silverlight-4.0

Get ErrorMessage from ResourceFile / RIA Services

Hi My goal is simply to show a language-specific errormessage for a Required-Annotation: [Required(ErrorMessageResourceName = "LastNameRequired", ErrorMessageResourceType = typeof(ValidationMessage))] LastNameRequired is the key of the string in the resourcefile, ValidationMessage is the type generated by the resource file. The resou...

How can a simple bounce animation be applied to a StackPanel on UserControlLoad?

I am very new to Silverlight and Silverlight animations. I have a StackPanel. When the user control loads I want the stack panel to slide into view from the bottom of the screen). A huge bonus would be to make it bounce off the top of the screen once it hits the top. I am looking iinto the Silverlight Toolkit and the TransitioningContent...

Silverlight and Javascript interaction

I have a page with a silverlight app on it. Embedded in my page is an authentication key which the silverlight app will need to do all web service requests. So onload the silverlight app needs to get the key and do an initial connect to a WCF service. The problem is that its very unpredictable whether the page or the silverlight will loa...

Why does this binding display a class name?

What might cause the value of a Silverlight 4 DataGridTextColumn.Header to display as System.Windows.Data.Binding rather than the resolved bound value? It seems like a ToString is happening somewhere that displays a class name rather than the formatted value of the class. The binding looks like this Header="{Binding Path=Dummy,Source={...

Silverlight Listbox with variable height fitting to content

How do I configure the listbox in Silverlight to have variable height ? ...

Why I can't add a class library project reference to a Silverlight project?

Hi, I am a newcomer to Silverlight and while I have been following some tutorials I wanted to create a new project with a class library so that I can use it from my page's xaml.cs code behind. But when I tried to add my class library project I get a warning message saying: You can only add project references to other Silverlight proje...

Where to place clientaccesspolicy.xml in Netbeans Webservice project?

Hi, I develop a Webservice using Netbeans 6.9 and I use an embedded glassfish server to deploy my Webservice (*http://some_domain/project_name/ws_for_sl4*). On a different server there is deployed a Silverlight 4 client, which should have accesss to the Webservice. I know that I have to have clientaccesspolicy.xml (under *http://some_...

Export DataGrid for use in Excel

Does anybody have a sample of how to export a paged DataGrid so that it can be used in Excel (csv or Xml)? All of the examples I've seen so far can only output the currently displayed data, not the whole set or use automation. ...

Apply theme with Silverlight 4

So I've been trying for some time to get theming to work in Silverlight 4. I've added a reference to System.Windows.Controls.Theming.Toolkit and System.Windows.controls.Theming.ShinyRed Then I went and did something like this: <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.micros...

Why does System.Numerics.BigInteger not have a Parse method in Silverlight 4.0, but does in .Net 4.0?

I've come across a weird discrepancy between BigIntegers used by .Net 4.0 and Silverlight 4.0; In .Net, BigInteger has a Parse and TryParse method where as in the Silverlight version, it does not have either of these. If you look at the .Net version of System.Numerics in Reflector, you also see that when you disassemble the code, every ...

Creating a Silverlight control that to be used in a DataForm and flags when changed

Hi I have created a custom control and am trying to use it in a dataform for editing. If I use a standard TextBox, the dataform flags that the data is dirty (it enabled the OK and Cancel button, and displays the *). However, when I use my control, it doesn't. The XAML I'm using is: <toolkit:DataForm CurrentItem="{Binding Path=CurrentEn...

Silverlight based rule engine

Hi, We are building a Silverlight based LOB application. Per the business requirements the fields which will be bound to Silverlight screens has dependency in the form of rules. The below example can be more helpful to understand. public class Model { //properties public int A { get; set; } public int B { g...

authentication/authorization for silverlight 4 with RIA service + Entity Framework

Hi On my current project, i need to have a login/logout and some authorization in order to let certain users from different companies access different View screen on the silverlight application. And do some operation on it Can you tell me where i can find the information for authentication/authorization by using RIA service with silver...

Silverlight DomainDataSource in code-behind not loading all rows

I have a domain data source in Silverlight 4. I'm setting it up in the code behind, and I'm also using a RadDataPager and RadGridView. DomainDataSource dds = new DomainDataSource(); dds.QueryName = "MyQueryName"; dds.DomainContext = ctx; dds.LoadSize = 10; dds.PageSize = 10; dds.AutoLoad = true; radDataPager1.PageSize = 10; radDataPa...

Silverlight Binding Path Dynamically

I've spent hours on this so any help is much appreciated: I have a TextBlock inside a DataTemplate which has an ItemsSource already set. I want to bind the Text of the TextBlock and set the Path to whatever the path is of a different object in code-behind. I've tried everything I can think of even this: <TextBlock Text="{Binding Path='...

databinding hidden (non visible) combo box in xaml

Hi, I have a problem binding data to a combobox that's in a secondary (not initially focused) tab. Basically, I have a silverlight form with multiple tabs, whenever I move this combobox to the first (main) tab, the data is loaded and everything works as expected, but when this combo box is in a secondary tab that doesn't have focus init...

Why does setting the XAML property on a RichTextBox to this value crash Silverlight?

While doing some testing of a HTML to XAML converter I'm working on, I ran across a strange situation that I can't explain. Due to a bug in my HTML to XAML converter I was given this XAML: <Section xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" /> When I set the XAML property of the RichTextBox ...

Can you use Digital Certificates with SilverLight Web pages?

I am fairly new to web development and have never used Digital Certificates before. I assume using a digital certificate on a silverlight web page is the same as using one on any other web page, but i thought i should check. There are a few example of digitally signing the .xap file on the internet, would it then be a case of simply buyi...

Finding the Installation location of a silverlight OOB App

Is there any way to find where an OOB app is installed at runtime? I realise that once an OOB app is installed it is placed in a folder in "OutOfBrowser" within AppData. However, the folder is named with a long number (probably time stamp related) which I wont know as it changes on each installation. As I would like to launch the OOB app...

Storing sensitive data in Silverlight

I have a Silverlight Business Application. I want to store the username and password that the user enters when logging into the system. Does anyone have any pointers, tips etc on how I can securely store this data? I would like to store it encrypted but I'm not sure where I would store the password/salt, would it be secure to store th...