Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2940
Query in xamdatagrid style
posted

Hi... i am using xamdatagrid in my project and i have define my own style.I have added style in usercontrol.resources instead of xamdatagrid.resources. Some borber lines are coming and its not nice... So, plz help me to solve this proble.i am sending an attached file and in that header border line should eliminate and when i make filter on fields filter icon should change color to red.

Parents
  • 2940
    posted

    This is the style i am adding for xamdatagrid....

    <Grid.Resources>
    <Style TargetType="{x:Type igDP:DataRecordCellArea}">
    <Setter Property="BackgroundSelected" Value="#44F78A09"/>
    <Setter Property="BackgroundActive" Value="#44F78A09"/>
    <Setter Property="BackgroundHover" Value="#44F78A09"/>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type igDP:DataRecordCellArea}">
    <ControlTemplate.Resources>
    <Storyboard x:Key="timelineIsActive">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Active"
    Storyboard.TargetProperty="(UIElement.Opacity)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="1"/>
    </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="timelineIsActive_off">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Active"
    Storyboard.TargetProperty="(UIElement.Opacity)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="0"/>
    </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="timelineIsSelected">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Selected"
    Storyboard.TargetProperty="(UIElement.Opacity)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="1"/>
    </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="timelineIsSelected_off">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Selected"
    Storyboard.TargetProperty="(UIElement.Opacity)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="0"/>
    </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="timelineHover">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Hover"
    Storyboard.TargetProperty="(UIElement.Opacity)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="1"/>
    </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="timelineHover_off">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Hover"
    Storyboard.TargetProperty="(UIElement.Opacity)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.0000000" Value="0"/>
    </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    </ControlTemplate.Resources>
    <Controls:CardPanel>

    <!-- Background -->
    <Border x:Name="Background" Background="{TemplateBinding Background}"
    BorderBrush="{TemplateBinding BorderBrush}"
    BorderThickness="0"
    CornerRadius="{TemplateBinding CornerRadius}"/>

    <!-- Background Alternate -->
    <Border x:Name="Alternate" Visibility="Collapsed"
    Background="{TemplateBinding BackgroundAlternate}"
    BorderBrush="{TemplateBinding BorderAlternateBrush}"
    BorderThickness="0"
    CornerRadius="{TemplateBinding CornerRadius}"
    Opacity="1"/>

    <!-- Background Selected -->
    <Border x:Name="Selected"
    Visibility="Visible"
    Background="{TemplateBinding BackgroundSelected}"
    BorderBrush="Transparent"
    BorderThickness="0"
    CornerRadius="{TemplateBinding CornerRadius}"
    Opacity="0"/>

    <!-- Background Hover -->
    <Border x:Name="Hover"
    Visibility="Visible"
    Background="#FF444444"
    CornerRadius="{TemplateBinding CornerRadius}"
    BorderBrush="Transparent"
    BorderThickness="0"
    Opacity="0"/>

    <!-- Background Active -->
    <Border x:Name="Active"
    Visibility="Collapsed"
    Background="{TemplateBinding BackgroundActive}"
    BorderBrush="Transparent"
    BorderThickness="0"
    CornerRadius="{TemplateBinding CornerRadius}"/>

    <ContentPresenter x:Name="CellContent" Style="{TemplateBinding ForegroundStyle}" Content="{TemplateBinding Content}"/>
    </Controls:CardPanel>
    <ControlTemplate.Triggers>

    <MultiTrigger>
    <MultiTrigger.Conditions>
    <Condition Property="IsAlternate" Value="True"/>
    <Condition Property="IsFilterRecord" Value="False"/>
    <Condition Property="IsAddRecord" Value="False"/>
    </MultiTrigger.Conditions>
    <Setter TargetName="Alternate" Property="Visibility" Value="Visible"/>
    <Setter TargetName="CellContent" Property="Style"
    Value="{Binding Path=ForegroundAlternateStyle, RelativeSource={RelativeSource TemplatedParent}}"/>
    </MultiTrigger>

    <MultiTrigger>
    <MultiTrigger.Conditions>
    <Condition Property="IsActive" Value="True"/>
    <Condition Property="IsFilterRecord" Value="False"/>
    </MultiTrigger.Conditions>
    <Setter TargetName="CellContent" Property="Style" Value="{Binding Path=ForegroundActiveStyle, RelativeSource={RelativeSource TemplatedParent}}"/>
    <Setter Property="Visibility" TargetName="Active" Value="Visible"/>
    </MultiTrigger>

    <EventTrigger RoutedEvent="igDP:DataRecordCellArea.HoverBegin">
    <EventTrigger.Actions>
    <BeginStoryboard Storyboard="{StaticResource timelineHover}"/>
    </EventTrigger.Actions>
    </EventTrigger>

    <EventTrigger RoutedEvent="igDP:DataRecordCellArea.HoverEnd">
    <EventTrigger.Actions>
    <BeginStoryboard Storyboard="{StaticResource timelineHover_off}"/>
    </EventTrigger.Actions>
    </EventTrigger>

    <EventTrigger RoutedEvent="igDP:DataRecordCellArea.Selected">
    <EventTrigger.Actions>
    <BeginStoryboard Storyboard="{StaticResource timelineIsSelected}"/>
    </EventTrigger.Actions>
    </EventTrigger>

    <EventTrigger RoutedEvent="igDP:DataRecordCellArea.Deselected">
    <EventTrigger.Actions>
    <BeginStoryboard Storyboard="{StaticResource timelineIsSelected_off}"/>
    </EventTrigger.Actions>
    </EventTrigger>

    <Trigger Property="IsFilterRecord" Value="True">
    <Setter Property="Visibility" TargetName="Hover" Value="Collapsed"/>
    <Setter Property="Visibility" TargetName="Selected" Value="Collapsed"/>
    </Trigger>

    </ControlTemplate.Triggers>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>

    <Style TargetType="{x:Type igDP:CellValuePresenter}">
    <Setter Property="BackgroundSelected" Value="#FFF78A09"/>
    <Setter Property="BorderThickness" Value="0" />
    <Style.Triggers>
    <Trigger Property="IsSelected" Value="True">
    <Setter Property="BorderThickness" Value="0" />
    <Setter Property="BorderSelectedBrush" Value="Transparent" />
    <Setter Property="BorderActiveBrush" Value="Transparent" />
    <Setter Property="BorderPrimaryBrush" Value="Transparent" />
    <Setter Property="BorderFieldSelectedBrush" Value="Transparent" />
    </Trigger>
    </Style.Triggers>
    </Style>

    <!-- <Style TargetType="{x:Type Controls:ExpanderBar}">
    <Setter Property="Background" Value="#FF444444"/>
    <Style.Triggers>
    <Trigger Property="IsPressed" Value="True">
    <Setter Property="Background" Value="#FF444444" />
    </Trigger>
    </Style.Triggers>
    </Style>-->

    <Style TargetType="{x:Type igDP:DataRecordPresenter}">
    <Setter Property="BorderBrush" Value="#FF333333"/>
    <Setter Property="HeaderAreaBackground" Value="#FF333333" />
    <Setter Property="BorderThickness" Value="1"/>
    </Style>

    <Style TargetType="{x:Type igDP:LabelPresenter}">
    <Setter Property="Background" Value="#FF4A4A4A" />
    <Setter Property="Foreground" Value="#FFAFAFAF" />
    <Setter Property="Margin" Value="0,0,0,0" />
    <Setter Property="FontSize" Value="16" />
    <Style.Triggers>
    <Trigger Property="IsPressed" Value="True">
    <Setter Property="LabelHighlight" Value="#FF4A4A4A" />
    </Trigger>
    <Trigger Property="IsMouseOver" Value="True">
    <Setter Property="LabelHighlight" Value="#FF4A4A4A" />
    </Trigger>
    </Style.Triggers>
    </Style>


    <Style TargetType="{x:Type igDP:FilterCellValuePresenter}">
    <Style.Triggers>
    <Trigger Property="HasActiveFilters" Value="True">
    <Setter Property="Background" Value="#FFA3A3A3" />
    </Trigger>
    </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type igDP:FilterButton}">
    <Style.Triggers>
    <Trigger Property="HasActiveFilters" Value="True">
    <Setter Property="Background" Value="#FFA3A3A3" />
    </Trigger>
    </Style.Triggers>
    </Style>

    </Grid.Resources>

Reply Children
No Data