silverlight

Cross-domain scriptable Silverlight application

I'm having problems with cross-domain application hosting with Silverlight. I have an application hosted on a different domain and included with the following HTML code to the page: <script type="text/javascript"> function succ( sender, args ) { console.log("SUCCESS"); console.log(sender); console.log(args); } function err(...

XmlConvert.ToDateTime Windows Phone 7

Hi, I'm trying to convert an xmlattribute's value (yyyy-MM-ddTHH:mm:sszzzzzz) to yyyyMMdd. I'm trying to use: XmlConvert.ToDateTime(xmlattribute.Value, "yyyyMMdd") But i'm getting formatexceptions: "An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll" Any help is very much appreciated... Thanks! ...

XML Documentation for dependency properties

What is the best way to document a dependency property? Should I put the xml documentation on the field: /// <summary>Documentation goes here</summary> public static readonly DependencyProperty NameProperty = DependencyProperty.Register(...) or on the property: /// <summary>and/or here?</summary> public string Name{ get{......

How to Repeat x width silverlight header?

i try to write some codes : Header, Footer, Right, Left panel. But it must be like css Automatic width (if i maximize button in my explorer or firefox scanner). Such as default header width 300 if clicking max button of explorer it runs reat-x like css <UserControl x:Class="DockPanel3.MainPage" xmlns="http://schemas.microsoft.com/w...

Passing a TextBox value to an IValueConverter used by another databound control in Silverlight 3?

I have a Silverlight 3 control where I am using an ItemsControl to display a list of items. I have implemented a "filter" or "search" textbox that allows the user to enter a search term in a textbox on the control that will limit the items displayed in the ItemsControl to ones that contain the string entered in the textbox. I have been...

Loading file in silverlight

Hello, I would like to load a custom file put as a resource file in my silverlight application, but the FileStream doesn't works (since I must stay in a partial trust environnment). Is there any solution to load my file? (it is a binary serialized data). UPDATE Answer found : I put my file as a "Resource" (not embedded neither conte...

Silverlight Low Level Socket Support?

I have a Silverlight app that needs low-level socket support. It's an Out-of-Browser Trusted app, so it has more network permissions. But, I noticed that that Silverlight only supports limited TCP sockets, even with elevated permissions. The method "SetSocketOption" has been removed too. I didn't think that was too big of deal as I knew ...

Is it possible to programmatically lock a windows phone 7 device?

I'm creating a WP7 app that needs to continue running when the user is not using the phone - ideally the user sets it going, locks the phone and carries on with their life. Is this possible? I know it is possible to disable the lock screen, so if the user were to just leave the phone on a table it would be fine and carry on running. Th...

Disable windows phone 7 hardware keys in silverlight

Hi, Is there any way of disabling the hardware keys on Windows Phone 7 programmatically using Silverlight? Thanks, Phil ...

Convert a Byte Array to String in Silverlight?

I'm trying to convert a byte array to a string in Silverlight, but I get the following compilation error: 'System.Text.Encoding.GetString(byte[])' is inaccessible due to its protection level This is the method that I'm using: string text = UTF8Encoding.UTF8.GetString(myByteArray); How else can I achieve this? ...

Windows Phone 7: Media file plays multiple times before one finishes

My silverlight code: var stream = TitleContainer.OpenStream("Giggle.wav"); var effect = SoundEffect.FromStream(stream); FrameworkDispatcher.Update(); effect.Play(); The file, Giggle.wav plays multiple times. I expected the code would wait while the "Play" method executes. Suggestions to make it play one instance at a time? Thanks ...

WP7 help with menu effects

Kinda new to Silverlight and have some experience with WPF but I'm doing a project with a group for a class making a game for WP7. I am currently in charge of the menu system for the game and I had a few ideas for "flashy" menu transitions. I got some going for the main menu but I wanted to do something cool for the options submenu. Any...

WCF issues with endpoints and svc file

locally I am not having any issues running a silverlight application. site comes up just fine. we deploy our code to our test environment and our site (or access to our data) stops working. I dont think our svc file is being recognized. I am leaning towards an issue with the endpoints. Im fairly new to wcf and service references. below i...

Is there an analog to "locate.replace()" in Silverlight 4 Navigation?

If a user navigates to a page that displays an "add item" view (#/items/add), I want to basically skip that url when they click "back" after they save the item. How can I do this? Here is the behavior I'm after in more detail... if the user has navigated to and is currently on this silverlight url: #/items/list when they click the "a...

Hosting non RIA Service from RIA Service website

We're using Silverlight 4 and Ria Services, but we also need to expose a regular WCF service to the client, ideally from the same Ria services website. I suspect this is because of DomainServiceHttpModule or due to the fact that the service is expecting binary coming back from the client instead of a SOAP message. Has anyone had any su...

How to bind silverlight datagrid combo box itemSource to viewModel

We're using Caliburn.Micro/Silverlight 4 and life is good. I'm trying to bind a combobox's itemsSource to a viewModel, but this doesn't seem possible since the combobox is already bound to its own row's dataItem. The logic which fills the combo changes with other data on the screen so I can't really use a static list like I've been usi...

How to create Master Detail view with two user controls in MVVM?

I am little confused about how to create Master Detail view with two different user controls. There are three choices, Choice 1 CustomerMasterView + CustomerMasterViewModel CustomerDetailView + CustomerDetailViewModel And keep both View Models in App.Resources But by doing this, binding becomes complex with all static resources sou...

silverlight treeview

Using WCF i get data from server. Data contains Folders and these folders contain queries. I need to set folder icon(expanded collapsed) on the folder node and another icon on query. TreeView is bound to this collection using HierarchicalDataTemplate. I tryed to do it with converter but failed. I also want it to be MVVM compliant. <sdk:...

Using silverlight datepicker and timepicker together

I'm using the Silverlight DatePicker and TimePicker from the toolkit together to allow a user to select a date and time. They are bound to the same DateTime value on a business object behind the scences. This mostly works okay, except when the date component is changed the time component is wiped. This is kinda logical but probably not t...

How to pass an extra property to a usercontrol which is inside DataTemplate, in Silverlight

I have an Itemscontrol in my xaml, and I am calling a user control in the DateTemplate of ItemsControl like following <ScrollViewer Margin="0,0,0,0" BorderThickness="0"> <ItemsControl x:Name="itemsStackPanel"> <ItemsControl.ItemTemplate> <DataTemplate> <controls:UserItem Margi...