Click here to Skip to main content
15,889,843 members
Home / Discussions / WPF
   

WPF

 
QuestionIs there an existing Color-picker in WPF/Silverlight ? Pin
Loveisasea2-Nov-11 5:22
Loveisasea2-Nov-11 5:22 
AnswerRe: Is there an existing Color-picker in WPF/Silverlight ? Pin
Mark Salsbery2-Nov-11 5:25
Mark Salsbery2-Nov-11 5:25 
AnswerRe: Is there an existing Color-picker in WPF/Silverlight ? Pin
Pete O'Hanlon2-Nov-11 5:28
mvePete O'Hanlon2-Nov-11 5:28 
AnswerRe: Is there an existing Color-picker in WPF/Silverlight ? Pin
Abhinav S2-Nov-11 18:13
Abhinav S2-Nov-11 18:13 
QuestionItems collection must be empty before using ItemsSource. Pin
jhoga2-Nov-11 4:39
jhoga2-Nov-11 4:39 
AnswerRe: Items collection must be empty before using ItemsSource. Pin
Mark Salsbery2-Nov-11 5:23
Mark Salsbery2-Nov-11 5:23 
GeneralRe: Items collection must be empty before using ItemsSource. Pin
jhoga2-Nov-11 5:52
jhoga2-Nov-11 5:52 
GeneralRe: Items collection must be empty before using ItemsSource. Pin
Mark Salsbery2-Nov-11 7:06
Mark Salsbery2-Nov-11 7:06 
jhoga wrote:
I still can not get the background to show a color base on a value.


Maybe the resource needs to be at least one level up the tree from the datagrid.

Regardless, perhaps try using ItemContainerStyle instead, something like this

HTML
<DataGrid ...>
    <DataGrid.ItemContainerStyle>
        <Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource {x:Type DataGridRow}}" >
            <Style.Triggers>
                <DataTrigger Binding="{Binding Alert_Level}" Value="1">
                    <Setter Property="Background" Value="LightYellow" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </DataGrid.ItemContainerStyle>
    <DataGrid.Columns>
     ...
    </DataGrid.Columns>
<DataGrid>

Mark Salsbery
Java | [Coffee]

GeneralRe: Items collection must be empty before using ItemsSource. Pin
jhoga2-Nov-11 8:57
jhoga2-Nov-11 8:57 
QuestionHow to make listbox list items in horizontal Pin
Loveisasea1-Nov-11 19:47
Loveisasea1-Nov-11 19:47 
AnswerRe: How to make listbox list items in horizontal Pin
Abhinav S1-Nov-11 19:56
Abhinav S1-Nov-11 19:56 
GeneralRe: How to make listbox list items in horizontal Pin
Mycroft Holmes1-Nov-11 21:03
professionalMycroft Holmes1-Nov-11 21:03 
GeneralRe: How to make listbox list items in horizontal Pin
Abhinav S1-Nov-11 21:51
Abhinav S1-Nov-11 21:51 
GeneralRe: How to make listbox list items in horizontal Pin
Loveisasea1-Nov-11 22:14
Loveisasea1-Nov-11 22:14 
AnswerRe: How to make listbox list items in horizontal Pin
Mark Salsbery2-Nov-11 5:38
Mark Salsbery2-Nov-11 5:38 
GeneralRe: How to make listbox list items in horizontal Pin
SledgeHammer012-Nov-11 6:32
SledgeHammer012-Nov-11 6:32 
QuestionSivlerlight: the best alternative to a simple WPF-like DataTrigger? Pin
Member 103390731-Oct-11 4:51
Member 103390731-Oct-11 4:51 
AnswerRe: Sivlerlight: the best alternative to a simple WPF-like DataTrigger? Pin
Pete O'Hanlon31-Oct-11 7:59
mvePete O'Hanlon31-Oct-11 7:59 
GeneralRe: Sivlerlight: the best alternative to a simple WPF-like DataTrigger? Pin
Member 103390731-Oct-11 23:16
Member 103390731-Oct-11 23:16 
GeneralRe: Sivlerlight: the best alternative to a simple WPF-like DataTrigger? Pin
Pete O'Hanlon1-Nov-11 0:29
mvePete O'Hanlon1-Nov-11 0:29 
GeneralRe: Sivlerlight: the best alternative to a simple WPF-like DataTrigger? Pin
Member 10339071-Nov-11 2:11
Member 10339071-Nov-11 2:11 
GeneralRe: Sivlerlight: the best alternative to a simple WPF-like DataTrigger? Pin
Pete O'Hanlon1-Nov-11 2:43
mvePete O'Hanlon1-Nov-11 2:43 
QuestionValidation of a combobox in Silverlight 4 Pin
Phillip Donegan31-Oct-11 2:46
Phillip Donegan31-Oct-11 2:46 
AnswerRe: Validation of a combobox in Silverlight 4 Pin
Phillip Donegan1-Nov-11 22:54
Phillip Donegan1-Nov-11 22:54 
QuestionBlinking Pushpin in Bing Map Silverlight control Pin
Majid Shahabfar30-Oct-11 2:26
Majid Shahabfar30-Oct-11 2:26 

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.