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 863327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:17:28+00:00 2026-05-15T09:17:28+00:00

I created a converter, and assigned it to a style. than i assigned that

  • 0

I created a converter, and assigned it to a style.

than i assigned that style, to the columns i want affected.

as rows are added, and while stepping through debugger, i noticed that the converter convert method gets called 1 time per column (each time it is used).

is there a way to optimize it better, so that it gets called only once and all columns using it get the same value?

 <Style x:Key="ConditionalColorStyle" TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource CellStyle}">
        <Setter Property="Foreground">
            <Setter.Value>
                <Binding>
                    <Binding.Converter>
                        <local:ConditionalColorConverter />
                    </Binding.Converter>
                </Binding>
            </Setter.Value>
        </Setter>
    </Style>
  • 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-05-15T09:17:28+00:00Added an answer on May 15, 2026 at 9:17 am

    i realized that the properties i am setting to each of the cells, can also be set to the row. so i assigned the converter to the row.

    The cells that do have these styles set, will NOT be affected by the converter, as cell style takes precedence over row style.

    so there is some trade off in cell level flexibility vs Convert executed for each column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a converter class that uses the IValueConverter interface and InConverter. It
I created a simple Converter to concatenate the text of four TextBoxes in my
I decided to create a currency converter in Java, and have it so that
I 'm new to the asp.net. I have created one web page in that
Hi i have created a custom converter in jsf for combo box using h:selectOneMenu,
A have created a pdf file from an .aspx page using the wkhtmltopdf converter.
Background: I've created a website that displays currency rates from various countries. I use
I've created a WPF converter class: public class DoubleConverter : IValueConverter { public object
I've created a program that will allow users to log in and enter the
I have a converter that takes a decimal value and converts it to a

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.