The XAML layout of Windows Phone 8.1 (Universal) app gets cropped by approximately 30 pixels at the bottom in Lumia 640. It works without cropping for all other models. I guess it is because Lumia 640 comes with onscreen buttons. (Start, back and search)
If yes, what is correct way to adapt my XAML layout to this particular scenario?
Is there a way to test this scenario in Emulator?
I think that adding this in your C# code should work:
public MainPage()
{
this.InitializeComponent();
Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().SetDesiredBoundsMode(Windows.UI.ViewManagement.ApplicationViewBoundsMode.UseVisible);
}
Related
I'm used to using Titanium.Platform.displayCaps.platformWidth all over my app to get the width of the window.
But with SplitView on the iPad Titanium.Platform.displayCaps.platformWidth still returns the total screen size of the iPad (as it probably should).
How can I determine the actual available screen width for the app while using SplitView?
I don't mean SplitWindow BTW. This is in regards to SplitView where you can line up two different apps next to each other on the iPad
Thank you!
you can get the width your uiElement using postLayout event
var uiWidth;
myElement.addEventListener('postlayout', postlayout);
function postlayout(e){
uiWidth = e.source.rect.height;
myElement.removeEventListener('postlayout', postlayout);
}
An easy way to determine how wide a certain view is, is to use toImage() on the UI element, and then get the size.
So... when you do
console.log($.myWindow.toImage().rect.width);
You should get the width of the window. Which should be the width allocated to your app.
I'm trying to design app in portrait mode in UWP but option is not available .
Any idea to achieve that.
Okay this target what you're trying to achieve is not advisable as Universal Windows Platform is for all device families and it's not advisable to make the UI of the application specific to only a single device type. Although there are no particular ways to achieve this, there are many workarounds,
Create a DesignHeight and DesignWidth for your application so that the Designer of visual studio knows what specific screen pixel size you're designing for.
Use MaxWidth and MaxHeight in your application to ensure the application doesn't use full screen sizes, use height/width properties of your page to not make the app size resizable (highly not recommended).
If Portrait view is what you must have then you can set the max width of your RootGrid and if the app screen size increases your maxWidth centre align your content. (this can be done by setting the MaxWidth = 900 property and the horrizontalAlignment property to stretch) (See the Zomato App on windows 10 desktop for a good idea)
To Set the designHeight/Width:
d:DesignHeight="500"
d:DesignWidth="400"
use the above in your page tag
For The point 2:
use Height="900" Width="450" in your Page Tag
For the Point 3:
<Grid HorizontalAlignment="Stretch" MaxWidth="900">
</Grid>
How can i add blur background with some transparency in my Windows Phone application.
I can create transparent background using opacity property or using first two alpha number of hexa color code #AFFFFFFF. But I am not able to find any way to add blur for any panel. Is there some way or work around?
Blur effect is not supported out of the box on Silverlight.
It's possible with WriteableBitmapEx
On loading your image into WriteableBitmap wb, you can get the blurred version with:
var wb2 = WriteableBitmapExtensions.Convolute(wb, WriteableBitmapExtensions.KernelGaussianBlur3x3);
I developed an app using MGWT.It is working fine in ios6. I upgraded to ios7.here I'm facing few problem I have 10 MTextBox widgets, I want to show all in my view.for this i add them to a WidgetList and I added my widgetList to a scroll panel and finally I added my scroll panel to main layout of the view,.till now no problem at all, but when I tapped on the 6,7,8,9,10 th textboxes, the ios keypad is appearing. this appearance of keypad overlapping my 6,7,8,9,10 textboxes. because of this overlapping these textboxes are not even taking the text input.
thanks in advance.
I found the answer to my question. We can resolve the above issue by setting the viewport height to device height, this can be in 2 ways, one is myapp.gwt.xml configuration and the other is, adding these lines in our onModuleLoad()
1)xml configuration:see this:viewport height adjustment
2)code snippet::
MGWTSettings settings = MGWTSettings.getAppSetting();
ViewPort viewPort = settings.getViewPort();
viewPort.setHeightToDeviceHeight();
viewPort.setWidthToDeviceWidth();
viewPort.setUserScaleAble(false).setMinimumScale(1.0).setMinimumScale(1.0).setMaximumScale(1.0);
viewPort.setTargetDensity(DENSITY.MEDIUM);
settings.setViewPort(viewPort);
MGWT.applySettings(settings);
I've been working on some custom graphics controls, and I found this weird problem with windows 7 rendering my button controls. I've used Photoshop to delete the pixels in the background all around the button image I'm using, then saved it as a GIF, and imported it into VS to use as the background image of my button. When windows XP renders it, it is fine, but when windows 7 renders it, all 4 corners have an odd white border around them.
You can barely see them in this pic, but they are much more apparent when looking at them on the client PC's.
Is there something wrong with the way I am transfering the image? should I not use a gif? is there something wrong with the way I am displaying it on the button? What can I do about it?
GIF was a bad choice, it can only render images with 256 colors. You need all the colors you can get to make the anti-aliasing work properly. Use PNG.
You will also need to make sure that the background color of the container is the same as the one you used in Photoshop, the anti-aliasing pixels will otherwise have the wrong colors. And you cannot stretch the image, that will also stretch the anti-aliasing pixels, ruining the effect.