Hi,
I have already asked about this feature about a half-year ago. Just in case, asking this one more time :)
Is that possible to draw an icon or bitmap on the row selector? New bitmap should not erase what is already have drawn there.
Thank you.
UPD: I mean I want to draw an image on row selector of any single row, not all of them at the same time.
So there aren't any plans to add a specific feature around this area, however it's always been possible.
In order to do this, you need to first ReStyle and ReTemplate the RowSelector. Then you're going to need to create a Custom ValueConveter.
The following help article can get you started on the ReStyling/ ReTemplating the RowSelector:
http://help.infragistics.com/NetAdvantage/Silverlight/2010.2/CLR4.0/?page=SL_DesignersGuide_Editing_Style_Properties_Using_Expression_Blend.html
In the ControlTemplate you're going to need to add a ContentControl, like so:
<ContentControl Grid.Row="1" Content="{Binding Cell.Row, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource rsvc}}"/>
So, as you see there is a converter specified, this is where you need to write a custom converter to pass in the content.
public class RowSelectorVC : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
The Value you'll receive will be of type Row, so you can then work with it and grab the Data from the row to determine what content you want to display, if you don't want anything to be display, then return null.
Hope this helps,
-SteveZ
Thank you. But is that possible to draw icons depending on some conditions? Just like you draw a pencil when edit a row.