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
520
XamDataCarousel Transparent CellValuePresenter Background Color
posted

Hi,

I am an beginner in WPF and I want to set the background of the CellValuePresenter to transparent so that I ca see the background and not the rectangles.

 

I use the texteditor control to wrap the text. The xaml code is the following:

<

igDP:XamDataCarousel x:Name="XamDataCarousel1" Background="Transparent" GroupByAreaLocation="None" Margin="20" FontWeight="Bold" FontSize="15" CellContainerGenerationMode

="Recycle">

 

 

 

 

<igDP:XamDataCarousel.Resources

>

 

 

 

 

<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key

="WrapField">

 

 

 

 

 

<Setter Property

="Template">

 

 

 

 

<Setter.Value

>

 

 

 

 

<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter

}">

 

 

 

 

<igEditors:XamTextEditor Margin="{TemplateBinding Padding}"

 

 

Width="{TemplateBinding Width}"

 

 

Height="{TemplateBinding Height

}"

 

 

 

VerticalScrollBarVisibility

="Auto"

 

 

 

Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent

}}"

 

 

 

TextAlignment

="Center"

 

 

 

VerticalContentAlignment

="Center"

 

 

 

HorizontalContentAlignment

="Center"

 

 

 

TextWrapping

="Wrap"

 

 

 

Foreground

="#204F8A"

 

 

 

IsReadOnly

="True"

 

 

 

HorizontalAlignment="Stretch"

 

 

VerticalAlignment="Stretch" BorderThickness="0" Background

="Transparent">

 

 

 

 

<!--<igEditors:XamTextEditor.Background>

<ImageBrush ImageSource="Ressourcen\Box2.png" Stretch="Fill" />

</igEditors:XamTextEditor.Background>-->

 

 

 

 

</igEditors:XamTextEditor

>

 

 

 

 

</ControlTemplate

>

 

 

 

 

</Setter.Value

>

 

 

 

 

</Setter

>

 

 

 

 

<Setter Property="Background" Value

="Transparent"/>

 

 

 

 

</Style

>

 

 

 

 

 

</igDP:XamDataCarousel.Resources

>

 

 

 

 

<igDP:XamDataCarousel.FieldLayouts

>

 

 

 

 

<igDP:FieldLayout

>

 

 

 

 

<igDP:Field x:Uid="Name" Name

="Name">

 

 

 

 

<igDP:Field.Settings

>

 

 

 

 

<igDP:FieldSettings CellMinWidth="100" CellWidth

="360"

 

 

 

CellValuePresenterStyle="{StaticResource WrapField

}"/>

 

 

 

 

</igDP:Field.Settings

>

 

 

 

 

</igDP:Field

>

 

 

 

 

</igDP:FieldLayout

>

 

 

 

 

</igDP:XamDataCarousel.FieldLayouts

>

 

 

 

 

<igDP:XamDataCarousel.ViewSettings

>

 

 

 

 

<igWindows:CarouselViewSettings ScalingEffectStopDirection="UseItemPath" UseScaling="True" ItemsPerPage="7" IsListContinuous="False"

 

 

IsNavigatorVisible="False" ItemPathVerticalAlignment="Stretch" ItemSize="170,70" ShouldAnimateItemsOnListChange="True"

 

 

HeightInInfiniteContainers="300" AutoScaleItemContentsToFit="True" ItemPathAutoPad="True" ItemPathHorizontalAlignment="Stretch"

 

 

ItemPathPadding

="20,0,20,120">

 

 

 

 

<igWindows:CarouselViewSettings.ScalingEffectStops

>

 

 

 

 

<igWindows:ScalingEffectStop Offset="0" Value

=".7" />

 

 

 

 

<igWindows:ScalingEffectStop Offset="0.5" Value

="1.5" />

 

 

 

 

<igWindows:ScalingEffectStop Offset="1" Value

=".7" />

 

 

 

 

</igWindows:CarouselViewSettings.ScalingEffectStops

>

 

 

 

 

</igWindows:CarouselViewSettings

>

 

 

 

 

</igDP:XamDataCarousel.ViewSettings

>

 

 

 

 

<igDP:XamDataCarousel.FieldSettings

>

 

 

 

 

<igDP:FieldSettings AllowEdit="False" AutoSizeOptions= "Label" CellClickAction="SelectRecord" LabelTextTrimming="CharacterEllipsis" LabelTextWrapping="WrapWithOverflow" CellContentAlignment="Default" CellMinHeight="100" LabelTextAlignment

="Center" />

 

 

 

 

</igDP:XamDataCarousel.FieldSettings

>

 

 

 

 

<igDP:XamDataCarousel.FieldLayoutSettings

>

 

 

 

 

<igDP:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="False" AllowDelete="False" AllowClipboardOperations

="Copy" />

 

 

 

 

</igDP:XamDataCarousel.FieldLayoutSettings

>

 

 

 

 

</igDP:XamDataCarousel>

So what do I have to chage or to set????

Thank you for your help

Michael

 

Parents
No Data
Reply
  • 69686
    posted

    Hello Michael,

    A similar highlight is caused by the CardBackground of template card view of the DataRecordPresenter.

    You can turn this off by changing the color of this brush by using this code:

    <LinearGradientBrush x:Key="{ComponentResourceKey {x:Type igDP:XamDataGrid}, CardBackground}" EndPoint="0,1" StartPoint="0,0">

                    <GradientStop Color="Transparent" Offset="0"/>

                    <GradientStop Color="Transparent" Offset="1"/>

                </LinearGradientBrush>

Children
No Data