How to check if tapped region falls inside a PopUp Control - windows-phone-7

I am using tap event listener from wp toolkit. In my app I show a pop up screen. I have defined the gesturelister to work on the Grid. In capturing the Tap gesture event, I get the screen coordinates (i.e X and Y) where it happened.
Now i want to know if the Tap happened inside the PopUp control or outside it. How can i achieve this on wp8. I have tried many solutions but none seems to work. Please help on this.

Is the Grid under or over the PopUp Control?
If yes, the solution is pretty simple.
When the click is on the Popup the Grid will not receive it.
When the click is not on the Popup the Grid will receive it.

Related

Nativescript Vue: How to dismiss searchBar keyboard when scrolling ListView?

I have a SearchBar component and a ListView component. When I tap the search bar, the keyboard comes up but it stays up even if the user decides to scroll ListView under it. I can't seem to find either
1) any event on the ListView that I can trigger the search bar to close on when it's scrolling
--or--
2) any event on the search bar that I can check to see if it's not focused , then close it.
Either of those would be sufficient but I can't seem to find any in the documentation.
Both components are independent of each other, you must call dismissSoftInput() on the search bar upon scroll.
Unfortunately the scroll event is not supported out of the box while using ListView. There is an open feature request on Github, which also discusses how you may implement this event with an override & bit of native code in your project. You may also consider using RadListView, supports scroll events out of the box.

Custom button not displaying in Today Extension

I have some custom buttons in my host app that I'd like to use in the Today Extension.
They work just fine in the app but do not display in the widget.
The button on the left is my custom button class, the one on the right is a UIButton. If I change it to my custom class it too disappears.
Any thoughts why this might be happening?
----------------------EDIT------------------------
Well, somehow I managed to get it to display but sometimes it's not drawing the whole button and sometimes it's drawing the button incorrectly.
Any help would be appreciated! Thanks

Toolkit Autocompletebox popup postition

I'm having some troubles with the position of the Autocompletebox. It's working as it should, displaying the popup above the textbox when using the app. But if I use a task like Microsoft.Phone.Tasks.EmailComposeTask and then click on the back button, the position of the popup goes to to the "middle", not below or over the textbox, but right over it. Does anybody have a clue on what I need to do here? I know that the app is deactivated and activated again when i use Microsoft.Phone.Tasks.EmailComposeTask. But I don't understand why the popup of the toolkit:Autocompletebox is the only thing that's affected by this.
I've read this thread: WP7 AutoCompleteBox Popup position, but is there still no way of "fixing" this issue? Any tips?

windows phone mango - differences between click and tap

Can anybody give me more details on this?
I know that tap is coming from gestures, but I'd like to know more on WP7 events model.
For instance how following scenarions work:
stackpanel with tap event and checkbox inside which handles click
container with tap and any framework element also with tap, etc.
Which events have more priority and if is it possible to mask events?
What kind of event bubbling is used here from top to bottom or vice-versa?
If you're using WP7.1 SDK the easiest thing to make things consistent would be to use the Tap event everywhere (it's available on all UIElement derived controls). Tap events are bubbled up from the lowest control in the visual tree until a handler is found.
Then you don't need to worry about if/when Click and Tap will clash.

Button Skinning in Windows Phone 7

I have created a derived button class which contains a couple ImageSource members for the Normal and Pressed states. I need to be able to change the image to the Pressed image whenever the user presses the button.
Looking around I've noticed that you can use VisualStateManager in xaml to specify the bitmaps to use for each state. Windows Phone 7 (WP7) Change a button's background color on click
Now this is all fine and dandy, but I need to be able to do the same thing dynamically rather than at design time. Is there a way to do this in code?
Or can I override some event handler and set the background manually? Seems that there are no event handler to trap this and it's a no-no from what I read...
Thanks!
You can try the following:-
In the ManipulationStarted event handler you can change the image-source to the pressed image.
In ManipulationDelta event handler check if the button is not pressed then change the image to the normal one.
Finally in ManipulationCompleted event handler change the image to the normal one.
Hope this helps...
Have you tried setting images for each state as properties in your control?

Resources