silverlight

Silverlight + ItemsControl + Get Control Property Value

Hello, I have an ItemsControl with a DataTemplate that has been defined. My ItemsControl definition looks like the following: <ItemsControl x:Name="myItemsControl" ItemsSource="{Binding}"> <ItemsControl.ItemTemplate> <DataTemplate> <Grid> <CheckBox x:Name="myCheckBox" Content="{Binding Name}" /> </Grid> </...

VisualStateManager for WPF and Silverlight

When you do code like VisualStates.GoToState(this, useTransitions, VisualStates.StateNormal); I believe this code will only work for Silverlight apps. will this affect the way a WPF app works... Trying to incorportae controls that can be shared between both silverlight and WPF apps and was just wondering what were the main pitfalls...

How do I choose files from the local filesystem in Windows Phone 7

I'm trying to choose some files to upload in Windows Phone 7 (in the emulator), and any attempt to ShowDialog of the OpenFileDialog leads to a Security Exception. The open file dialog is being called from an event on a button click but I get a SecurityException [FileDialog_ActiveScripting] Arguments: Debugging resource strings are una...

After playing a MediaElement, how can I play it again?

I have a variable MediaElement variable named TestAudio in my Silverlight app. When I click the button, it plays the audio correctly. But when I click the button again, it does not play the audio. How can I make the MediaElement play a second time? None of the tries below to put position back to 0 worked: private void Button_Click_P...

Performance of browser plugin based RIA vs. Java Script based RIA

Hello. For my data intensive web application (heavy forms & complex reports), from performance standpoint, which is better ... a browser plug-in based RIA (say SilverLight) or Java Script based RIA (say ExtJS)? At this moment, we can avoid the discussion of plug-in availability, etc. My only focus is performance. Reasoning will be app...

Silverlight blank browser

I've got a problem with the Silverlight default VS2008 project. Wnen I create a new SL project and choose ASP.NET Web Site web project type all is ok - in my browser I see default template. But when I choose ASP.NET Web application and run it I get blank browser screen with js error: Unhandled Error in Silverlight Application Code: 2104 ...

Silverlight Vs. WPF Vs. Winforms What is good for specifically my purpose?

I am about to start a new Windows applications and the contenders for the platform are: Windows Forms WPF Silverlight Now my experience with WPF at least in my last application was not very encouraging (the app failed to run on the deployment machines and I had to re-do it in Winforms). So my confidence is shaken here. My app is for...

How to Parse an XML (using XELement) having multiple Namespace ?

Hi I , I get the followinng Xresponse after parsing the XML document: <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"> <item id="1182" parentID="40" re...

Silverlight: Set Items Widths in ItemsControl to Stretch

I've got an ItemsControl which fills from top to bottom, but I can't get it's child items to occupy the whole width of the ItemsControl: I basically need to stretch the green bits to fill the width of the control (as shown by the blue bits). I've tried things like setting the HorizontalAlignment property of the template item to Stret...

How do I add additional data to a DataGridRowGroupHeader?

I have a DataGrid that is showing some data via a PagedCollectionView with one group definition. I have created a Style for the corresponding DataGridRowGroupHeader under which I have added a ControlTemplate containing an additional TextBlock and a spacing Rectangle. I would like to bind the widths of these controls to the widths of part...

Silverlight and UserControls registered as COM

Hello, I have a .NET user control registered as COM. I use regasm to register the control and can then use it in a web page. I have hear that Silverlight 4 supports COM, is that true ? would I be able to use my UserControl in a silverlight application ? Thank you ...

Hierarchical templating multiple object types in silverlight

Is it possible and if so what is the best way to implement the following hierarchical structure in a silverlight (4) TreeView control? (where Item and Group are classes which can exist in the tree). Group | |-Item | |-Group | | | |-Item | | | |-Item | |-Item The structure could of course be arbitrarily more complex than this, if need...

Simplest way to style/present ComboBoxItem in Silverlight?

Hello, What is the simplest way to customize the content display of ComboBoxItem? I would like to present a list of font names, with each item drawn in the appropriate font. I suspect I need something like <TextBlock FontFamily="{TemplateBinding Content}" Text="{TemplateBinding Content}" /> Where would that go? Can I create a contr...

Add space between items in a WPF/Silverlight ListBox without space above first or below last

Is there a standard/best way to space items in a WPF ListBox, such that there is space between consecutive items, but not above the first or below the last? To me, the most obvious way to add spacing is to modify the ItemTemplate to include space above, below, or both above and below each item. This, of course, means that there will be ...

implementing custom timeline with notifications

Hello, I am using compositionTarget_rendering function to do some stuff in silverlight. Now I want to implement some kind of timelime, with notifications, i.e add some markers, and when a variable X reaches the marker value, an event is raised .. How should be the best way to do this? Thanks in advance ...

Web Services: more frequent "small" calls, or less frequent "big" calls

In general, is it better to have a web application make lots of calls to a web service getting smaller chunks of data back, or to have the web app make fewer calls and get larger chunks of data? In particular, I'm building a Silverlight app that needs to get large amounts of data back from the server in response to a query created by a ...

How do I debug a Silverlight application against a deployed service [cross domain problem]?

I have a WCF service and a Silverlight application that work just fine when they're deployed to the IIS server. I want to debug the Silverlight application in Visual Studio on a development machine, but have it talk to the actual service deployed on the server, not to a local instance of it on the development machine. I was expecting t...

Automaticly Change VisualState in Silverlight

If you create a simple button and then choose Edit Template -> Edit a Copy, Blend will automatically generate a style area, along with all the button states (MouseEnter, MouseLeave, Pressed, etc). No where in the generated code does it say that on a "MouseOver" event, change the state to "MouseOver", but it still manages to work! How d...

TranslateTransform for drag and drop in Silverlight

We're trying to implement drag and drop in Silverlight (3). We want users to be able to drag elements from a treeview onto another part of a UI. The parent element is a Grid, and we've been trying to use a TranslateTransform along with the MouseLeftButtonDown, MouseMove (etc) events, as recommended by various online examples. For example...

Calling Property Methods from the e.PropertyName property

void TheSettings_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { var settings = IsolatedStorageSettings.ApplicationSettings[StorageSettings] as Dictionary<string, string>; settings[e.PropertyName]= //call the method that has the same...