WP 8.0 Silverlight 앱에서이 기능을 성공적으로 사용했습니다. , OneTimeDialog를 재사용 가능한 클래스를 작성하십시오 "힌트"또는 대화 상자가 한 번만 다른 많은 도움이된다 "환영"을 표시
OneTimeDialog.Show("WelcomeDialog", "Welcome", "Welcome to my app! You'll only see this once.")
:
using System.Windows;
using System.IO.IsolatedStorage;
namespace MyApp
{
public static class OneTimeDialog
{
private static readonly IsolatedStorageSettings _settings = IsolatedStorageSettings.ApplicationSettings;
public static void Show(string uniqueKey, string title, string message)
{
if (_settings.Contains(uniqueKey)) return;
MessageBox.Show(message, title, MessageBoxButton.OK);
_settings.Add(uniqueKey, true);
_settings.Save();
}
}
}
는 다음과 같이 앱 어디에서나 사용 애플 리케이션의 종류, 그래서 실제로 위의 코드를 휴대용 클래스 라이브러리에 여러 프로젝트에서 참조 할 수 있습니다.
이미 bool에서 messagebox를 표시했는지 기억할 수 있습니다. 또는 객체를 시각적 트리에 추가 할 때 발생하는 Loaded 이벤트를 사용하십시오. –