jasoncodesaway / xamjam Goto Github PK
View Code? Open in Web Editor NEWA collection useful Xamarin Forms components
License: Apache License 2.0
A collection useful Xamarin Forms components
License: Apache License 2.0
Hello,
Width and Height does not change when the orientation of the mobile change to portrait to landscape.
Could you help ?
Thank you,
Christophe
When using the plugin against this emulator in debug mode on Visual Studio 2015, the screen dimensions are reversed, e.g. height is being reported as width.
I am using this plugin on iOS and when you rotate your device the width/height are no longer correct.
Take a peak at my approach, perhaps this could be used in your UWP solution?
// You decided which is best for you...
// Do you want Size of the App's View
// or
// Do you want the Display's resolution
// ######################################
// Size of App's view
DisplayScreenHeight = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().VisibleBounds.Height;
DisplayScreenWidth = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().VisibleBounds.Width;
// Size of screen's resolution
//DisplayScreenWidth = Windows.Graphics.Display.DisplayInformation.GetForCurrentView().ScreenHeightInRawPixels;
//DisplayScreenHeight = Windows.Graphics.Display.DisplayInformation.GetForCurrentView().ScreenWidthInRawPixels;
// Pixels per View Pixel
// - https://msdn.microsoft.com/en-us/windows/uwp/layout/design-and-ui-intro#effective-pixels-and-scaling
// - https://msdn.microsoft.com/en-us/windows/uwp/layout/screen-sizes-and-breakpoints-for-responsive-design
DisplayScaleFactor = Windows.Graphics.Display.DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
Is there a NETStandard version of this package available or on the roadmap? We are moving all of our library development to .NETStandard 2.0.
In case the user changes the app's window size (only possible on UWP and Droid as of now): XamJam.Wall should listen for max screen size changes in the event of a resize, this is done in the ctor, current relevant code is:
public WallView(WallViewInputs<TView, TViewModel> wallViewInputs)
{
this.wallViewInputs = wallViewInputs;
// TODO: Listen for screen size changes and, with thread synchronization, add support for the new maximum # of views to create
var size = Plugin.XamJam.Screen.CrossScreen.Current.Size;
var maxScreenWidth = size.Width;
var maxScreenHeight = size.Height;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.