Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to remove the mouseover highlight and selected row highlight in a Silverlight datagrid
    text
    copied!<p>I've got a datagrid with one button in each row (xaml shown below). I'm trying to get rid of the blue highlighting functionality where it highlights the selected row, and the row with the mouse over it. I'm trying to seit it up so you just click on the button without getting the row selection and mouseover highlight functionality. I tried setting IsHitTestVisible to false, but then the button is not clickable. How can I do this?</p> <pre><code>&lt;data:DataGrid x:Name="grdClinics" HorizontalAlignment="Left" VerticalAlignment="Bottom" AutoGenerateColumns="False" HeadersVisibility="None" RowHeight="55" Background="Transparent" AlternatingRowBackground="Transparent" RowBackground="Transparent" BorderBrush="Transparent" Foreground="Transparent" GridLinesVisibility="None" SelectionMode="Single"&gt; &lt;data:DataGrid.Columns&gt; &lt;data:DataGridTemplateColumn Header="Clinic"&gt; &lt;data:DataGridTemplateColumn.CellTemplate&gt; &lt;DataTemplate&gt; &lt;Button x:Name="btnClinic" Height="46" Width="580" Content="{Binding Path=Description}" Style="{StaticResource ShinyButton}" Click="btnClinic_OnClick" FontSize="24" FontFamily="Tahoma" FontWeight="Bold"&gt; &lt;Button.Background&gt; &lt;LinearGradientBrush EndPoint="0.528,1.144" StartPoint="1.066,1.221"&gt; &lt;GradientStop Color="#FF000000"/&gt; &lt;GradientStop Color="#FFEDC88F" Offset="1"/&gt; &lt;/LinearGradientBrush&gt; &lt;/Button.Background&gt; &lt;/Button&gt; &lt;/DataTemplate&gt; &lt;/data:DataGridTemplateColumn.CellTemplate&gt; &lt;/data:DataGridTemplateColumn&gt; &lt;/data:DataGrid.Columns&gt; &lt;/data:DataGrid&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload