| 399 | |
| 400 | /// <inheritdoc /> |
| 401 | public override void Initialize(LayoutElementsContainer layout) |
| 402 | { |
| 403 | var grid = layout.CustomContainer<GridPanel>(); |
| 404 | var gridControl = grid.CustomControl; |
| 405 | gridControl.ClipChildren = false; |
| 406 | gridControl.Height = TextBox.DefaultHeight; |
| 407 | gridControl.RowFill = new[] |
| 408 | { |
| 409 | 1.0f, |
| 410 | }; |
| 411 | gridControl.ColumnFill = new[] |
| 412 | { |
| 413 | 0.9f, |
| 414 | 0.1f |
| 415 | }; |
| 416 | |
| 417 | _element = grid.Custom<InputBindingBox>(); |
| 418 | SetText(); |
| 419 | _element.CustomControl.WatermarkText = "Type a binding"; |
| 420 | _element.CustomControl.EditEnd += OnValueChanged; |
| 421 | |
| 422 | var button = grid.Button("X"); |
| 423 | button.Button.TooltipText = "Remove binding"; |
| 424 | button.Button.Clicked += OnXButtonClicked; |
| 425 | } |
| 426 | |
| 427 | private void OnXButtonClicked() |
| 428 | { |