How to create scrollbar for legend box in WPF

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
parks95
Posts: 1
Joined: Fri Sep 28, 2018 12:36 am

How to create scrollbar for legend box in WPF

Post by parks95 » Fri Sep 28, 2018 12:43 am

Hello,

I need to create vertical scroll bar for legend box in WPF because I have a lot of legends.

I did with folliowing code but scroll bar was not created.

<lcub:LegendBoxXYCollection>
<lcub:LegendBoxXY Visible="True" ShowCheckboxes="True" Position="SegmentRightMarginCenter"
Layout="Vertical" AutoSize="True" ScrollBarVisibility="Vertical"
MouseHighlight="None" MouseInteraction="True" AllowMouseResize="False" MoveByMouse="False"
HighlightSeriesOnTitle="False" SeriesTitleColor="Gray" HighlightSeriesTitleColor="Black"
CheckBoxColor="Gray" CheckMarkColor="Gray" >
<lcub:LegendBoxXY.Fill>
<lcub:Fill Color="Transparent" GradientColor="Transparent"/>
</lcub:LegendBoxXY.Fill>
<lcub:LegendBoxXY.Shadow>
<lcub:Shadow Visible="False"/>
</lcub:LegendBoxXY.Shadow>
</lcub:LegendBoxXY>
</lcub:LegendBoxXYCollection>

Please give me the method to solve this problem.

Thank you,
Liam

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: How to create scrollbar for legend box in WPF

Post by ArctionKestutis » Fri Sep 28, 2018 7:01 am

Hello,
You should disable AutoSize property and modify Height according to your needs. Otherwise LegendBox is always automatically sized.

Post Reply