silverlight

LightSwitch and VS 2010 Ultimate

If I want to use LightSwitch's prebuilt silverlight forms is there a way for me to do it within VS2010 (i have ultimate)? It is slightly annoying to have to load a slimmed down VS just to have some templates in place. I'm downloading LightSwitch now to see if I can copy the prebuilt forms into a VS2010 silverlight app. ...

Changing DataTemplates at Runtime

I'd like to be able to swap out data templates at runtime, but without the FindResource("fdds") as DataTemplate Type of code I've seen a lot. I'd like to be able to just bind the template to look for the resource according to a property in my ViewModel. Conceptually I'd like to be able to do this, but the compiler obviously doesn't...

How to get a border around text element with auto-width/height in Silverlight + padding

What I have at the moment is only defined width: <Grid> <Rectangle Fill="#FFF5F7F9" HorizontalAlignment="Left" Height="80" Stroke="#FF565656" VerticalAlignment="Top" Width="128" RadiusY="15" StrokeThickness="3" RadiusX="15"/> <TextBlock HorizontalAlignment="Left" Height="47" TextWrapping="Wrap" Text="Draft" VerticalAlign...

What's the right pattern for creating asyncronous services?

Here's what I'm trying to do: public class EmployeeService { public void GetEmployeesAsyc(Action<IEnumerable<Employees>> callback) { ThreadPool.QueueUserWorkItem(x => { var employees = //...fetch employees ...// callback(employees); }); } } public class ViewModel { private Emplo...

WP7 Frame embedded in a page linking to another page

I have a xaml page that I want to host another xaml page for various reasons. I attempted to use the Frame control, but I ended up with a warning telling me that the default constructor must be public... <controls:PivotItem Header="page1"> <Controls:Frame Source="MyPage.xaml"/> </controls:PivotItem> Okay, well that doesn't work;...

How to redirect to silverlight page from asp.net

Hi i have an ASP.Net application and from one page i have to redirect to silverlight page, i am new to silverlight so i have two question Can i add silverlight page in asp.net app or i will have to add silverlight application in asp.net solution. How to redirect from asp.net page to silver.(i want to pass some data from asp.net to silv...

Unable to play Silverlight control from IP address on my local machine

I have a silverlight control / an .ism file hosted on my company server. I have an html page through which I can run the file in via http://localhost. However when i wish to access the same page via my IP address, it gives "Internet Explorer cannot display the webpage". Do I only need to add my ip address in hosts file or I would requir...

programmatically binding images to silverlight grid cell based on condition

how can i programmatically binding images to silverlight datagrid cell of a particular column based on the datasource values ...

Silverlight Depedency Property Not Updating/Changing

I am having trouble updating a dependency property in Silverlight. I am setting a property and notifying it changed in my parent class. The custom control listens to this property changing through a dependency property, but it never hits it (calls the change callback). I have been playing around with it and the only time I can get it ...

Is there any way to change BitmapImage size in code? (Silverlight)

Is there any way to change BitmapImage size in code? (Silverlight) ...

Silvelight SizeChanged event

Hi ! I don't know what's happening when resizing the main window, but on my laptop the SizeChanged event fires only when i release the mouse, on other computer the event fires immediately when the mouse moves, not when released. I use IE 8. And the other computer also uses IE 8. What might be the cause of this? ...

Can I set maxConnection in WCF RIA?

I've experience with WPF and WCF, with WCF I can set maxConnection to limit maximum connection per service. Now, I'm moving that application to Silverlight and WCF RIA but I can't find that property so it can do only 4 connection parallely. Anyone know how can I configure WCF RIA to accept more connection? ...

Is EventToCommand passing EventArgs bad practice?

I've recently been using the MVVM light toolkit for Silverlight 4. I really like the EventToCommand behaviour that is included, it makes life a lot easier. One thing I've been wondering about is if setting PassEventArgsToCommand="True" is bad practice as it will tie a particular RelayCommand to a particular event in the View. E.g. If ...

Realtime multiplayer available for Silverlight

I am new to silverlight, My question is it possible to create a real-time multiplayer game in silverlight. Example, If someone goes to site and playes a silverlight based rpg game. so the person that starts the game can invite his/here friends through a link that is provided by the game or website. Every user gets a unique link and can ...

How can I convert WriteableBitmap to BitmapImage?

BitmapImage bitmapImage = new BitmapImage(new Uri("arka_projects_as_logo.png", UriKind.Relative)); Image uiElement = new Image() { Source = bitmapImage }; ScaleTransform t = new ScaleTransform() { ScaleX = 0.2, ScaleY = 0.2 }; WriteableBitmap writeableBitmap = new WriteableBitmap(uiElement,t); I want to insert the result of this conver...

Silverlight and skydrive/dropbox

Hi, Can You read/write a file in your Skydrive with Silverlight? Or if that isn't possible, can you dot it with Dropbox? thanks, Filip ...

Silverlight 3 : Datagrid - Editing a cell shows a "Property set method not found." message

Hi All, I have a silverlight datagrid control bound to a Dictionary<string, string> with autogenerate columns set to true. In the AutoGeneratingColumn event i change the column Header and IsReadOnly Properties as required(column bound to dictionary value is editable). if ( string.Compare( e.Column.Header.ToString( ).ToLower( ), "key"...

SL ItemsControl, command on ViewModel not firing from ItemsControl (CheckBox)

Hi, I'm using PRISM v2, CAL, SL4 and MVVM and have a delegate command on my ViewModel called CheckCommand. The ItemsControl contains a checkbox and I'm trying to get the items in ItemsControl/Checkbox to fire this command when it's checked - but it's not communication back to the viewmodel! I think it's because each items 'datacontext' ...

Silverlight control not stopping at container bottom

I have a grid that hosts a stackpanel that hosts a listbox. The Listbox once filled from the itemssource is stretching out of the visible area of the stackpanel. I have tried limiting the grid and stackpanel in size and the listbox continues to stretch out of the visible range (it just goes to edge and continues as if nothing was there...

Silverlight 4 Printing: Getting a Blank Page

Hello, Trying to implement a simple print in SL4. I have a DataGrid that I would like to print out, but thus far whatever I try to print out comes out as a blank page in the printer. It also seems to take about 30-60 seconds to actually print out (but that could be an unrelated issue). My code is fairly straightforward: private void M...