Relative layout for Windows Phone Application using XAML C# - xaml

I am creating Windows phone app and in this app i need to deal with webview control and custom keyboards. I need to use my custom views as keyboard where there is system keyboard is used which is ok but the problem is how do i achieve the Relative layout. Currently in app i have a grid in the page and with 2 rows and I have set the height of first row to "*" and the second row height to 0. In first row there is webiew and in second row there is keyboard. So when the custom keyboard is up the height of second row is changed from 0 to some value so it appears with keyboard but due to this the height of first row decreases but what i want is that the keyboard should overlap the webview say 6:4 ratio. I want the height of the webview should remain same and the custom keyboard should overlap it.
Thank you!

Canvas control can be used for such requirement that you have.Please follow this link
https://msdn.microsoft.com/en-in/library/windows/apps/jj207042(v=vs.105).aspx
Happy Coding :)

Related

What scrolling / list control is used on Windows 10 store?

I'm playing around with Windows Universal App development. When looking at the Windows 10 Store App, I noticed a scrolling list control as shown in the below screenshot. Clicking the right arrow will shift right by a certain number of elements. Likewise on the other side, clicking the left arrow will shift back.
Is the scrolling control in the Store App a standard control or something custom made?
I'm aware of things like the ScrollViewer, but that just adds a scroll bar.
I created this by the following:
Grid with 3 columns with widths 3*, 94*, 3*
First column contains Button stretched vertically and horizontally to fill the grid and a ListView
Second column contains nothing
Third column contains Button stretched vertically and horizontally to fill the grid and a ListView
Button clicks fire events to calculate how many places to scroll left or right and then uses ListView.ScrollIntoView to scroll the items into view

AlertView's Height Expand Automatically on iPhone 4

Currently,I am developing one app in which i set simple alert on one button click.
All operation performed very well on all device but when i run my app on iPhone 4 alert's height automatically increase and my subview's which add in alert its layout is not looking good.
What is issue is generating i cant find out please suggest me some solution.

Elastic property with windows phone slider

I have a slider in windows phone as shown in figure. When I swipe the slider it's working. But what I want is, if I swipe the slider and leave it in the middle without reaching the end of the slider - it should return back to the beginning like elastic. If it was swiped to the end then it should navigate to the next page. Why I am using slider is, I need to control a text's opacity with animation. How to do this task?
I would use VisualStates to provide the animation, then you don't have to worry about the physics of it. I have created a similar scenario for a notification style Windows Phone effect, you know how you can swipe a notification off to the right. Basically it would be something like this:
OnManipulationStarted VisualStateManager.GoToState for OpenBegin or ClosedBegin depending on the state
OnManipulationDelta you can check e.Delta.X and if < 0 its moving left otherwise it's moving right or just check the position OnManipulationCompleted
After you know what the state call VisualStateManager.GoToState for OpenEnd or ClosedEnd and it will animate back to the specified location.
Add a comment if you need more help/code

Detect whether a Windows 8 Store App has a touch screen

There are certain elements of Win 8 Store App UI that change based on whether the user has a touch screen. For example, a ScrollViewer, when rendered on a non-touch screen shows a vertical scrollbar. On a touch screen, the scrollbar is hidden.
I would like to tailor my application UI, adding extra controls, for non-touch screen users. Does anyone know if it is possible to detect whether a user has a touch screen?
You can use the Windows.Devices.Input namespace to detect various capabilities (touch, keyboard, mouse, etc.). For example, the TouchCapabilities class has a TouchPresent property you could check to see if there's a digitizer available.
Take a look at the Input: Device capabilities sample to see them in action.
If you are using HTML/JS you can query it like this
var touchCapabilities = new Windows.Devices.Input.TouchCapabilities();
var isTouchCapable = touchCapabilities.touchPresent;

how to solve z-index of webview control in XAML in metro style app?

i create item details page divided to 3 rows ,i put scrollviewer in row no 2, scrollview contains two pargraph and webview ,when i scroll the page ,webview appear on the row no 3 means that it ovelay row no 3
WebView suffers from an airspace issue. as it is not hosted in the same render target as the rest of the app, but rather in a separate HWND window. There is currently no good way around that other than manually resizing the WebView to make it fit in your boundaries.
You can use a WebViewBrush instead of the WebView, but that has a set of limitations of its own - basically it is just a non-interactive brush. Its documentation shows how you can use it to temporarily show the non-interactive page while some other content is rendered on top of it.
Or, if you only want to display a Web page, WebViewBrush may be able to be used.
official sample code: XAML WebView control sample - ScenarioInput4.ComboBox1_DropDownOpened()