public override View Draw() { if (!string.IsNullOrEmpty(DataSourceRefId)) { this.GetBindingData(); } return(wrapper = GetFrame()); }
protected override void OnElementChanged(ElementChangedEventArgs <Frame> e) { base.OnElementChanged(e); EbXFrame element = e.NewElement as EbXFrame; //if (element == null) return; //if (element.HasShadow) //{ // Elevation = 30.0f; // TranslationZ = 0.0f; // SetZ(30f); //} }
protected EbXFrame GetFrame() { var frame = new EbXFrame { BackgroundColor = Color.FromHex(this.BackgroundColor), HasShadow = BoxShadow, CornerRadius = BorderRadius, Padding = this.Padding == null ? 0 : this.Padding.ConvertToXValue(), Margin = this.Margin == null ? 0 : this.Margin.ConvertToXValue(), BorderWidth = BorderThickness, BorderColor = Color.FromHex(BorderColor), IsVisible = !Hidden }; return(frame); }
public override View Draw() { if (CellCollection == null) { return(null); } EbXFrame frame = GetFrame(); if (!string.IsNullOrEmpty(LinkRefId)) { TapGestureRecognizer recognizer = new TapGestureRecognizer(); recognizer.Tapped += OnClick; frame.GestureRecognizers.Add(recognizer); } DLDynamicGrid grid = new DLDynamicGrid(this); frame.Content = grid; foreach (EbMobileDataCell cell in CellCollection) { if (cell.ControlCollection == null || cell.ControlCollection.Count <= 0) { continue; } foreach (EbMobileDataLabel control in cell.ControlCollection) { if (control is IGridAlignment gridAlign) { controls.Add(control); var view = control.Draw(); grid.SetPosition(view, cell.RowIndex, cell.ColIndex, gridAlign.RowSpan, gridAlign.ColumnSpan); } } } return(frame); }