silverlight

In Browser Silverlight Application - Client Side File/Directory access

岁酱吖の 提交于 2020-01-07 05:04:31
问题 When building a Silverlight 4 application is it possible to get a directory listing from an in browser application? It seems the SaveFileDialog does not have the capability to set the file name of the file being saved, so I thought that I could create my own user control, however it seems that is not possible as I can't get a directory listing in an in-browser application. I realize that certain well known directories are accessible from Silverlight 4 in out-of-browser application, but that

Wpf nesting containers

柔情痞子 提交于 2020-01-07 04:43:11
问题 On a window control, my main container is a grid. My grid has 2 rows, one row definition is 50*, and the other is 250*. Now i want to add a right sidebar, lets say with a StackPanel. I would like to have a ListBox inside the StackPanel that aligns with the 50* grid row, so as the window height gets bigger, the ListBox size will also get bigger. My question is whether i can achieve this behavior while the ListBox is inside the StackPanel (which is nested inside the grid) or must the ListBox be

Silverlight C# - How to get value of row/cell clicked on in DataGrid?

半城伤御伤魂 提交于 2020-01-07 04:22:19
问题 I've got a DataGrid that I'm populating with data, and I'd like to copy the value of the cell clicked on into a string. Better yet, I'd like to copy the value out of a specific cell in the row, so if there's a way to load the entire row into an array that'd be better . For instance I'd have a few rows like this: Included | Keyword | Occurrences | Density ------------------------------------------------ Yes | KW1 | 3 | 1.02% Yes | Keyword2 | 1 | 0.25% Yes | KW1 | 3 | 1.021% If I were to click

Prism MVVM - How to pass an IEventAggregator to my ViewModel

◇◆丶佛笑我妖孽 提交于 2020-01-07 04:14:13
问题 recently I started working with Prism in Silverlight. I want to use the EventAggregator to Subscribe and Publish events between two ViewModels. As I saw on some guides, the ViewModel's ctor should accept IEventAggregator as a parameter. I can't find out how to do this hence my View always wants to initialize the ViewModel with a parameterless ctor. My ViewModel ctor: MyViewModel(IEventAggregator eventAggregator) { // get the event.... } My View: <UserControl ....> <UserControl.Resources>

RIA Service Class Objects are not updated

谁都会走 提交于 2020-01-07 02:53:09
问题 In my silverlight project, I am using RIA DomainDataService to get objects from the asp.net project. public class MyObject { [Key] public int Id{get;set;} public double XValue {get;set;} } This is the static object in the RIA Service - its scope is class level. private static List<MyObject> Models = new List<MyObject>(); In asp.net project, I insert objects in Models and get it on silverlight end. Later on, I have to modify objects in the static List but the List always returns the same

Exception message not being displayed correctly on client computers

萝らか妹 提交于 2020-01-07 02:52:05
问题 The project I'm currently working on is a form designer (Silverlight Application) wherein the user can drag a control from the toolbox to the work canvas and then supply its properties in the property pane (like Visual Studio and Expression Blend) We deployed our app in the IIS of our test server for the QC department to test it. There is a certain bug wherein typing in "Auto" in fields where it is not applicable (MinHeight and MinWidth) is not being handled properly. What we did is go on

The Windows Phone Official Sample cannot even compile : Syndication misssing

别等时光非礼了梦想. 提交于 2020-01-07 02:27:06
问题 I tried to compile http://msdn.microsoft.com/en-us/gg266450 But it says It cannot find System.ServiceModel.Syndication I have 2, 3.5, 4 .NET framework installed. In add reference I can see System.ServiceModel and System.ServiceModel.Web version 2 not anything like 3 or 4 so I wonder how I could add that namespace as mentioned here http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.syndicationfeed(v=vs.95).aspx This is rather incredible that MS has messed with namespaces

Find the Parent RichTextBox from the Focused Hyperlink Within

旧巷老猫 提交于 2020-01-06 21:00:58
问题 The Setting: I have a RichTextBox containing a hyperink and a DropDownButton somewhere else in my UI. Now when I click the button's DropDown open and afterwards click somewhere else on my UI, the DropDown is implemented to close, and check if it still owns the keyboardfocus so it can set its ToggleButton to focused again after the DropDown collapsed as intended. The Problem: When clicking inside my RichTextBox I will face an InvalidOperationException caused by my method to check focus

Do this in C# code instead of template XAML

孤街浪徒 提交于 2020-01-06 19:34:53
问题 Is there a way to make column of cells in a Silverlight datagrid be readonly in editmode with C# code instead of setting up a entire datagrid as a template in a resource file? UPDATE Found an example piece of code - http://forums.silverlight.net/forums/p/17483/58189.aspx In the response by slhungry midway into the thread. He has example code written as a XAML template. Can you write this in C#? 回答1: Well, you can certainly create DataGridColumns programmatically in your codebehind and add

Is this XAML code possible?

。_饼干妹妹 提交于 2020-01-06 19:30:55
问题 I have a silverlight app that I'm trying to keep as MVVM as possible. I'm trying to set the datacontext of the page from a static resource on the page (so that I can reference the static resource later in a datagrid). But I'm having problems getting this to work. Is the following code possible? <navigation:Page.Resources> <local:ProposalViewModel x:Key="viewModel" /> </navigation:Page.Resources> <navigation:Page.DataContext> <!-- Binding to the viewmodel exposed from 'viewModel' --> <