silverlight

How do you delete directories from Isolated Storage in Silverlight 4.0 ?

Hi, I have a snippet of code that should remove a text file and its' parent directory: if (isolatedStore.FileExists(logPath + "\\" + logFileName)) isolatedStore.DeleteFile(logPath + "\\" + logFileName; if (isolatedStore.DirectoryExists(logPath)) isolatedStore.DeleteDirectory(logPath); ...where logPath + "\" + logFileName mig...

Silverlight control in aspx page

i have two silverlight user controls name region.xaml and session.xaml and i want to place them in region.aspx and session.aspx respectively. The problem is that in both the aspx pages i am getting the region.xaml control how to fix it hta in the session.aspx session.xaml control will be displayed. ...

Mltiple EditTemplates for DataForm in Silverlight 4

Hi, I have a simple scenario where I'm displaying some products in the datagrid control and the details of a particular product is shown in DataForm. Each of the products are of different type and I want to display the fields only related to the Product Type in the DataForm. e.g If User selects Product 1 from the grid, I want to populate...

Getting the ListItem of a Databound list in Silverlight

Hi folks, in my Silverlight 4 Application, I have an observable list of a user defined class ObservableCollection<MyClass> myList; public class MyClass { public string Name { get; set; } public string Value { get; set; } } I display this list in a ListBox, using databinding and a Template for the ListBoxItems: <ListBox x:Name="...

Add to Silverlight project service reference with non async generate operations

Hey, I try to consume WCF service in Silverlight project but in ass Reference dialog windows i can't unchecked "Generate asynchronous operations" :/ Why I can't use non asynchronous in SL? When I add service reference to Console App I can unchecked it. I need non asynchronous, cause in Console consume works ok, but in SL app I have erro...

Uri reference to ressource in assembly loaded on demand.

Hi there, I do load an assembly on demand which holds ressources (fonts) in it. The assembly is being loaded by the AssemblyPart class, and therefore added to the current application domain. txt1.FontFamily = New FontFamily("/SilverlightFontLibrary;component/GRAFFITO_01.ttf#Graffito") Dim kaa = Application.GetResourceStream("/Silverli...

How to hide entire DataGrid in Silverlight?

Hello! I'm using DataGrid control and I need to hide it. I've tried to use dtgAllAccounts.Visibility = Visibility.Collapsed. But this doesn't work. Column headers still visible. Are there any ways to hide entire DataGrid with all column headers? <sdk:DataGrid AutoGenerateColumns="False" HorizontalAlignment="Cente...

How to update silverlight UI while processing

Hi, I went through several examples posted online but I cant answer my question. I have my 'p' variable that is being increased by 1 in the for loop. I want the UI to display the progress of calculation (to show how 'p' is increasing from 0 to 1000000). I do the calculation on the separate thread and the I call dispatcher to update the...

Error when try consuming WCF service in Silverlight app

I have error in Silverlight app: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at SecretaryAppNav.ServiceReference1.GetChildByFirstnameCompletedEventArgs.get_Result() ...

WebView containing Silverlight

In my cocoa application I have a WebView. If I set that WebView to display a web page that contains Silverlight, the mouse move event never fires in that Silverlight application (with the exception of if I hold down the mouse button while moving). Everything else seems to work fine (clicking, interacting with objects) except for mouse ...

Silverlight mediaelement progressbar

Hi, I am trying to create a custom media player in Silverlight. I am working on the Progress Bar. I want the progress bar to display the current Download Progress as well as the Current Position of the mediaelement while it is playing. To do this I have a Progress Bar to display the download progress and a Slider laid over top to displ...

How easy is it to port ASP.NET MVC to Silverlight application and vice versa?

I was thinking of writing a client application in ASP.NET MVC first to make it available over the net to everyone. In the near future I'd like to port it to Windows Phone 7 using Silverlight. How much of the code can I re-use from ASP.NET? Would I have to completely rewrite it? Thanks in advance! ...

how to rename a project without killing solution

When I rename a project within a solution, and then try and build that project, I get the error: "The project file "xyz.csproj" was not found. Where xyz is the old project file name! The annoying thing is that I can search my project & solution for the old project file name, and the search will come up with nothing, and when I click on...

Customizing an existing control by adding properties

I'm trying to create a custom AccordionItem that can take the tag property value "Rank": <local:MyAccItem Header="" Content="" Rank="" /> This isn't really working because my control simply contains a grid that contains the original Accordion item. I have tried manipulating the template and have created a Resource file with a modifie...

MAF vs. MEF vs. Prism

I watching some tutorials for MEF or Prism with Silverlight but was also doing some MAF work (System.AddIn) on the side and thought that might work also. I see that Prism and MEF are pretty much the same thing but Prism having the event aggregator. Does anybody have thoughts on how well MAF works with Silverlight? ...

Getting Started with Matrix3D (Silverlight)

Okay, I know absolutely nothing about 3D projection, but I need to figure out a way to project pictures in Silverlight (<Matrix3D/>) based on some predetermined variables that I have available to me. I've searched high and low for some sample code or a really basic "for stupidies" set of articles, but have yet to find anything that makes...

A custom datetime struct

I am trying to develop a clock application with images for each digits from 0-9. Wrote a struct that gives me each digits every now and then. Following is the struct. public struct TimeStruct { public DateTime dt { get { return DateTime.Now; } } public int s { get {...

Difference between x:Key and x:Name

What is the difference between x:Key and x:Name in WPF? ...

Sorting a PagedCollectionView by index (using Silverlight Datagrid)

I have a silverlight datagrid which is bound to a PagedCollectionView displaying a collection of RowViewModels. Each RowVM has a collection of CellViewModels, and the datagrid columns are templatecolumns and are generated dynamically with their content bound to Cell[0].Content, Cell[1].Content, etc. This is because the rowviewmodels ar...

Order Images in ListBox DataTemplate Horizontally

Preview On the highlighted item, the images still ordered vertically even I already use <StackPanel Orientation="Horizontal">. Am I missing something? I don't want the images have ListBoxItem behavior (hover/click). I had added IsEnabled="False" to the list box, but the images' opacity decreased : ( Do you have any idea how to do thi...