0

I was trying to change the back color of a DevExpress TileView when the tileview has been checked. However, it didn't change the color even if the line has been executed. So what should I do to make it happen? Here's my current implementation.

private void tileViewWaves_ItemCustomize(object sender, TileViewItemCustomizeEventArgs e)
{
        // get wave model DTO for tile
        var wave = tileViewWaves.GetRow(e.RowHandle) as dtoReferenceWave;

        // display tile as checked if it is ready for all wave
        if (wave.frequency != 0 && wave.amplitude != 0)
        {
            e.Item.Checked = _presenter.WaveHasAllReference(wave) && _presenter.SufficientReference;
            e.Item.Appearance.BackColor = Color.Green;
            Console.WriteLine($"INFO: Waves have been completed populated and checked, should turn green now with {e}");
        }
}
RandomEli
  • 1,527
  • 5
  • 30
  • 53
  • I found a sample here: [TileView selected Background Color](https://www.devexpress.com/Support/Center/Question/Details/T227603) that might be helpful. I tried this, but it doesn't work for me. – RandomEli Jan 08 '16 at 21:30

2 Answers2

0

I figured out a way to do this, but it is a hack from devexpress.

So I set two colors during the Loading phase:

private void frmCalibration_Load(object sender, EventArgs e)
{


        // Set colors.
        tileViewWaves.Appearance.ItemNormal.BackColor = _controlWaveColor;
        tileViewWaves.Appearance.ItemFocused.BackColor = _selectedWavePointColor;
        tileViewWaves.Click += tileViewWaves_Click;


}

and if the condition that I've set is met, it will be highlighted by the default devexpress settings.

RandomEli
  • 1,527
  • 5
  • 30
  • 53
0

We use....

_tileItem.AppearanceItem.Normal.BackColor = BackColor;