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
}
转载于:https://www.cnblogs.com/Ken-Cai/archive/2012/08/15/2639405.html