zoukankan      html  css  js  c++  java
  • gridcontrol datatemplate trigger


                            <TextBlock Name="textBlock" HorizontalAlignment="Left" Text="{Binding Value}"></TextBlock> 绑定的cell里面的值
                            <DataTemplate.Triggers>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding Path=Column.FieldName}" Value="test"/> //去该列的列头名称
                                        <Condition Binding="{Binding Path=Value,Converter={StaticResource summaryColorConvert}}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <MultiDataTrigger.Setters>
                                        <Setter Property="Foreground" Value="Red" TargetName="textBlock"/>
                                    </MultiDataTrigger.Setters>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding Path=Column.FieldName}" Value="test1"/>
                                        <Condition Binding="{Binding Path=Value,Converter={StaticResource summaryColorConvert}}" Value="False"/>
                                    </MultiDataTrigger.Conditions>
                                    <MultiDataTrigger.Setters>
                                        <Setter Property="Foreground" Value="Green" TargetName="textBlock"/>
                                    </MultiDataTrigger.Setters>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding Path=Column.FieldName}" Value="test2"/>
                                        <Condition Binding="{Binding Path=Value,Converter={StaticResource summaryColorConvert}}" Value="True"/>
                                    </MultiDataTrigger.Conditions>
                                    <MultiDataTrigger.Setters>
                                        <Setter Property="Foreground" Value="Red" TargetName="textBlock"/>
                                    </MultiDataTrigger.Setters>
                                </MultiDataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding Path=Column.FieldName}" Value="test4"/>
                                        <Condition Binding="{Binding Path=Value,Converter={StaticResource summaryColorConvert}}" Value="False"/>
                                    </MultiDataTrigger.Conditions>
                                    <MultiDataTrigger.Setters>
                                        <Setter Property="Foreground" Value="Green" TargetName="textBlock"/>
                                    </MultiDataTrigger.Setters>
                                </MultiDataTrigger>
                            </DataTemplate.Triggers>


                                <DataTemplate.Triggers>
                                    <DataTrigger Binding="{Binding Value}" Value="nouse">
                                        <Setter Property="Visibility" Value="Hidden" TargetName="dropDownButton"/>
                                    </DataTrigger>
                                </DataTemplate.Triggers>

                               当该列的值cell值为nouse时 隐藏该列的dropDownButton

  • 相关阅读:
    hdu 1551 恶心的卡精度题
    ubuntu下升级firefox
    清理windows垃圾
    hdu 1575 矩阵快速幂
    右键菜单中添加用记事本打开(转)
    hdu 1525 博弈
    PHP字符串函数(转)
    笔试注意事项
    .NET 2.0面向对象编程揭秘 继承
    李开复:21世纪7种人才最抢手
  • 原文地址:https://www.cnblogs.com/tianmochou/p/6178987.html
Copyright © 2011-2022 走看看