/// <summary> /// Realize indexed item. /// </summary> /// <param name="index"> Index position of realizing item </param> internal virtual RecyclerViewItem RealizeItem(int index) { object context = InternalItemSource.GetItem(index); // Check DataTemplate is Same! if (ItemTemplate is DataTemplateSelector) { // Need to implements for caching of selector! } else { // pop item RecyclerViewItem item = PopRecycleCache(ItemTemplate); if (item != null) { DecorateItem(item, index, context); return(item); } } object content = DataTemplateExtensions.CreateContent(ItemTemplate, context, (BindableObject)this) ?? throw new Exception("Template return null object."); if (content is RecyclerViewItem) { RecyclerViewItem item = (RecyclerViewItem)content; ContentContainer.Add(item); DecorateItem(item, index, context); return(item); } else { throw new Exception("Template content must be type of ViewItem"); } }
private void load() { foreach (var s in subPanels) { ContentContainer.Add(s); } }
private void load() { ContentContainer.Add(keyBindingOverlay); ContentContainer.Add(backButton = new BackButton { Alpha = 0, Width = hidden_width, RelativeSizeAxes = Axes.Y, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Action = () => keyBindingOverlay.Hide() }); }
public void AddLog(string log) { Console.WriteLine($"{log}"); var txt = new TextLabel { Text = log }; ContentContainer.Add(txt); if (ContentContainer.Children.Count > 30) { var remove = ContentContainer.Children.GetRange(0, 10); foreach (var child in remove) { ContentContainer.Remove(child); } } ElmSharp.EcoreMainloop.Post(() => { ScrollTo((ContentContainer.Children.Count) * (txt.NaturalSize.Height), true); }); }
private void load() { ContentContainer.Add(keyBindingPanel); }
public override void Add(View view) { ContentContainer.Add(view); }
private void load() { ContentContainer.Add(keyBindingOverlay); }