Click here to Skip to main content
15,920,005 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Get RadioButtons from RadioButtonGroups and vice versa Pin
SledgeHammer0116-Nov-11 6:42
SledgeHammer0116-Nov-11 6:42 
GeneralRe: Get RadioButtons from RadioButtonGroups and vice versa Pin
Pete O'Hanlon16-Nov-11 7:23
mvePete O'Hanlon16-Nov-11 7:23 
GeneralRe: Get RadioButtons from RadioButtonGroups and vice versa Pin
Defender-NF17-Nov-11 20:54
Defender-NF17-Nov-11 20:54 
QuestionMAF Pin
columbos1492714-Nov-11 21:16
columbos1492714-Nov-11 21:16 
QuestionDatagrid Row background binding issue Pin
eli1502197914-Nov-11 20:53
eli1502197914-Nov-11 20:53 
AnswerRe: Datagrid Row background binding issue Pin
Abhinav S14-Nov-11 21:40
Abhinav S14-Nov-11 21:40 
GeneralRe: Datagrid Row background binding issue Pin
eli1502197914-Nov-11 21:49
eli1502197914-Nov-11 21:49 
AnswerRe: Datagrid Row background binding issue Pin
Wayne Gaylard15-Nov-11 1:03
professionalWayne Gaylard15-Nov-11 1:03 
You will need to create a RowStyle for your DataGrid and bind the Background property to the ColourProperty on your class. Something like this:-

XML
<DataGrid ItemsSource="{Binding Path=PostCollection}" AutoGenerateColumns="False">
            <DataGrid.RowStyle>
                <Style TargetType="DataGridRow">
                    <Setter Property="Background" Value="{Binding Path=RowColour}"/>
                </Style>
            </DataGrid.RowStyle>

            <DataGrid.Columns>
                <DataGridTextColumn Header="UserName" Binding="{Binding UserName}"/>
                <DataGridTextColumn Header="Status" Binding="{Binding Status}"/>
            </DataGrid.Columns>

        </DataGrid>


This obviously assumes the colour property of your user class is called RowColour and that it returns a Brush type. If not you will need to provide a converter if your property returns a Color or string type.

Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman

GeneralRe: Datagrid Row background binding issue Pin
eli1502197915-Nov-11 1:54
eli1502197915-Nov-11 1:54 
GeneralRe: Datagrid Row background binding issue Pin
Wayne Gaylard15-Nov-11 2:01
professionalWayne Gaylard15-Nov-11 2:01 
Questionshow SSRS reports using .xaml - Silverlight 4 Pin
arkiboys13-Nov-11 23:49
arkiboys13-Nov-11 23:49 
AnswerRe: show SSRS reports using .xaml - Silverlight 4 Pin
thatraja14-Nov-11 1:41
professionalthatraja14-Nov-11 1:41 
GeneralRe: show SSRS reports using .xaml - Silverlight 4 Pin
arkiboys14-Nov-11 1:50
arkiboys14-Nov-11 1:50 
GeneralRe: show SSRS reports using .xaml - Silverlight 4 Pin
Mycroft Holmes14-Nov-11 13:05
professionalMycroft Holmes14-Nov-11 13:05 
QuestionGrid Columns are over writing one another Pin
indian14311-Nov-11 8:28
indian14311-Nov-11 8:28 
QuestionRe: Grid Columns are over writing one another Pin
AspDotNetDev11-Nov-11 8:41
protectorAspDotNetDev11-Nov-11 8:41 
AnswerRe: Grid Columns are over writing one another Pin
indian14311-Nov-11 14:33
indian14311-Nov-11 14:33 
Questionhide all the controls in a column Pin
saurabh001 m9-Nov-11 19:02
saurabh001 m9-Nov-11 19:02 
AnswerRe: hide all the controls in a column Pin
Wayne Gaylard9-Nov-11 19:15
professionalWayne Gaylard9-Nov-11 19:15 
GeneralRe: hide all the controls in a column Pin
saurabh001 m9-Nov-11 19:26
saurabh001 m9-Nov-11 19:26 
GeneralRe: hide all the controls in a column Pin
Wayne Gaylard9-Nov-11 19:30
professionalWayne Gaylard9-Nov-11 19:30 
GeneralRe: hide all the controls in a column Pin
saurabh001 m9-Nov-11 19:41
saurabh001 m9-Nov-11 19:41 
GeneralRe: hide all the controls in a column Pin
Wayne Gaylard9-Nov-11 20:03
professionalWayne Gaylard9-Nov-11 20:03 
GeneralRe: hide all the controls in a column Pin
SledgeHammer0110-Nov-11 6:27
SledgeHammer0110-Nov-11 6:27 
Question1 Storyboard and Multi Button Action Pin
delibey9-Nov-11 14:17
delibey9-Nov-11 14:17 

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.