silverlight-4.0

BitmapImage to Bitmap

Hy How can i convert a BitmapImage to a Bitmap in Silverlight 4? Thanks! ...

Silverlight, OutofBrowser localCommunicationAPI problem

Hi, I've encounter the following problem: I have two very simple applications, that only contain one LocalMessageReceiver and one LocalMessageSender per application. Everything is working fine when debugging or starting from the local test page, even after insalling the out of browser application locally. Also it is working when startin...

AutoCompleteBox in Silverlight 4 bound to dictionary - show only values issue

Hello, I have used AutoCompleteBox usercontrol. I have a dictionary of type Dictionary<int,string> which contains ids and names. I want to show only names in the AutoCompleteBox. I can do it with autoCompleteBox1.ItemsSource = dict.Values; My problem is whenever any name is selected I want to retrieve the id associated with it. But ...

Unit Testing the Server Interface for a Silverlight-Facebook Application

I have a Silverlight 4 client running on a Facebook page hosted on Google App Engine. It's using gminifb to communicate with the Facebook API. The Silverlight client uses POST calls to the URIs for each method and passes the session information from Facebook with each call. The project's growing and it would be super-useful if I could s...

how to do insertion from gridview to database

hi, i have 3 textbox called empname empAge empAddress once i enter data in the text box and i have an button called save to grid . where i need to save the data in an list then show in data grid. like this i need to do. i have one more button called save to DB. once i click that button i need to get the data from list wher...

inserting data from list to DB

hi, i have an list like this now i need to insert data from the list to DB (sql server 2005). how can i iterate through list 1 by 1 record and insert them to DB public class Users { public string Name { get; set; } public int Age { get; set; } public string Gender { get; set; } public string Country { get; set; } ...

Navigation between Prism modules.

I am using prism modules in my project.i use toggle buttons to navigate between modules.Navigation works correctly.But when processing one module,i need not navigate to next module.ie, when filling textbox in one module,without saving it,i need not navigate to next module.i need to put appropriate warning message here.can any one help me...

How can I set the SelectedIndex in a ComboBox having element binding?

Hi, I have two ComboBoxes, one for Organisation and one for Region. When selecting Organisation I want the Region combobox to update itself with the related regions. After selecting Organisation and Region I can type in a Site to a textbox and store it to db (ADD mode). I've completed that with this code: <ComboBox x:Name="cbOrganisatio...

Issue with the Image saved in the isolatedstorage dir

I am using Isolated Storage to store the image files but when i went to open the image file through windows then the system showed me that the file is corrupted. Any idea . ...

Calling External WCF Service in a SilverLight Application...

I am having this problem An error occurred while trying to make a request to URI 'http://localhost:8732/Design_Time_Addresses/MyService/Service1/'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to con...

Does Silverlight 4.0 support bindings in a style setter?

I am trying to port an application from WPF to Silverlight but it fails on some very simple binding. I have the following simple example: <ListBox > <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="Canvas.Top" Value="{Binding X}"></Setter> </Style> ...

Anyone found a reliable way to resize Silverlight HTML object yet

Has anyone found a way to reliably resize the object the silverlight plugin is hosted in yet? I'm aware of the approach of calling out to a Javascript function from within the Silverlight plugin but as outlined in cross browser resizing problem it's not a particularly reliable approach. In silverlight 4 there is a new parameter for the...

Silverlight, resetting AutoCompleteBox.SelectedItem to null

I have a problem with AutoCompleteBox. I wanted to use it as editable combobox. So I created custom control inheriting from AutoCompletBox and added two dependency properties named as SelectedValue (for binding to DataContext) and SelectedValuePath. When user selects an item, my custom control updates SelectedValue as the following way: ...

Rowlex.net within silverlight

Has anyone experience using rowlex generated classes within a silverlight application? Since we can't expose the classes as a RIA service, what would be the best solution to use them? Wouldn't it be nice if linqtordf and rowlex.net will be merged into a same solution... Thx, Bart ...

Silverlight 4 DataGrid LoadingRow event using MVVM-Light EventToCommand not firing?

I'm using the MVVM-Light EventToCommand to try and implement a pre-fetching mechanism from my ViewModel, using the sample code for EventToCommand that's posted on the MVVM Light codeplex site. Unfortunately the command doesn't seem to fire, even though the MouseMove event which I used as my model does fire fine. Am I missing somethin...

SL 4 Scrollviewer scrollbars -- how to hide

Hello, I am trying to hide the scrollviewer scrollbars surrounding a Canvaa before creating a WriteableBitmap: if (thing._scrollViewer.ComputedHorizontalScrollBarVisibility == Visibility.Visible) { thing._scrollViewer.HorizontalScrollBarVisibility = System.Windows.Controls.ScrollBarVisibility.Hidden; } WriteableBitmap bitmap = n...

Silverlight ComboBox: Make Selected item Bold?

Hi all, I would like to be able to make the selected item in a Silverlight ComboBox appear in bold -- what's the best way to go about doing this? Thanks! ...

How to resize controls to fit the browser window in C#, Silverlight 4

I have a tab control in my main page. When I have it in the Design view in Visual Studio, everything looks perfect, the tab control is set to fill the entire page. However when I run the program, and I have it in a maximized browser window, the tab control is still the same size as it originally was. In other words, the tab control do...

Can I upload/download files from Google docs with Silverlight 4?

I am trying to manage google doc with a silverlight (c#) webapp. The problem is that the api are not compiled for .net 4.0 neither silverlight 4. I have the code of the api. Is the a way to recompile or use it in some way? thanks ...

How to delete entity in Silverlight 4 using RIA and Entity Framework?

I'm working on a Silverlight 4 app using RIA and entity framework that is connecting to SQl Server 2008. I wrote a service method to delete some entities, I can step into the code and watch it execute on the two entities I expect to delete, but when I submitchanges the records don't delete. I'm using a DomainContext to excute the ...