Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8451597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:17:02+00:00 2026-06-10T11:17:02+00:00

<DataGrid> <DataGrid.Columns> <DataGridTemplateColumn Header=Name > <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Label x:Name=lblName Content={Binding Name} Foreground=White /> </DataTemplate>

  • 0
<DataGrid>
 <DataGrid.Columns>

 <DataGridTemplateColumn Header="Name" >
        <DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <Label x:Name="lblName" Content="{Binding Name}" Foreground="White" />
        </DataTemplate>
    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Path=IsActice}" Header="Is Actice"  />
 </DataGrid.Columns>
</DataGrid>

I want to Change the Color of lblName when Datagrid Fills according to IsActive Value

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:17:03+00:00Added an answer on June 10, 2026 at 11:17 am

    I resolved using the following code

    <Style TargetType="{x:Type Label}" x:Key="DataGridLabel">
      <Style.Triggers>
        <MultiDataTrigger>
          <MultiDataTrigger.Conditions>
            <Condition Binding="{Binding Path=IsActive}" Value="False"/>
          </MultiDataTrigger.Conditions>
          <Setter Property="Label.Background" Value="Red"/>
        </MultiDataTrigger>
        <MultiDataTrigger>
          <MultiDataTrigger.Conditions>
            <Condition Binding="{Binding Path=IsActive}" Value="True"/>
          </MultiDataTrigger.Conditions>
          <Setter Property="Label.Background" Value="Green"/>
        </MultiDataTrigger>
      </Style.Triggers>
    </Style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the following DataGrid <DataGrid Grid.Row=1 Grid.Column=1 Name=Grid ItemsSource={Binding} AutoGenerateColumns=False > <DataGrid.Columns> <DataGridTextColumn
I have this datagrid <DataGrid Grid.Row=3 Name=DataGrid6S AutoGenerateColumns=False VerticalScrollBarVisibility=Auto> <DataGrid.Columns> <DataGridTextColumn Header=ID Width=50 Binding={Binding
I create DataGrid Columns with Binding (where i is a Int value): dataGrid.Columns.Add(new DataGridTextColumn
I have a following XAML: <DataGrid Name=nodeDataGrid ItemsSource={Binding NodeList} AutoGenerateColumns=False RowBackground=White AlternatingRowBackground=AliceBlue Grid.Column=1 HorizontalAlignment=Stretch
I have datagrid with a delete button XAML looks like: <sdk:DataGridTemplateColumn Header=Del/Tgl > <sdk:DataGridTemplateColumn.CellTemplate>
I have following DataGrid in wpf. <DataGrid AutoGenerateColumns=False Grid.Row=1 Name=adsGrid ItemsSource={Binding Path=Ads} CanUserAddRows=False CanUserDeleteRows=False
I want to show datagrid content (rows,columns) in XPS document.I have 20 columns. When
I have a DataGrid table with columns name , phone . In column name
I have a datagrid with master detail implementation as follows: <data:DataGrid x:Name=dgData Width=600 ItemsSource={Binding
i have a datagrid declared in the xaml as follows: <sdk:DataGrid x:Name=ProductsForProjectDataGrid AutoGenerateColumns=True ItemsSource={Binding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.