silverlight

What is the easiest way of detecting whether assembly targets ordinary .Net, CF or Silverlight?

I found this question already on SO, but it only covers CF, so my question is: how do I detect whether an assembly has been built for ordinary .Net, CF or Silverlight? ...

Does MouseLeftButtonDown sender object really not pass a referance to object that triggered it? c# Silverlight

I recently created a Silverlight 3 app in which I created some UI elements in the code behind and added them at run-time dynamically. I was hoping to just use the built-in MouseButtonEventArgs or the sender object to get a reference to the instance that was clicked, however I noticed once I started that this was not the case. I was not ...

Grab-to-pan in Silverlight app

Hello, I have a Canvas inside a ScrollViewer. I want to have the user to be able to grab the canvas and move it around, with the thumbs on the scrollbars updating appropriately. My initial implementation calculates the offset on each mouse move, and updates the scrollbars: // Calculate the new drag distance Point newOffsetPos = e.G...

wpf user interface ideas for datagrid presentation

Hello I need to create a desktop lob interface presentation where a user has crud capabilities on items in a list, which is why I am thinking of using the wpf datagrid control. Does anyone know of a widely available program that has an inspiring interface? I am just drawing a blank right now - I can't even think of an MS office list ba...

Silverlight - Displaying Hierarchy of tabular data

hello, I have some data that I am displaying in a DataGrid. This data has multiple properties, which represent the columns of the DataGrid. One of these properties is a collection of another type of entity. When a user selects an item in the DataGrid, I want to show the collection of entities in a tabular structure. In a sense, I'm lo...

Is there any way to control where the output file of a T4 is generated to?

I would like to generate C# code for silverlight but I dont have access to some dll's that would make my T4 code more powerful. Is there anyway to have my T4 template in a C# Class Library and have it generate a file in the Silverlight Class Library? ...

How, WCF Ria Services can make a customised entity, known at client-side?

I constructed my Entity Model. One of my business objects,let's call it Store has a spatial data type. Very quickly I figured out that spatial fields aren't mapped via EF4. However I struggled my way out, by editing the xml declarations defining a query like the following: <EntitySet Name="Stores" EntityType="Eltrun.OnShelfAuditModel....

How to Add Custom Silverlight XAML Attributes !?

Is it possible to introduce 'custom' attributes into different UI Elements in XAML ? Also to read them later like we add attributes for server controls in ASP.NET ? I intend to read specific attributes and operate on them together. ...

How to hide the row header in the first row when no row is selected in a Silverlight DataGrid?

Hi, I have a datagrid which shows all the headers of the rows. I have noticed that after the datagrid is populated with some data, even there is no row selected (i.e. SelectedIndex = -1), the little blue rectangle row header still shows in the first row alnog with the first cell highlighted with a blue border... I have successfully got ...

DomainContext, Silverlight 3, code behind, Edit EntitySet

I'm trying to get my brain wraped around Silverlight RIA I'm to a point where I can create an object with a collection of objects which also has a collection of objects. Test object that holds test questions, that holds question answers. I have the associations set up and the the data makes it to to silverlight app. So in my loaded c...

SharpZipLib implementation in SL4

Does any one where we can get SharpZipLib implementation in Silverlight 4.0 ...

Exception on try??

Hello. I have this problem which I really cannot understand. I am getting info from a WebClient which misbehaves and returns an empty response. This is another issue which I hope to solve soon, but the real problem is the following. Here is my code: private void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { ...

Silverlight relativebinding ItemTemplate ListboxItem - Listbox

I created programatically a class (I called it ViewGrid) so that I use an instance of it as ItemTemplate for my ListBox control; of course, it's my data template for the listboxitem.... Also, in my ViewGrid class, I got a dependency property called IsChecked and I want to keep it in sync with the ListBoxItem's IsSelected property. I not...

Silverlight Dependancy Property Change Event Problem

I have a custom control that has a Dependancy Property...it has a few but let us say Dragable is my problem. The property is a boolean and I want to execute a piece of code each time it changes...a toggle. I have two options, both shown below [Category("Modal Options")] public bool Dragable { get { return (bool)GetValue...

What does Caliburn command not work when button content is changed?

Using Caliburn and Silverlight, I found that if I do: <Button PresentationFramework:Message.Attach="ContainerCommand InstructorProfileCommand()" Height="60" Content="Instructor" /> Then it works and the InstructorProfileCommand.Execute() method is called. However, if I do: ...

Creating a folder Inside Mydocument Using Silverlight

Hi All, I am developing a Silverlight4 Application which has elevated permissions and is running out of Browser. I am acessing MyDocuments using this piece of code if (Application.Current.HasElevatedPermissions) { string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); } Is it Possible to Create subfolder i...

How to embed Silverlight control in blog page?

How can I embed a demonstration applet written in Silverlight within a blog post? Is it possible to do so using any hosted blog engines, or only using a blog engine that I host myself? I assume that I will need to use the same tags and .js as in a regular (X)HTML page with a SL control. Are there any hosted blog engines that will perm...

Silverlight 3.0 image pixel shader issue

I am having issues with a pixel shader that turns an image into a grayscale one. The image source is being bound to a url outside of the project. Sometimes the effect is applied properly, other times the image is all white, and sometimes the green channel seems to be screwed up. Has anyone came across an issue like this? Thanks in adv...

How can I animate a transition when moving a child from one panel to another in Silverlight

I would like to animate a transition when moving content between two panels. I am getting a bit map image of a detail record and docking it as a thumbnail in the panel below. The docking area is in a footer grid and the content detail is in another grid that sits above the dock area (the dock and the main content area live in separate ro...

Custom Right Aligned StackPanel control layout in Silverlight

Hi all, I'm trying to create a custom layout container, with the same characteristics of StackPanel, with the exception that it lays out the items starting at the right edge of the screen. Needless to say it does not work correctly. I have identified a flaw inside ArrangeOverride() where the line Point elementOrigin = new Point(thi...