silverlight

Linq Query Giving Error

I am getting this error when I use the Linq expression of var emp = _testModel.Where(m => m.Date == DateTime.Now).Select(m=>m); The error is 'System.Collections.Generic.IEnumerable<TestModel>' does not contain a definition for 'System' and no extension method 'System' accepting a first argument of type 'System.Collections.Generic.IE...

How can I change the visibility of elements inside a DataTemplate when a row is selected in a Silverlight datagrid?

I'm using the MVVM pattern. I've bound my items and I want to only show the edit button when a row is selected in the datagrid. It appears to be possible with triggers in WPF but we don't have triggers in Silverlight. I tried a TemplatedParent binding but I'm not sure what the TemplatedParent is in this case. We don't have RelativeSource...

WCF(HTTPS,UserName) calling by SilverLight

Hello colleagues. I've created wcf service with transport security over HTTPS. Also I use UserName authentication as described at http://msdn.microsoft.com/en-us/library/cc949025.aspx, so I can use my Membership,RoleProvider. When I work with this service with ASP.NET all is OK var client = new RegistratorClient(); client.ClientCred...

using Silverlight 3's HtmlPage.Window.Navigate method to reuse an already open browser window

Hi, I want to use an external browser window to implement a preview functionality in a silverlight application. There is a list of items and whenever the user clicks one of these items, it's opened in a separate browser window (the content is a pdf document, which is why it is handled ouside of the SL app). Now, to achieve this, I si...

DataGridRow Cells property

I would like to get to DataGridRow Cells property. It's a table of cells in a current DataGrid. But I cannot get access direct from code nor by Reflection: var x = dataGridRow.GetType().GetProperty("Cells") //returns null Is there any way to get this table? And related question - in Watch window (VS2008) regular properties have an i...

Automating silverlight unit tests using StatLight and TeamCity

Hi, What is the best way to run silverlight unit tests automatically using team city? I have found StatLight which we had working well when we used cc.net, and it says that it has support for teamcity. Does this just mean the test results output file is compatible with teamcity? Do I need to create a command line runner to run the tes...

Can't get up with RIA demo

Based the article I've tried to start-up the RIA services. At the moment there are 2 blockers: On the client side I don't have <datagrid:DataGrid component. Does anybody know what namespace contains this object? (already resolved with Silverlight Toolkit usage, thanks to Refracted Paladin for help) On the client side I don't have ac...

Is the usage of Isolated Storage in Silverlight 3 a security concern

I am using Silverlight 3 on my website. I have a Login Page for role based authentication, that routes users with different privileges to different parts of the website. I want to use something analogous to the Session Variables available in standard ASP.Net applications. I intend to use Isolated Storage to achieve this. But I am skepti...

Change the source of Image using StoryBoard

I want to change the source of an image using storyboard in silverlight blend on mouse over: <VisualState x:Name="MouseOver"> <Storyboard> ---code here-- </Storyboard> </VisualState> ...

Where is the Microsoft.Windows.Controls.dll in the Nov 2009 Silverlight Toolkit?

I want to use WrapPanel in Silverlight 3. It is apparently in the Silverlight Toolkit. All the information I can find on it say to download the toolkit, unzip the download, look in the folder binaries and you will find Microsoft.Windows.Controls.dll. This works for December 2008 version of the Silverlight toolkit just fine, since it i...

Listbox items not selectable

In silverlight, I'm creating a listbox at runtime. The listbox displays on the page okay but the items aren't selectable - I don't understand why? Am I doing something wrong? Here's my code: C# public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); ListBox lb = GetListbox(); ...

How do I simplify my code?

I just finished creating my first major application in C#/Silverlight. In the end the total line count came out to over 12,000 lines of code. Considering this was a rewrite of a php/javascript application I created 2 years that was over 28,000 lines I am actually quite proud of my accomplishment. After reading many questions and answer...

Access with Silverlight to a postgres database running under Linux ?

Hi everyone, I know we cannot access directly to a database with Silverlight. Linq 2 SQL doesn't exist for Silverlight but can I use other things ? I heard too about RIA Services and ADO.net but I don't think they are implemented for a Linux Server. Thanks for your future answers. ...

Starting an "out of browser Silverlight 4 elevated app" from another "out of browser Silverlight 4 elevated app"

I am concurrently running several different out of browser elevated applications and sending messages between them. Is there a way for me to check to see if a specific one of those elevated out of browser Silverlight apps are currently running and if not programmatically start that app for the user? preferably without automation. If v...

Cannot resolve TargetName - Silverlight4 C#

I am getting the error Cannot resolve TargetName grdGeneral. What I am trying to do is have a fade out function which accepts a grid and fades the opacity to zero. I have this function called on MouseLeftButtonDown and is loaded after the xaml and form has loaded. Calling the fade out: private void imgNext_MouseLeftButtonDown(object se...

Which version of Silverlight is it the safest to use in production?

How safe is it to use Silverlight in production for a graphic form? Is it installed on most computers, do to Windows Update feature? If so, which version is it installed? What is the safest target version? ...

Can a WPF base class contain a control for a derived class?

Hello, I have several UserControls that have some of the same controls doing the same job. Is it possible to extract those controls into a base class? When I have tried it, I get an error that the definition in the generated .g.cs file will hide the parent def. What I would like to do: public class ctlBase : UserControl { internal C...

Opening response stream in silverlight

Hello, I am attempting to return a image from a server using Silverlight 3. The server returns the Response stream like this: context.Response.ContentType = imageFactory.ContentType imgStream.WriteTo(context.Response.OutputStream) imgStream.Close() context.Response.End() On the Silverlight client I am handling the stream like: ...

RIA Services Localization, where to place Resource Files

I have the following Solution: SomeProject.Ria (non Silverlight code) SomeProject.Ria.Silverlight (Silverlight light code, namespace is still SomeProject.Ria) SomeProject.Ria.MyServices (RIA Services Domain Service) SomeProject.Ria.MyServices.Proxies (RIA Services Silverlight Generated Code) SomeProject.Shell (Silverlight Applicaiton) ...

Can Silverlight be linked with a C++ static library ?

Hi, I'm currently doing researches to start a new project. This project will be in 2 parts a light Client (probably console) and an heavy one using silverlight. The light client must be cross-platform. However, they will both use the same Core (by the way, the core will need to use the sockets). I'd like to use C++ to build the light ...