silverlight-3.0

Silverlight (3.0): How to add cell padding to a Grid?

How to add easily a cell padding for a Grid in Silverlight? To set Margins for each cell looks very noisy. <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefiniti...

Silverlight 3 DataGrid Grouping - Detecting Group Header Click or Header Expand/Collapse

I am using a PagedCollectionView in Silverlight 3 to group items in a datagrid. I want to detect when the group headers are clicked but after 6 hours still cannot find any way to do this. (So that when a collapsed header is clicked I can dynamically load the group's content) The datagrid is populated like so: PagedCollectionView coll...

Silverlight Xaml: Referencing Code-behind class

Assuming the following view model definition: public class MyObject { public string Name { get; set; } } public interface IMyViewModel { ICommand MyCommand { get; } IList<MyObject> MyList { get; } } And a UserControl with the following code behind: public class MyView : UserControl { public IMyViewModel Model { get; } } If my...

Silverlight 3 Datagrid: Get row/item on MouseOver

I have a bound DataGrid and various other controls(external to the datagrid) that show more details about the selectedrow in the datagrid. This is easy to do with databinding or handling the SelectionChanged event on the datagrid. However, how do I do this without requiring the user to select a row - eg on 'mouseover' can I change the s...

Carriage Return in Accordion Control Header - Silverlight 3.0

Hi Folks. I've got an Accordion control in my Silverlight app, and I'd like to be able to insert a carriage return in the title of one of the AccordionItems. I've tried inserting various symbols such as "" and ""... but nothing has worked. Appreciate any help. Thank you. ...

Making use of DataGrid SelectedItem property to control look of TemplateColumn

When creating a custom column design for a Silverlight DataGrid, is there any way to bind or make use of the DataGrid's SelectedItem property? I wish to display a static element, but have it only visible for the row that is selected. A simple example of what I'm after: <data:DataGrid> <data:DataGrid.Columns> ... ...

Silverlight 3 Toolkit - ListBoxDragDropTarget

I have two listboxes that I am dragging one item from to the other. Using the November 2009 build of the Silverlight 3 Toolkit's ListBoxDragDropTarget. I have an EventHandler on the Drop event of the second listbox. I am trying to get the index of the item that is being inserted so I can see what comes before it in the item collection. D...

How to bind value to its parent element value?

Silverlight provides element to element binding. How to apply it this is case: I have a xaml as below: <TextBlock Text="{Binding ABC}" > <ToolTipService.ToolTip> <local:MyControl Title="{Binding ...}" /> </ToolTipService.ToolTip> </TextBlock> I want to bind MyControl Title to the same data as its parent Textblock Text, but I ...

Possible to programmatically add User Control to Silverlight Grid Column?

I have a User Control that I need to programmatically add to a Silverlight Grid t a specified Row and Column index. The requirements are such that I will need to insert at arbitrary indices, such that pure databinding is perhaps not ideal. I would prefer not to have to create the grid from scratch in the code behind. Can this be done? ...

How can I obtain a sketch or hand-drawn look in Silverlight for various controls?

I am looking to create a Silverlight application that employs a control style similar to what one might see when using Balsamiq Mockups or SketchFlow. I am not sure how this look is best achieved in Silverlight. My initial thought is that clever use of a pixel shader effect on the desired control might just do the trick, however, my ...

Binding values not showing up in ListBox (silverlight 3)

I am loading values for a listbox from an xml file. What my problem is i can't get the bindings show the property values of the class that each item is assigned. When i set the Text this way: <TextBlock Text="{Binding }" Style="{StaticResource TitleBlock}"></TextBlock> The items show the toString value of the class, but if i use: <T...

Full Screen hides HTML controls in Silverlight Application

Hello All, I tried to implement a full screen functionality in my application . Its working fine .But I added some HTML controls in my aspx file ,when i click onr fullscreen button it shows a fullscreen but not show a HTML controls( only shows a SilverlightHost UI) . So how can I resolve it. (I have set windowless property true). Tha...

Whats the best way to resize all the elements in the silverlight canvas on resize?

Hi, I just started learning SL. I have tried to resize all the elements inside the canvas on its resize. But i cant find the right way. this is what i did Iterate throgh the all child elements in canvas calaculate the scale X & Y based on the new size And multiply the scale values with each elements size properties But in SL3.0 i...

Styling my listbox in xaml

Hi all xaml-geeks ;) I've just been fooling around with a ListBox control that I want to style a certain way. For now it looks just like I want it to with rounded corners and no padding. However, the rounded corners seems to cause a problem with the items in the ListBox. A screenshot so you can see what I mean: The thing is, that th...

Silverlight enabled WCF service port suddenly changed

I have a Silverlight web app solution with a Silverlight-enabled WCF service included. Everything has worked fine for the past 6 months or so. I can access data through the service with no problem. I came into work today, opened up the solution, ran it again, and suddenly, there's a mismatch between the WCF service port and the port t...

ItemContainerStyle in Custom Control Derived From ListBox

Please bear with me Silverlight Designer Gurus, this is compicated (to me). I'm creating a custom control which derives form the Silverlight 3.0 ListBox. In an effort not to show tons of code (initially), let me describe the setup. I have a class library containing a class for my control logic. Then I have a Themes/generic.xaml t...

Silverlight DataGrid Updating SelectedItem from code

When I update a datagrid SelectedItem from code (via a bound object in a ViewModel), how to I get the visual grid to highlight the newly selected item? Thanks, Mark UPDATE: This is still an issue for me. My SelectedItem property already implements change notification, but the datagrid is not VISUALLY displaying which row has been selec...

Programmatically triggering the HyperlinkButton navigation

I'm using the Silverlight 3 HyperlinkButton and I want to programmatically trigger the navigation that normally occurs when the button is clicked. There does not appear to be a public method that supports this. The OnClick method is protected so I could inherit from this control to gain access to this method from a custom control but is...

Building Enterprise level Line of Business application in silverlight Pros and Cons

Hello Experts, Currently i am working on developing one Warehouse solution from scratch, i am planning to build it in silverlight (as this solution will take around 8-10 months) and the programming will start from Feb 2010. I need to develop this application for one organization. Certain parts needs to be accessed by public which we ar...

Silverlight 3 Datagrid: Is it possible to apply different styles to each GroupRow level?

I can style GroupRows by creating a DataGrid.RowGroupHeaderStyles style, but this applies to all GroupRows. eg If I am grouping by 2 columns. I would like a different background color for column 1 GroupRows and column 2 GroupRows. Is this possible? Update Here's how I've accomplished this, but its a bit of a hack. Hopefully someone w...