• wpf datagrid排序图标样式


    <!--Datagrid排序右侧小三角图标样式-->
        <Style x:Key="DataGridSortHeaderStyle" TargetType="{x:Type DataGridColumnHeader}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
                        <Grid Background="Transparent">
                            <StackPanel Orientation="Horizontal" >
                                <ContentPresenter Margin="6,3,6,3" VerticalAlignment="Center" />
                                <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                    <Path x:Name="SortUPArrow" Data="M5.92186554,1.10623864 L8.3598156,4.03177872 C8.7840925,4.540911 8.71530362,5.29758864 8.20617134,5.72186554 C7.99051334,5.90158054 7.71867387,6 7.43795006,6 L2.56204994,6 C1.89930824,6 1.36204994,5.4627417 1.36204994,4.8 C1.36204994,4.51927619 1.4604694,4.24743672 1.6401844,4.03177872 L4.07813446,1.10623864 C4.50241136,0.597106366 5.259089,0.528317489 5.76822128,0.952594387 C5.82397696,0.999057452 5.87540247,1.05048296 5.92186554,1.10623864 Z" Stretch="Fill" 
                                         Grid.Column="1" Width="8" Height="6" Fill="#BEC3D6"  
                                        VerticalAlignment="Center" RenderTransformOrigin="0.5,0.4" />
                                    <Path x:Name="SortDownArrow" Data="M4.07813446,12.8937614 L1.6401844,9.96822128 C1.2159075,9.459089 1.28469638,8.70241136 1.79382866,8.27813446 C2.00948666,8.09841946 2.28132613,8 2.56204994,8 L7.43795006,8 C8.10069176,8 8.63795006,8.5372583 8.63795006,9.2 C8.63795006,9.48072381 8.5395306,9.75256328 8.3598156,9.96822128 L5.92186554,12.8937614 C5.49758864,13.4028936 4.740911,13.4716825 4.23177872,13.0474056 C4.17602304,13.0009425 4.12459753,12.949517 4.07813446,12.8937614 Z" Stretch="Fill" 
                                         Grid.Column="1" Width="8" Height="6" Fill="#BEC3D6" Margin="0 2 0 0"
                                        VerticalAlignment="Center" RenderTransformOrigin="0.5,0.4" />
                                </StackPanel>
                            </StackPanel>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <!--<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}"/>-->
                            </Trigger>
                            <Trigger Property="SortDirection" Value="Ascending">
                                <Setter TargetName="SortUPArrow" Property="Fill" Value="#4B71EE" />
                                <Setter TargetName="SortDownArrow" Property="Fill" Value="#BEC3D6" />
                            </Trigger>
                            <Trigger Property="SortDirection" Value="Descending">
                                <Setter TargetName="SortUPArrow" Property="Fill" Value="#BEC3D6" />
                                <Setter TargetName="SortDownArrow" Property="Fill" Value="#4B71EE" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    
    留待后查,同时方便他人
    联系我:renhanlinbsl@163.com
  • 相关阅读:
    Revit 开发将自己的窗口设置为Revit窗口
    Revit api 创建楼梯图元
    Revit api 创建族并加载到当前项目
    tomcat源码阅读之BackupManager
    tomcat源码阅读之Tribes.RpcChannel
    tomcat源码阅读之集群
    Java单播、广播、多播(组播)---转
    tomcat源码阅读之默认连接器
    centos8运行脚本找不到python项目解决
    python虚拟环境冻结与安装
  • 原文地址:https://www.cnblogs.com/ives/p/14662017.html
Copyright © 2020-2023  润新知