开发者

How to increase the particular row height in the WPF DataGrid when mouse is over that row

I want to increase the particular row height to twice in the WPF DataGrid when mouse is over that row but the remaining rows height should not be changed. When the mmouse moves over on the another row only that row height should be double and the previuos row height should become normal.

Please let me know how to do this.

Previously i had the following solution. But here when the mouse over a particular row, the row height is doubled but the row is rendered. I don't want this concept, I want the remaning rows should be pushed down when the particular row height is increased.

<Style TargetType="{x:Type DataGridRow}">   
<Style.Triggers>   
    <Trigger Property="IsMouseOver" Value="True">   
        <Setter Property="RenderTransform">  
            <Setter.Value>  
                <ScaleTransform ScaleX="1" ScaleY="2" />  
            </Setter.Value>  
        </Setter>  
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>   
        <Setter Property="Panel.ZIndex" Value="99999"/>   
    </Tri开发者_如何学Gogger>   
</Style.Triggers>   


Assigning a LayoutTransform instead of RenderTransform will cause sibling elements to be rearranged when you scale the row. LayoutTransform is applied before measuring and arranging so the transformed size is used to determine how much space the element gets.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜