This question is locked. New answers and comments are not allowed.
I keep struggling with the row styl of a gridview.
I have my own style set, but want a selected row and hover style too. The hover just needs to set the opacity to 1 and the selected needs to set the text style.
I dont have Blend here so I need to do it just in Xaml.
I used code from the example and changed it to this:
Where and how to set those styles.
I have my own style set, but want a selected row and hover style too. The hover just needs to set the opacity to 1 and the selected needs to set the text style.
I dont have Blend here so I need to do it just in Xaml.
I used code from the example and changed it to this:
<ControlTemplate x:Key="MyCustomRowTemplate" TargetType="telerik:GridViewRow"> <Border x:Name="rowsContainer" BorderThickness="1" BorderBrush="#FFC7C7C7" CornerRadius="2" Margin="2"> <Grid Width="Auto" HorizontalAlignment="Stretch" Background="#FFD4D4D4" Opacity="0.9"> <Grid.RowDefinitions> <RowDefinition Height="20"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="20" /> <ColumnDefinition Width="20" /> <ColumnDefinition Width="20" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBlock Text="{Binding Number}" Margin="5,0,0,0" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"/> <TextBlock Text="{Binding Folder1}" Margin="5,0,0,0" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left"/> <TextBlock Text="{Binding Revision}" Margin="5,0,0,0" Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Left"/> <TextBlock Text="{Binding Size}" Margin="5,0,0,0" Grid.Row="0" Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center"/> <TextBlock Text="{Binding Title}" Margin="5,0,0,0" Grid.Row="0" Grid.Column="4" HorizontalAlignment="Left" VerticalAlignment="Center"/> <Border Grid.Column="3" Grid.Row="0" Grid.RowSpan="6" Width="1" VerticalAlignment="Stretch" HorizontalAlignment="Left" Margin="0,10" /> </Grid> </Border></ControlTemplate><Style x:Key="rowStyle" TargetType="telerik:GridViewRow"> <Setter Property="Template" Value="{StaticResource MyCustomRowTemplate}" /></Style>Where and how to set those styles.