Bundle<T>

References
public sealed class Bundle<T>
Represents a bundle of UI controls, ie. objects that are associated with each other and may share certain visual properties. For example, bundled sliders will synchronise the width of their grips so they look more in tune with each other.
T where IBundleAware

Constructors

Bundle

#
public Bundle(T owner)
Create a new bundle wrapped aroud a single object.
owner (T)

Properties

Count

#
public int Count { get; }
Gets the number of sliders in this bundle.

Objects

#
public IEnumerable<T> Objects { get; }
Enumerate over all objects in this bundle.

Methods

Associate

#
public void Associate(Bundle<T> bundle)
Associate two bundles.
bundle (Bundle<T>)

Associate

#
public void Associate(T obj)
Associate another object with this bundle.
obj (T)

Disassociate

#
public void Disassociate(T obj)
Disassociate a slider from this bundle.
obj (T)Slider to disassociate.

DisassociateAll

#
public void DisassociateAll()
Disassociate all sliders in this bundle.

Union

#
public float Union(Func<T, float> method)
Compute the float union of all bundled objects.
method (Func<T, float>)Object to float converter.
Smallest float containing all objects in the bundle.

Union

#
public int Union(Func<T, int> method)
Compute the integer union of all bundled objects.
method (Func<T, int>)Object to integer converter.
Smallest integer containing all objects in the bundle.

Union

#
public SizeF Union(Func<T, SizeF> method)
Compute the size union of all bundled objects.
method (Func<T, SizeF>)Object to size converter.
Smallest size containing all objects in the bundle.