App.Current.InstallState == InstallState.Installed App.Current.IsRunningOutOfBrowser

if (App.Current.InstallState == InstallState.Installed)
{
    if (App.Current.IsRunningOutOfBrowser)
    {
        // write the code for out-of-browser window to make the
        // export to excel button visible
    }
    else
    {
        // write the code for the browser window to disable the install button
        // when the application is already installed
    }
}
else
{
    // write the code for the default view
}
posted @ 2012-08-15 07:42  Ken-Cai  阅读(269)  评论(0编辑  收藏  举报