This is a migrated thread and some comments may be shown as answers.

[Solved] New issue with SelectionRegionBackgroundControl

3 Answers 182 Views
Grid for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Yuri
Top achievements
Rank 1
Yuri asked on 26 Feb 2015, 05:21 PM
Hello,

I've been using all the hacks described in this forum's relevant threads to set the background of the selected Grid row, along the following lines:
<Style TargetType="telerikGridPrimitives:DataGridCurrencyControl">
    <Setter Property="Background" Value="Transparent"/>
</Style>
<Style TargetType="telerikGridPrimitives:SelectionRegionBackgroundControl">
    <Setter Property="Background" Value="{StaticResource SelectionBrush}"/>
    <Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="telerikGridPrimitives:SelectionRegionBorderControl">
    <Setter Property="BorderBrush" Value="Transparent"/>
</Style>

It has been working with the previous versions, but now I've upgraded to the latest Telerik Controls for Universal Apps (v.2014.3.1203.45), and what I see is the SelectionBrush solid colour completely covering the row's content.

The only workaround I was able to find is to set SelectionRegionBackgroundControl's opacity to lower levels (say, 0.5) to see the row's content.
I suspect this is an indication of the fact that in this latest version SelectionRegionBackgroundControl is actually rendered on top of the other layers (instead of being the bottom most as it should).
Whether this is the case or now, please suggest a temporary workaround until this issue is fixed a future release.

3 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 27 Feb 2015, 09:08 AM
Hello Yuri,

Thank you for contacting us! We have tested the described scenario both with 2014.3.1203 as well as the latest version 2015.1.225. However we are unable to reproduce the described behavior. Would it be possible to elaborate more on the setup of the grid - xaml/c# that causes the problem.

Regards,
Tsvyatko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Yuri
Top achievements
Rank 1
answered on 27 Feb 2015, 06:34 PM
This happens with multiple grids defined on different pages in the app.
Some of those rather simplistic, some more complicated.
Here's an example:

                <telerikGrid:RadDataGrid x:Name="List" ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                                         AutoGenerateColumns="False" UserGroupMode="Disabled"
                                         Background="Transparent"
                                         Foreground="{StaticResource ListRowForegroundBrush}"
                                         RowBackground="{StaticResource ListRowBackgroundBrush}" 
                                         AlternateRowBackground="{StaticResource AlternateListRowBackgroundBrush}"
                                         AlternationStep="2" AlternationStartIndex="1" GroupHeaderDisplayMode="Frozen"
                                         GridLinesVisibility="None" BorderThickness="0" Margin="0,-6,0,0" Grid.Row="2" Grid.ColumnSpan="2">
                    <telerikGrid:RadDataGrid.Resources>
                        <Style TargetType="telerikGridPrimitives:DataGridCurrencyControl">
                            <Setter Property="Background" Value="Transparent"/>
                        </Style>
                        <Style TargetType="telerikGridPrimitives:SelectionRegionBackgroundControl">
                            <Setter Property="Background" Value="{StaticResource SelectionBrush}"/>
                            <Setter Property="BorderThickness" Value="0"/>
                            <Setter Property="Opacity" Value="0.5"/>
                        </Style>
                        <Style TargetType="telerikGridPrimitives:SelectionRegionBorderControl">
                            <Setter Property="BorderBrush" Value="Transparent"/>
                        </Style>
                        <gui:PatientListDataTemplateSelector x:Key="ListDataTemplateSelector"/>
                    </telerikGrid:RadDataGrid.Resources>
                    <telerikGrid:RadDataGrid.Columns>
                        <telerikGrid:DataGridTemplateColumn SizeMode="Stretch" HeaderStyle="{StaticResource EmptyHeaderStyle}"
                                                            CellContentTemplateSelector="{StaticResource ListDataTemplateSelector}"/>
                    </telerikGrid:RadDataGrid.Columns>
                </telerikGrid:RadDataGrid>

There are also GroupHeaderTemplate, GroupDescriptors and Commands, but I don't think these are relevant here.

0
Tsvyatko
Telerik team
answered on 04 Mar 2015, 05:47 PM
Hi Yuri,

Thank you for sharing this code snippet! We were able to reproduce this issue. Fortunately, this issue is resolved in our latest official release (2015.1.225). You can download it and give it a try. Please note that in Q1 2015 we have introduced some changes, so you might want to check this help article as well - http://docs.telerik.com/windows-universal/common/breakingchanges

Please excuse us for the inconvinience caused.

Regards,
Tsvyatko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid for XAML
Asked by
Yuri
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Yuri
Top achievements
Rank 1
Share this question
or