public MFloatingActionButton(MConformant conformant) { _button = new Button(conformant.FloatingLayout) { Style = Styles.Button.FloatingButton, }; _button.Clicked += (s, e) => { Clicked?.Invoke(this, EventArgs.Empty); }; _box = conformant.FloatingLayout as Box; _box.PackEnd(_button); _box.RepeatEvents = true; _box.SetLayoutCallback(() => { }); MColors.AddColorSchemeComponent(this); }
public MModalSheets(MConformant conformant, MModalSheetsDirection direction) : base(conformant) { _scrim = new Box(conformant) { BackgroundColor = Color.Transparent, RepeatEvents = true, }; Style = Styles.Material; SetScrollable(true); UpdateDirection(direction); AlignmentX = -1; AlignmentY = -1; WeightX = 1; WeightY = 1; Toggled += (s, e) => { UpdateScrim(); }; IsOpen = false; BackgroundColor = Color.White; _scrim.PackEnd(this); conformant.SetPartContent(Parts.Layout.Sheets, _scrim); }