c# - silverlight datagrid - binding each row's style -


I have found a silver light (v2) Datagrid where some items are section headings and such as the color of a different background color. Should appear with

I'm trying to do this with the following xaml:

   & Lt; / Style & gt; & Lt; / DG: DataGrid.RowStyle & gt;  

I expect this to bind the background property of the datagrid line view model for the background property of each row, instead I get a pretty unknown xaml parsing error: < / P>

  {System.Windows.Markup.XamlParseException: AG_E_RUNTIME_MANAGED_UNKNOWN_ERROR [Line: 16 Position: 57] On the system. On Windows.Application.LoadComponent (Object Component, URI ResolubleCaster) Etana.Survey.Silverlight.UserInterface.Views.MaximumProbableLossPage.InitializeComponent () If I do not explicitly try to specify "red" and do not bind the style I try, so it works, so I wonder if the light of silver will allow me to tie a style like this or if there is some other move in it.  

(xaml is based on a wpf implementation of this which works fine)

Any input will be greatly appreciated

Change your binding on TemplateBinding. E.g.

  & lt; Dg: DataGrid.RowStyle & gt; & Lt; Style TargetType = "dg: DataGridRow" & gt; & Lt; Setter Property = "Background" value = "{background background, mode = acute}" /> & Lt; / Style & gt; & Lt; / DG: DataGrid.RowStyle & gt;  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -