Click here to Skip to main content
15,886,137 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Intercepting OrigionalSource Pin
#realJSOP15-May-10 4:07
mve#realJSOP15-May-10 4:07 
GeneralRe: Intercepting OrigionalSource Pin
Tristan Rhodes17-May-10 6:24
Tristan Rhodes17-May-10 6:24 
QuestionWPF Hyperlink Question Pin
Kevin Marois13-May-10 10:53
professionalKevin Marois13-May-10 10:53 
AnswerRe: WPF Hyperlink Question Pin
Venkatesh Mookkan13-May-10 19:53
Venkatesh Mookkan13-May-10 19:53 
GeneralRe: WPF Hyperlink Question Pin
Kevin Marois14-May-10 6:12
professionalKevin Marois14-May-10 6:12 
QuestionAdding hyperlink button column in silverlight grid from codebehind? Pin
mittalpa13-May-10 8:19
mittalpa13-May-10 8:19 
AnswerRe: Adding hyperlink button column in silverlight grid from codebehind? Pin
#realJSOP13-May-10 8:52
mve#realJSOP13-May-10 8:52 
QuestionSilverlight 4 Grid in Code. Access Row Background Pin
Paul Shearing13-May-10 6:45
Paul Shearing13-May-10 6:45 
I have written a Silverlight 4 application that reads a data stream and interprets it to dynamically create a web page. As part of the design I need to add grids to the page to act as placeholders to mimic the appearance and behaviour of tables. Here I am dynamically creating a grid with [gridCols] number of columns:

Grid LocalGrid = new Grid();
LocalGrid.Width = Double.NaN; // Auto Width and Height
LocalGrid.Height = Double.NaN;
for (int c=1; c <= gridCols; c++) // Add the columns
{ // Add a new column to the grid
LocalGrid.ColumnDefinitions.Add(new ColumnDefinition() { MinWidth = 10.0 });
}
LocalGrid.Background = new SolidColorBrush(Colors.LightGray);

So far, so good. I can now add rows as I need them with:

LocalGrid.RowDefinitions.Add(new RowDefinition() { MinHeight = 15 });

When the grid is fully loaded and formatted I can add it to a placeholder on the web page.

So, question, how can I get at and programmatically alter the properties of the added rows? For example how can I set the background colour of a row to do an alternating-row colour scheme. I have seen examples of using the LoadingRow event, but this grid is not data-bound.

Grid rows do not have properties such as BackColor exposed. I'm guessing that I need to use SetValue but, if so, what are the required parameters and how can I see a list of the dependency properties?

Any help greatly appreciated.

Kind regards

Paul
________________
Eschew Obfuscation
Anon

AnswerRe: Silverlight 4 Grid in Code. Access Row Background Pin
Abhinav S13-May-10 18:51
Abhinav S13-May-10 18:51 
QuestionWPF Rotate transform issue Pin
Shane555513-May-10 5:20
Shane555513-May-10 5:20 
AnswerRe: WPF Rotate transform issue Pin
Insincere Dave13-May-10 6:07
Insincere Dave13-May-10 6:07 
GeneralRe: WPF Rotate transform issue Pin
Shane555513-May-10 6:15
Shane555513-May-10 6:15 
QuestionWPF for Pipe networks Pin
Dimitris Nemtsov13-May-10 3:21
Dimitris Nemtsov13-May-10 3:21 
QuestionTexBlock Size [SOLVED!] Pin
#realJSOP13-May-10 2:51
mve#realJSOP13-May-10 2:51 
QuestionWPF cascaded combo Pin
bindum3112-May-10 20:22
bindum3112-May-10 20:22 
AnswerRe: WPF cascaded combo Pin
Venkatesh Mookkan12-May-10 22:41
Venkatesh Mookkan12-May-10 22:41 
GeneralRe: WPF cascaded combo Pin
bindum3112-May-10 23:30
bindum3112-May-10 23:30 
GeneralRe: WPF cascaded combo Pin
Venkatesh Mookkan13-May-10 0:19
Venkatesh Mookkan13-May-10 0:19 
GeneralRe: WPF cascaded combo Pin
bindum3113-May-10 1:57
bindum3113-May-10 1:57 
GeneralRe: WPF cascaded combo Pin
Venkatesh Mookkan13-May-10 19:50
Venkatesh Mookkan13-May-10 19:50 
Questionerror on installation of VS2010 Express Pin
arkiboys12-May-10 19:53
arkiboys12-May-10 19:53 
AnswerRe: error on installation of VS2010 Express Pin
Michel Godfroid12-May-10 20:50
Michel Godfroid12-May-10 20:50 
GeneralRe: error on installation of VS2010 Express Pin
arkiboys12-May-10 21:13
arkiboys12-May-10 21:13 
GeneralRe: error on installation of VS2010 Express Pin
Michel Godfroid12-May-10 21:16
Michel Godfroid12-May-10 21:16 
GeneralRe: error on installation of VS2010 Express Pin
arkiboys12-May-10 21:30
arkiboys12-May-10 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.