private InitializeStartPage ( bool isFirstRun ) : void | ||
isFirstRun | bool | /// Indicates if it is the first time new Dynamo version runs. /// It is used to decide whether the Gallery need to be shown on the StartPage. /// |
return | void |
private void InitializeStartPage(bool isFirstRun)
{
if (DynamoModel.IsTestMode) // No start screen in unit testing.
return;
if (startPage == null)
{
if (startPageItemsControl.Items.Count > 0)
{
var message = "'startPageItemsControl' must be empty";
throw new InvalidOperationException(message);
}
startPage = new StartPageViewModel(dynamoViewModel, isFirstRun);
startPageItemsControl.Items.Add(startPage);
}
}