measureoverride

ElementFlow: Exception in MeasureOverride

I'm trying to use FluidKits ElementFlow-control in my application, but get an exception in the MeasureOverride method of ElementFlow. Layout measurement override of element 'FluidKit.Controls.ElementFlow' should not return PositiveInfinity as its DesiredSize, even if Infinity is passed in as available size. In the sample applicatio...

How to set DesiredSize.Width of a UIElement?

I need to calculate the width of each UIElement in a custom panel. If looping over Children: foreach (UIElement child in Children) { ... } I can't do child.DesiredSize.Width = myCalculatedWidth; Since DesiredSize and DesiredSize.Width are read only. The docs say that that Measure() updates the DesiredSize of the UIElement, so I tried...

WPF InvalidateMeasure not called during or after animation

I have a custom ListBox whith the following ListBoxItem style. It contains a few animations to scale the ListBoxItem when the mouse hovers over it. <Style x:Key="notesListBoxStyle" TargetType="{x:Type ListBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> ...

WPF UserControl is not drawn when overriding MeasureOverride and ArrangeOverride

I have a UserControl looking like this: <UserControl MaxHeight="32" MaxWidth="32" MinHeight="25" MinWidth="25"> <DockPanel> <!-- some stuff --> </DockPanel> </UserControl> In addition to the min/max size constraint, I want the control always being painted with Width = Height. So i override MeasureOverri...

WPF layout calls MeasureOverride repeatedly in increments of 2?

I've run into a case where I have a custom Panel (inherits from Panel) and I'm using it as an ItemsPanel in a ListView. When I resize the container that it's in, if I resize it smaller, my panel's MeasureOverride function gets called once, but if I resize it larger (let's say from 100 to 300), it calls MeasureOverride and ArrangeOverrid...