MonoTouch.Dialog.FloatElementCell.Update C# (CSharp) Method

Update() public method

public Update ( FloatElement element ) : void
element FloatElement
return void
		public void Update(FloatElement element){
			_element = element;
			if (_slider==null) 
				prepareCell();
			
			TextLabel.BackgroundColor = UIColor.Clear;
			SizeF captionSize = new SizeF (0, 0);
			if (element.Caption != null){
				TextLabel.Text = element.Caption;
				captionSize = TextLabel.StringSize (element.Caption, element.Appearance.TextFieldFont);
				captionSize.Width += 8; // Spacing
			}
			
			_slider.Frame = new RectangleF (10f + captionSize.Width, 20f, 280f - captionSize.Width, 7f);
			_slider.MinValue = element.MinValue;
			_slider.MaxValue = element.MaxValue;
			_slider.Value = element.Value;
		}