Why ResolveCompleted event is firing when a MapElements is added to map control ?

When I added MapPolygons as map element to windows phone map control the "ResolveCompleted" event fires repeatedly and the app crashes.How can I fix it ?

Related to : Why ResolveCompleted event is firing when a MapElements is added to map control ?
Why ResolveCompleted event is firing when a MapElements is added to map control ?
Mobile Programming
When I added MapPolygons as map element to windows phone map control the "ResolveCompleted" event fires repeatedly and the app crashes.How can I fix it ?
checkbox checkchanged event not firing in datalist control
Mobile Programming

I have a checkbox inside a datalist control with Autopostback="True". When a user clicks the checkbox the associated event Handler is not firing.

My code is


<asp:DataList ID="myDataList" runat="server" RepeatColumns="1" RepeatDirection="Vertical" > <ItemTemplate> <asp:CheckBox ID="chkid" runat="server" autopostback="True" /> <%#"Id " + Container.DataItem("CustomerID")%><br /> <%#"Name " + Container.DataItem("ContactName")%> <br /> <br /> </ItemTemplate> </asp:Da
How can I stop a javscript event from firing another (different) event?
Mobile Programming

I have an onkeydown event that may or may not scroll the page, and may or may not set a variable. I would like to have an onscroll event that sets that variable to false. I do not want the onkeydown event to trigger the onscroll event. How can I do this?

edit: Added my code. It lets you use your left and right arrow keys to move up and down through the images on my page. Sorry it's so wide.

    window.anImageHasBeenCentered = false;

    window.onkeydown = function ( key )
        var element = document.elementFromPoint ( window.innerWidth /
2, window.innerHeight / 2 );

        if ( anImageHasBeenCentered ) // move to next image
            switch ( window.event ? event.keyCode : key.keyCode )
                case 37: element =
element.parentNode.previousSibling.previousSibling.firstChild; break;
// Left Arrow
                case 39: element =
element.parentNode.nextSibling.nextSibling.firstChild; break; // Right
                default: anImageHasBeenCentered = false; element =

        else // center current image
            switch ( window.event ? event.keyCode : key.keyCode )
                case 37: break; // Left Arrow
                case 39: break; // Right Arrow
                default: element = null;

        if ( element )
            element.scrollIntoView ( );

            if ( ( window.innerHeight + window.scrollY ) <
document.body.offsetHeight ) // if we are not at the bottom of the
                if ( element.offsetHeight < window.innerHeight ) //
if the element is shorter than the screen
                { window.scrollBy ( 0, -( ( window.innerHeight -
element.offsetHeight ) / 2 ) ) } // position it in the middle of the

            anImageHasBeenCentered = true;

    // The function I would like to add, that is unfortunately
triggered by the onkeydown function.
    // window.onscroll = function ( ) { anImageHasBeenCentered =
false; }

SelectedIndexChanged event not firing in child control
Mobile Programming

I have a asp.net control that references a user control(popup) when a button is pressed. When the button is pressed I find the drop down list in the popup user control and I set the selected value of it.

  protected void btnMyBUtton_Click(object sender, EventArgs

        if (ddParent.SelectedIndex > 0)
            DropDownList dd =
ucMyControl.FindControlRecursive("ddChild") as DropDownList;

            dd.SelectedValue = ddParent.SelectedValue;


In the popup user control I'm expecting the SelectedIndexChanged event to fire. However, it isn't. Any ideas why this would be the case?

Markup for my child control(only relevant code) is below:

<asp:FormView ID="myForm" runat="server"
DataSourceID="dsMyDS" DefaultMode="Insert">
    <asp:Panel runat="server">

                    <asp:Label Text="Name" runat="server"
                    <asp:DropDownList ID="ddChild" runat="server"
DataSourceID="ddDS" DataMember="" DataValueField="Id"
DataTextField="Name" SelectedValue='<%# Bind("Id") %>'
OnDataBound="ddChild_DataBound" />

                    <br />
                    <asp:Button ID="btInsertOk" runat="server"
Text="Add" CommandName="Insert" />
                    <asp:Button ID="btInsertCancel" runat="server"
Text="Cancel" />

Thanks in advance.

What determines the timing of 2 event handlers firing from one event like a collision between two objects in Unity3d?
Mobile Programming

I have two objects (A and B) that collide, and when they do, they each fire the TriggerEnter2D event.

  • Object A takes damage when this happens.
  • Object B destroys itself.

I have noticed that in this model, the damage taken by Object A is intermittent. Sometimes it takes damage, other times it does not. This is due (seemingly) to Object B destroying itself before Object A counts its damage. At least, when I comment out the Destroy method, all the damage gets counted correctly. This is a problem of timing, and is the kind of bug that freaks me out a bit because it's subtle.

Since I'm new to Unity, is there a best practice on handling the architecture of two interacting objects like this? This must be a very common case. The tutorials I've seen seem to use publicly exposed properties of the other object (say object A) from within the handling object (object B).

Thus, I would have only one handler on Object B that would then call a public method on Object A to say "you were damaged". Is this best practice?

How to bind an event to Can.Control to run whenever an element matching the selector is added to the control element?
Mobile Programming

I am trying to build a DateTimePicker Widget and do not want to worry about the instantiation of the widget so I have created a Can.Control which takes the html body as the element.

But, now my input elements are rendered in the DOM using can.view. How do I bind an event to the insertion of a new dateTime element to my control scope?

 * DateTime Plugin

plugins.DateTime = can.Control.extend({

    init : function ( element , options ){

    'input.dateTime click' : function (){
        $( this.element ).find('input.dateTime').datetimepicker();
    new plugins.DateTime('body');

Is there any way I can specify 'input.dateTime load' to bind a datepicker when the element is added to the control element?

HD Wallpapers
3D Abstract
Indian Celebrities
Animals Birds
Black White
Food Drink
Dreamy Fantasy
Bikes Motorcycles
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .