silverlight

Dynamic Clipping Width in Silverlight Within Canvas

Why does this throw an error and how can I fix... I need to set the clipping rect to be dynamic. <Grid.ColumnDefinitions> <ColumnDefinition Width="42"/> <ColumnDefinition x:Name="ListBoxContainer" Width="*"/> <ColumnDefinition Width="42"/> </Grid.ColumnDefinitions> <Canvas> <Button x:Name="b...

Asynchronous WCF calls timeout on client side after 10 seconds

EDIT After looking at this for a while, I thought it might be a configuration issue on my development box. However, after doing a clean download of the source code to a different development machine, I'm still getting this issue. I've got a Silverlight client that calls WCF services asynchronously. Intermittently, I will get one ...

Silverlight Command Binding

I am looking at the following xaml: <Grid x:Name="LayoutRoot" Background="White"> <Button Content="Say Hello..." VerticalAlignment="Center" HorizontalAlignment="Center" my:ButtonService.Command="{Binding Path=SayHello}" my:ButtonService.CommandParameter="Bob"/> </Grid> I...

How to hit test individual characters in a Silverlight TextBlock

This is a slightly abstract question, for which I apologize. I am not necessarily looking for a specific tested solution, but rather some suggestions that I can experiment with to find the one that works the best. All suggestions are welcome - the more varied and creative the better. Here's the problem: I have a Silverlight TextBlock t...

Getting the String Text of SelectedItem in Silverlight Listbox (C#)

I have a listbox in a Silverlight C# app which is binded to some data from a database in XAML: <StackPanel> <TextBlock x:Name="ItemText" Text="{Binding Name}" Foreground="White" FontSize="35" TextAlignment="Left"/> <TextBlock x:Name="DetailsText" Text="{Binding Description}" Foreground="Gray" Margin="0,-6,0,3" /> </StackPane...

Listbox carousel - is it possible?

I'm not using a listbox and data binding at the moment, but is it possible to have a listbox work like a carousel and if so, how. This is what I'm using at the moment, which only works for adding images, not through binding in a listbox... can it still be modified to position each binded canvas+image in the suggested answer? // add ima...

Silverlight 4 and LisBox's SelectedItem when using DataTemplate as ItemTemplate

Hi All, I'm using tow listboxes for drag n drop where user can drag items from source listbox and drop on the target. I'm using a DataTemplate for the ListBoxItems of my ListBox Controls. I need to give the user ability to move up/down items in the target listbox after they been moved from source. I have two button "Move Up" & "Move ...

Silverlight 4.0: Setting an Image Source to a URL

Is there a workaround on this or is this possible in silverlight? my image is not displaying. <Image Source="http://localhost/TempWS/Images/mtdb.ico" Height="60" Width="60"/> ...

Why Silverlight?

My question is that why more and more business applications are being built in Silverlight? When I say business applications, I mean day to day data entry applications. Back office kind of applications where there is more data entry and emphasis is on usability rather than rich UX. Does it make sense to invest in Silverlight for sake o...

Silverlight ListBox Height Automatically increase

Hi all, I am using silvelight listbox control,and i stucked.Every listbox item contains another listbox item now when i bind my data second listbox control,it appears horizontal scrollbar and this is not a problem i can remove it.How can do when I add new Item to second listbox,its height automatically increase? For a second listbox Hei...

Prevent duplicate editing / Locking DB records while editing - single backend server

Situation: multiple front-ends (e.g. Silverlight, ASP) sharing a single back-end server (WCF RIA or other web service). I am looking for a standard to prevent multiple people from editing the same form. I understand that this is not an easy topic, but requirements are requirements. Previously I used the DB last modified date against th...

In a Silverlight 4 OOB App how to restore the Window Size and Position without jump

I cannot not find any way to restore the Saved Window Position without seeing the Window jump from its initial default Position to the Restored Position. The problem is that the first time I get access to the Window its already visible to the user. Am I missing something or is there currently no way to do this? ...

How do WCF RIA Services provide metadata for object validation on the client side?

Is it only code generation in complile-time that does the trick? Or some run-time mechanisms are involved? ...

Silverlight: Binding Dynamic Data to a DataGrid

Hello folks, I've run into a problem recently, hoping you all could help. I was tasked with creating an application that can take any DataSet, and display it in a series of grids (using something like a tab control). I was able to do this pretty easily in WPF: 1. Create a WCF Service that returns a DataSet object 2. Create a WPF Windo...

How can I center a the text on of a Label?

I'm creating a Silverlight 4 application and I want to have an image and some text below it centered. My idea is to have a stackpanel for this purpose but it seems that it centers the control but not the text. Any suggestions? <StackPanel Height="182" HorizontalAlignment="Left" Margin="306,76,0,0" Name="stackPanel1" VerticalAlignment=...

How can I use a custom font in a Silverlight application's TextBlock?

I'm trying to give my TextBlock a custom font that I downloaded from the internet, but in the FontFamily category I only see about 9 fonts, and no option to load a new one. Any suggestions? ...

Setting Popup.Child resulting in HRESULT E_FAIL

I'm attempting to implement an adorner for a PasswordBox to add watermark functionality. I'm basing it on the project at http://sladorner.codeplex.com/. I've gotten the watermark implementation working in a sandbox application, but I'm running into issues when I attempt to add this to a class library. When the line that sets _Popup.Chi...

passing c# code from aspx.cs to xaml.cs

Does anyone know how to do this? Specifically I have two arrays and some floating point numbers in an aspx.cs file and want to use it for a web silverlight app (xaml.cs). Thanks for the help! ...

Detect if no system activity from browser (including activity outside the browser)

I need to detect if the is no user activity in the system (e.g. what screensaver does) - all from a web browser. As far as i'm aware it is not achievable using pure JavaScript. There is a library for detective idle input within a browser though: jquery-idletimer-plugin For system idle events I'm thinking ActiveX control or SilverLight....

Create Thumb Image From UserControl

Im using WritableBitMap to Create a Thumb Image From a UserContol but its not renderer correctly my image. The Problem is Width and Height of UserControl is set to NAN.(I Think So) Scenario: I Have a "Window" (UserControl) Navigator and need to create a list of opened Windows (UserControl) white a Thumb Image from each one, to show on...