silverlight

How to layout a Silverlight app?

I am brand new to Silverlight. Just downloaded and installed it (the SDK and the controls toolkit), went through a few tutorial and getting my head around XAML. I want to build a fairly simple app with 3 panes. It should look similar to the image below. Panel 1 will have a TreeView. Whenever the user clicks on a node, something els...

debugging c# silverlight projects from vb web application

Hi, I have a problem whereby I cannot debug a c# silverlight application project that is hosted from within a visual basic web application. I add breakpoints to the main App constructor and the symbols are loaded ok but my breakpoints are never hit. I have concluded that it is a vb/c# interop problem as to test i did the following. ...

how are wpf and silverlight different?

can anyone tell me what is the difference in wpf and silverlight, what features has been added and removed from wpf in order to get silverlight. ...

Silverlight and callbacks in non-UI threads

Does Silverlight ever callback in the non-UI thread after an Async task (such as event listening or network request)? Assume that I've created no threads of my own. Thanks, Rui ...

How can I place element to position with Silverlight?

I want to draw rectangle to position what I get from startPoint, but now it places my rectangle to middle of PictureCanvas, when I want to put it in startPoint position private void DragSelectComponent_SelectionEnd(DragSelectEventArgs e) { Output.Text = "Start: " + e.StartPoint.ToString() + " End: " + e.EndPoint.ToString() + "\n...

Error: The project type is not supported by this installation.

I'm trying to open a silverlight project in Visual Studio 2008 and getting this error. The project type is not supported by this installation. Let me tell you I did installed: VS2008 SP1 Silverlight Tools 3 Silverlight SDK Silverlight And they were installed in the sequence they are mentioned here. Still I'm getting the same error....

Forcing browsers to reload Silverlight xap after an update

I have a Silverlight control packaged up and deployed to a SharePoint web part. I'm having trouble with the browser loading new versions of the control after I push an update. I'm updating the assembly and file version of my xap project, but it doesn't seem to matter. The only way to get the browser to load the new xap is to go in and...

MVVM firing event back to view

I have a ViewModel where one of its functions is to talk to a service and get some data. However, if there is a problem, I would like a notify the user that the service could not run. Currently what I am doing is firing an event which the view has subscribed to (my viewModel is created in the resources section of the view) and receivin...

TypeConverter for generic type used in xaml

I am looking into initializing members of generic types declared in XAML. This is targeting the (reduced) generics support in WPF 4 and future Silverlight. (I have tried the scenarios below using x:TypeArguments and XamlReader.Load in VS2010 Beta 2, but will use TestClassInt32 : TestClass<int> { } for simplicity, as it has the same behav...

Localization of error message in Validation silverlight

Hi, I want to use localization feature for Validation messages, for eg- [Required(ErrorMessageResourceName = "RequiredField", ErrorMessageResourceType = typeof( ))] public string someText { get... set...} I'm using MVVM pattern so this property is in my model(its a differnt project inside same solution of silverlight) ...

creating a HierarchicalDataTemplate in Silverlight with code

I'm trying to create a HierarchicalDataTemplate (from the Silverlight Toolkit) in code in Silverlight following this advice on creating DataTemplates from code: http://stackoverflow.com/questions/59451/creating-a-silverlight-datatemplate-in-code. However, I haven't been able to get it to work for HierarchicalDataTemplate. I tried using ...

Why dependency properties?

Why did Microsoft go the route of making dependency properties and dependency objects instead of using reflection and maybe attributes? ...

How do I architect this Silverlight app?

Totally new to Silverlight (and XAML), but a long-time c# developer. I am building an app that will look similar to this: Basically the user clicks on a node in the tree (Panel 1) and new content appears in Panel 3. In Winforms, I would have just built a UserControl for each node and just swap the Panel 3 based on the node clicked....

Missing Unload event in Silverlight 2

Silverlight 2 is missing the unload event for a UserControl. Has anyone implemented a workaround for this? ...

Issue binding Silverlight Custom Control dependency property to Model property

Hi, I have a data navigation user control in Silverlight which opens a child window where the user can enter search criteria and when they press 'Apply' it's suppose to update the bound property in the ViewModel (MVVM pattern.) The links are: SearchDialog <--> DataNavigator <--> MyView <--> MyViewModel The dependency property in Search...

Which has better rendering performance, Stackpanel or Canvas+TranslateTransform? WPF/Silverlight

I always use a Canvas when I'm laying out my visuals usually because I will need adjust the RenderTransform.TranslateTransform to animate in some way. A colleague recently told me that unless I explicitly need to animate I should always use the A Stackpanel because it is faster than a RenderTransform.TranslateTransform when laying out ob...

Clientaccesspolicy.xml randomly not being requested

Hello there, I have a silverlight 3 application running on a seperate domain that my WCF services. Using both fiddler and Web Dev Helper I am able to see that when I make a web service call SOMETIMES a request is made to clientaccesspolicy.xml and everything works great. The issue is that is doesnt always make this request. When it d...

Silverlight: How to change TreeViewItem text color when it selected

I have TextBlock inside HierarchicalDataTemplate. I need to set foreground color to Red when TreeViewItem selected. <controls:TreeView Background="#FF939597" ScrollViewer.HorizontalScrollBarVisibility="Disabled" x:Name="CommentTreeView" Margin="0,0,0,118" ItemContainerStyle="{StaticResource SectionsTreeViewItemStyle}"...

Silverlight Navigation issues

I am trying to navigate to pages passing parameters, which I have got to work from the mainpage, but when I try and do a similar thing at a lower level I get a page not found error (the index page works, but the DetailsIndex does not) MainPage.xaml <navigation:Frame.UriMapper> <uriMapper:UriMapper x:Name="myUri"> ...

ASP MVC to Silverlight MVVM issues

I am converting an asp.net MVC application to silverlight, and due to the fact I was doing some 'non-standard' things in my mvc app, I am having a hard time trying to work out how to implement it in Silverlight MVVM. Basically I was generating all my views from metadata, including links, buttons etc. One example of this that I can't ge...