// Adapts the panel to the device. private void OptionsPanel_ResponsiveProfileChanged(object sender, ResponsiveProfileChangedEventArgs e) { var display = Display.Both; if (Application.Browser.Size.Width < 450) { display = Display.Icon; this.label1.Visible = false; this.Width = 90; } else { this.label1.Visible = true; this.Width = 250; } foreach (Control c in this.Controls) { var button = c as Button; if (button != null) { button.Display = display; } } }
private void LoginPage_ResponsiveProfileChanged(object sender, ResponsiveProfileChangedEventArgs e) { if (this.Width <= 450) { // Phone this.helpTip.Active = false; this.panel.Width = 320; this.panel.Left = (this.Width - this.panel.Width) / 2; } else { // Phone Landscape, Tablet and Desktop this.helpTip.Active = true; this.panel.Width = 420; this.panel.Left = (this.Width - this.panel.Width) / 2; } if (this.Height <= 450) { // Phone Landscape this.panel.Height = 320; this.label1.ImageAlign = ContentAlignment.MiddleLeft; this.panel.Top = (this.Height - this.panel.Height) / 2; } else { // Phone Portrait, Tablet and Desktop this.panel.Height = 460; this.label1.ImageAlign = ContentAlignment.TopCenter; this.panel.Top = (this.Height - this.panel.Height) / 2; } }
private void Application_ResponsiveProfileChanged(object sender, ResponsiveProfileChangedEventArgs e) { if (Application.Browser.ScreenSize.Width < 700) { this.panel1.CompactView = true; } else { this.panel1.CompactView = false; } }