Click here to Skip to main content
15,907,000 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Binding xaml property to class property Pin
BRShroyer29-Jul-10 9:02
BRShroyer29-Jul-10 9:02 
QuestionSilverlight : Changing theme at run-time Pin
Prasoon Chaudhary28-Jul-10 23:24
Prasoon Chaudhary28-Jul-10 23:24 
QuestionAlternative to "DropDownWidth" Property for Combo Box in WPF. Pin
dashingsidds28-Jul-10 23:01
dashingsidds28-Jul-10 23:01 
QuestionHow to do UI Design that fix in all the screen size Pin
Joe Rozario28-Jul-10 20:56
Joe Rozario28-Jul-10 20:56 
AnswerRe: How to do UI Design that fix in all the screen size Pin
Pete O'Hanlon28-Jul-10 22:04
mvePete O'Hanlon28-Jul-10 22:04 
GeneralRe: How to do UI Design that fix in all the screen size Pin
Joe Rozario29-Jul-10 2:42
Joe Rozario29-Jul-10 2:42 
QuestionDataVisualization Library Binding Question [SOLVED] Pin
#realJSOP28-Jul-10 9:21
professional#realJSOP28-Jul-10 9:21 
QuestionHow To Create This Trigger Pin
Kevin Marois28-Jul-10 8:47
professionalKevin Marois28-Jul-10 8:47 
I have a collection of classes together that are formed together like tree. The whole collection is bound to a TreeView. One of the classes has a bool property called IsChanged:

public class ReportColumn
{
    public string ColumnName { get; set; }
    public object OriginalValue { get; set; }
    public object ChangedValue { get; set; }
    public bool IsChanged { get; set; }
}


In my XAML I created a DataTemplate for it:
<DataTemplate DataType="{x:Type local:ReportColumn}">
    <StackPanel Orientation="Horizontal">

        <!-- Column Name -->
        <TextBlock Margin="0,0,5,0" 
                    FontWeight="Bold">Name:</TextBlock>
        <TextBlock Text="{Binding Path=ColumnName}"></TextBlock>

        <!-- Original Value -->
        <TextBlock Margin="20,0,5,0" 
                    FontWeight="Bold">Original:</TextBlock>
        <TextBlock Text="{Binding Path=OriginalValue}"></TextBlock>

        <!-- Changed Value -->
        <TextBlock Margin="20,0,5,0" 
                    FontWeight="Bold">Change:</TextBlock>
        <TextBlock Text="{Binding Path=ChangedValue}"></TextBlock>

    </StackPanel>
</DataTemplate>


Then the whole thing is bound to the treeview. What I'd like is to make this node's foreground red when IsChanged is true. Can someone explain how to do this?
Everything makes sense in someone's mind

QuestionNeed help with this control alignment issue Pin
Michael Eber27-Jul-10 11:59
Michael Eber27-Jul-10 11:59 
AnswerRe:control alignment issue solved Pin
Michael Eber28-Jul-10 5:24
Michael Eber28-Jul-10 5:24 
QuestionBinding Question! Pin
Jammer27-Jul-10 6:10
Jammer27-Jul-10 6:10 
AnswerRe: Binding Question! Pin
Ravi Mori28-Jul-10 0:44
Ravi Mori28-Jul-10 0:44 
AnswerRe: Binding Question! Pin
Pete O'Hanlon28-Jul-10 2:17
mvePete O'Hanlon28-Jul-10 2:17 
QuestionHow to write small application that show 4 images in 3D ? Pin
Yanshof27-Jul-10 3:22
Yanshof27-Jul-10 3:22 
AnswerRe: How to write small application that show 4 images in 3D ? Pin
Abhinav S27-Jul-10 6:05
Abhinav S27-Jul-10 6:05 
QuestionHow to stretch Colum header in WPF datagrid? Pin
makumazan8427-Jul-10 0:06
makumazan8427-Jul-10 0:06 
AnswerRe: How to stretch Colum header in WPF datagrid? Pin
Pete O'Hanlon27-Jul-10 0:30
mvePete O'Hanlon27-Jul-10 0:30 
QuestionHow to bind the Stackpanel object into ListView Pin
DavJes26-Jul-10 2:00
DavJes26-Jul-10 2:00 
AnswerRe: How to bind the Stackpanel object into ListView Pin
Michael Eber27-Jul-10 17:38
Michael Eber27-Jul-10 17:38 
GeneralRe: How to bind the Stackpanel object into ListView Pin
DavJes4-Aug-10 21:41
DavJes4-Aug-10 21:41 
GeneralRe: How to bind the Stackpanel object into ListView Pin
Michael Eber5-Aug-10 7:08
Michael Eber5-Aug-10 7:08 
QuestionRemoving specific object from a container and add it to another Pin
sadas232341s24-Jul-10 3:48
sadas232341s24-Jul-10 3:48 
AnswerRe: Removing specific object from a container and add it to another Pin
Parwej Ahamad24-Jul-10 7:30
professionalParwej Ahamad24-Jul-10 7:30 
AnswerRe: Removing specific object from a container and add it to another Pin
Michael Eber27-Jul-10 12:10
Michael Eber27-Jul-10 12:10 
QuestionData binding to static resource: shown to work in VS but not when run Pin
Jonathan Davies24-Jul-10 2:36
Jonathan Davies24-Jul-10 2:36 

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.