I would like to deactivate the right click in my app that offers the option to install the app on the desktop. How do I do such thing?
['https://Stackoverflow.com/questions/3956004', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/375814/']
Right click on the project in Visual Studio and select properties. There is a check-box "enable running out of browser" option there.
Here's a hackish way to do it for older versions of SilverLight from [a silverlight forum](http://forums.silverlight.net/forums/p/37820/350972.aspx):

```
<div id="silverlightObjDiv">
    <!-- silverlight object here -->
</div>
<script>
document.getElementById('silverlightObjDiv').oncontextmenu = disableRightClick;
function disableRightClick(e) {
    if (!e) e = window.event;
    if (e.preventDefault) {
        e.preventDefault();
    } else {
        e.returnValue = false;
    }
}
</script>

```

If you are using a recent version, you can disable this behavior from the properties of your project.