This question is locked. New answers and comments are not allowed.
Hi,
we face an issue that it's no use to set the GridViewCell.BorderBrushProperty in Styleselector.
but the "BackgroundProperty" is working, why, Any workaround?
The Cell Background is working but there is no response for BorderBrushProperty
Update:
We let the style in the resource hasving the border in control template and another setter : Backgroupd is yellow
Cs file
A strange thing is after style change, the border become red ,the orginal text value disapper and background is not working to yellow background
Hey, dear telerikers plz help or glace at this issue? thank you in advance.
we face an issue that it's no use to set the GridViewCell.BorderBrushProperty in Styleselector.
but the "BackgroundProperty" is working, why, Any workaround?
style = new Style(typeof(GridViewCell)); Setter setterBackground = new Setter(); setterBackground.Property = GridViewCell.BackgroundProperty; setterBackground.Value = new SolidColorBrush(Colors.Black); style.Setters.Add(setterBackground); Setter setterBorder = new Setter(); setterBorder.Property = GridViewCell.BorderBrushProperty; setterBorder.Value = new SolidColorBrush(Colors.Red); style.Setters.Add(setterBorder); Setter setterBorderThickness = new Setter(); setterBorderThickness.Property = GridViewCell.BorderThicknessProperty; setterBorderThickness.Value = "2,2,2,2"; style.Setters.Add(setterBorderThickness);The Cell Background is working but there is no response for BorderBrushProperty
Update:
We let the style in the resource hasving the border in control template and another setter : Backgroupd is yellow
<Style x:Key="CellLv1Validation" TargetType="telerik:GridViewCell"> <Setter Property="Background" Value="Yellow"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="telerik:GridViewCell"> <Border x:Name="PART_CellBorder" BorderBrush="Red" BorderThickness="2"/> </ControlTemplate> </Setter.Value> </Setter> </Style>Cs file
Uri uri = new Uri("/Soluntion.X;component/Assets/ApplicationStyles.xaml", UriKind.RelativeOrAbsolute);ResourceDictionary converterDictionary = new ResourceDictionary(){ Source = uri};style = converterDictionary["CellLv1Validation"] as Style;A strange thing is after style change, the border become red ,the orginal text value disapper and background is not working to yellow background
Hey, dear telerikers plz help or glace at this issue? thank you in advance.