silverlight

mvvm light PassEventArgsToCommand break app in ListBoxDragDropTarget

Hi I'm trying to pass eventargs to comman that I bind in ViewModel. Everything works fine if I don't use PassEventArgsToCommand="True". But If put PassEventArgsToCommand="True" than app break. Did you have similar problem? <Controls:ListBoxDragDropTarget Grid.Column="1" AllowDrop="true" HorizontalContentAlignment="Stretc...

How to add text in Deep Zoom Composer?

Hi, I want to compose my own project in deep zoom composer however I would like to know on how to add text per image zoomed in just like the hard rock memorabilia I want to consume it, using silverlight 4.0 As you notice, under right pane, it has its description about the image. Thank you. ...

Silverlight 2 TextBlock ignores MaxWidth

I am using Silverlight 2 to dynamically add a TextBlock to a Canvas. I set the MaxWidth of the TextBlock but it ignores this value and displays a string longer than the MaxWidth value. TextBlock label=new TextBlock(); label.SetValue(Canvas.LeftProperty,Convert.ToDouble(x+3)); label.SetValue(Canvas.TopProperty, Convert.ToDouble(y + 1));...

How to raise mouse events from code behind in different positions of screen?

How to raise mouse button events from code behind when we have only mouse position? I need to raise mouse events from code behind in different positions of screen. ...

Button clip problem Silevrlight 4

I'm working on an interactive map. I'm using Silverlight 4 within VisualStudio 2010. My problem is that i can't assign a geometry to Button Clip property: Code: bouton1.Clip = (PathGeometry)Forme.Data; //forme is a class that inherits from Path when i run my application i get an ArgumentException: The value is not included in the...

silverlight webbrowser control InvokeScript error

I am running OOB silverlight application where I have a WebBrowser control but I am getting this error when I call InvokeScript:- Attempted to perform an unauthorized operation. Is it because it's OOB ? ...

Silverlight event delegates

I am dynamically building an org chart in Silverlight 2 by adding lots of Grid containers to a canvas. Each grid container represents a node within the chart. I am capturing click events for the nodes as follows: grid.MouseLeftButtonUp += new MouseButtonEventHandler(grid_MouseLeftButtonUp); By design, each click event changes the lo...

Binding a checkbox in a datagrid header

Hi, I have a datagrid where the first column contains a checkbox to let the user selects specific rows. I have added a checkbox in the datagrid column header to check or uncheck all the rows. Is it possible to add this functionality only with binding in XAML (no checked event). <sdk:DataGrid AutoGenerateColumns="False" Grid.Row="1" ...

How to modify silverlight combobox data display

I have a combobox defined as follows: <ComboBox x:Name="cboDept" Grid.Row="0" Margin="8,8,8,8" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" ItemsSource="{Binding Source={StaticResource cvsCategories}}"> <ComboBox.ItemTemplate> <DataTemplate> <StackPanel...

Silverlight control to group other controls together for data binding

Is there a control in silverlight to group controls together for data binding. For instance, say I have a Person object and I want to display fname, lname, age, height, etc. in TextBlocks. Is there a control I can use to group these TextBlock controls together and set the ItemSource on just that control similar to how you set the ItemS...

Upgrade to .net 4.0 framework in Silverlight

Is it possible to change the target framework to .net 4.0 in an application originally started in Silverlight 3? I have upgraded the Silverlight target to Silverlight 4 with no problem, but it seems that I am stuck with using the .net framework 3.5 in my actual C# code. (I'm trying to use threading tasks if that is any help) I am usin...

debug Silverlight project to an ASP.NET solution

Hi Guys, I canNOT do it (debug Silverlight project to an ASP.NET solution), I have followed suggestion from this link http://www.codeproject.com/Tips/68127/Unable-to-DEBUG-Silverlight-project.aspx But without much luck. I have to manually go in and attach to process the silverlight page. All suggestions are welcome. Thanks, Voodoo...

What is the difference between ContentTemplate and Content of ContentPresenter in ComboBoxItem related ControlTemplate

I am not knowing what to use to override an existing template (either ContentTemplate, Content). Imagine I have the following: <Style x:Key="ComboBoxItemStyle1" TargetType="ComboBoxItem"> . . <ControlTemplate TargetType="ComboBoxItem"> . . <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" C...

How do I get notifications from an asynchronous RIA Services call?

I've got an application set up with RIA Services, Entity Framework 4, and Silverlight 4. It is set up in the fashion prescribed on MSDN here: Walkthrough: Creating a RIA Services Solution On the client side, this code loads the customer entities into a grid's ItemsSource: public MainPage() { InitializeComponent(); ...

Cross compile for .NET 4 and Silverlight 4 in VS2010 without duplicating files

We have a large number of projects within a solution mostly simple class libraries (which are later loaded through MEF) targetting .NET 4.0. We would like to compile a large number of these for both .NET 4.0 and the Silverlight runtime without duplicating files. Is there a way to create a new Silverlight class library and link the sour...

Developing WPF App to Run on Windows XP Embedded Monitor

I'm experienced developing Windows client desktop apps with WPF, but I've never developed apps for a Windows XP embedded device. We have monitors located around the factory that run XP embedded and I would like to know if there are any issues developing a WPF application to run on the XP embedded monitor. For instance, what are some of...

silverlight The type exists in both and DataContractSurrogates

Hi I'm using silverlight 4 with ria serivces .. I got an error said : The type 'eLab.Web.SessionsHWFile' exists in both 'eLab.Web.dll' and 'DataContractSurrogates_c96b3601-cd13-4049-93bb-e7b3f59a4fd9' where eLab.Web is the aspx web project that hosts the silverlight project, and SessionsHWFile is an edmx entity ,it's not a real tab...

using MVVM light messenger with Silverlight 4 ChildWindow dialog class

Greetings! Am enjoying using MVVM light -great framework - has made my life much easier, and has removed a number of barriers that were proving difficult to overcome.... Question: I am attempting to setup a custom dialog box for editing messages users send to each other. I am attempting to construct a silverlight custom dialog box usin...

Launch silverlight application out of browser

Hi, I'm using sllauncher.exe to execute a local silverlight 4 application, but the launcher show the next error: Invalid parameters. How can I execute a silverlight application out of browser? Thanks ...

Cannot use a Silverlight 2 theme for Silverlight 4?

Hi, I've tried to use a nice theme which Nikhil Kothari provides here http://www.nikhilk.net/Silverlight-Themes.aspx. I downloaded his sample and simply added some styles to my app.xaml. But I got lots of errors saying 'ContentPresenter doesn't have FontFamily' blah blah blah. I'm using SL4, and apparently Nikhil's sample was made for...