Łukasz Młynik
Łukasz Młynik

Reputation: 632

Resize ListBox not resizing its items

So i'm resizing a ListBox using a Storyboard. The relevant key

<DoubleAnimation Duration="0:0:0.75" To="-276" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="ItemList" d:IsOptimized="True"/>

But the items are getting squished.Is the a way to avoid this?

Upvotes: 0

Views: 262

Answers (1)

GJHix
GJHix

Reputation: 522

If you are resizing the ListBox use

  • Storyboard.TargetProperty="(FrameworkElement.Width)"

and/or

  • Storyboard.TargetProperty="(FrameworkElement.Height)"

This should not affect the items in any way but will allow the ListBox to resize.

TranslateY will only move the control along the Y axis, not resize it.

Upvotes: 2

Related Questions