protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); var config = _configService.Config; int columns = Math.Max(config.Columns, MinColumns); int rows = Math.Max(config.Rows, MinRows); _terminalSize = new TerminalSize(columns, rows); FixWindowSize(); Profile profile = config.Profile; if (profile == null) { profile = DefaultProfile.Get(); } _defaultProfile = ExpandVariables(profile); CreateSession(_defaultProfile); }