Ejemplo n.º 1
0
        private void OnOrientationChanged(ComicFiles.ComicPageSize pageSize)
        {
            try
            {
                if (pageSize.Orientation == ComicFiles.ComicPageSize.OrientationEnum.Portrait)
                {
                    this.Column1.Width = new GridLength(10, GridUnitType.Star);
                    this.Column2.Width = new GridLength(80, GridUnitType.Star);
                    this.Column3.Width = new GridLength(10, GridUnitType.Star);
                    this.Row1.Height   = new GridLength(15, GridUnitType.Star);
                    this.Row2.Height   = new GridLength(70, GridUnitType.Star);
                    this.Row3.Height   = new GridLength(15, GridUnitType.Star);
                }

                if (pageSize.Orientation == ComicFiles.ComicPageSize.OrientationEnum.Landscape)
                {
                    this.Column1.Width = new GridLength(15, GridUnitType.Star);
                    this.Column2.Width = new GridLength(70, GridUnitType.Star);
                    this.Column3.Width = new GridLength(15, GridUnitType.Star);
                    if (Device.Idiom == TargetIdiom.Phone)
                    {
                        this.Row1.Height = new GridLength(1, GridUnitType.Star);
                        this.Row2.Height = new GridLength(98, GridUnitType.Star);
                        this.Row3.Height = new GridLength(1, GridUnitType.Star);
                    }
                    else
                    {
                        this.Row1.Height = new GridLength(10, GridUnitType.Star);
                        this.Row2.Height = new GridLength(80, GridUnitType.Star);
                        this.Row3.Height = new GridLength(10, GridUnitType.Star);
                    }
                }
            }
            catch { }
        }
Ejemplo n.º 2
0
        private void MainPage_SizeChanged(object sender, System.EventArgs e)
        {
            var pageSize = new ComicFiles.ComicPageSize(this.Width, this.Height);

            Messaging.Send(ComicFiles.ComicPageSize.PageSizeChanged, pageSize);
        }
Ejemplo n.º 3
0
 private void OnOrientationChanged(ComicFiles.ComicPageSize pageSize)
 {
     this.ReadingVM().PageSize = pageSize;
 }
Ejemplo n.º 4
0
 private void OnOrientationChanged(ComicFiles.ComicPageSize pageSize)
 {
     (this.BindingContext as SplashVM).PageSize = pageSize;
 }