/// <inheritdoc /> public override void Initialize(LayoutElementsContainer layout) { var grid = layout.CustomContainer <UniformGridPanel>(); var gridControl = grid.CustomControl; gridControl.ClipChildren = false; gridControl.Height = TextBox.DefaultHeight; gridControl.SlotsHorizontally = 3; gridControl.SlotsVertically = 1; LimitAttribute limit = null; var attributes = Values.GetAttributes(); if (attributes != null) { limit = (LimitAttribute)attributes.FirstOrDefault(x => x is LimitAttribute); } XElement = grid.IntegerValue(); XElement.SetLimits(limit); XElement.IntValue.ValueChanged += OnValueChanged; XElement.IntValue.SlidingEnd += ClearToken; YElement = grid.IntegerValue(); YElement.SetLimits(limit); YElement.IntValue.ValueChanged += OnValueChanged; YElement.IntValue.SlidingEnd += ClearToken; ZElement = grid.IntegerValue(); ZElement.SetLimits(limit); ZElement.IntValue.ValueChanged += OnValueChanged; ZElement.IntValue.SlidingEnd += ClearToken; }
/// <inheritdoc /> public override void Initialize(LayoutElementsContainer layout) { element = layout.IntegerValue(); element.SetLimits(Values.Info); element.IntValue.ValueChanged += () => SetValue(element.IntValue.Value); }