public CustomTabViewItem(Chapter chapter) { //this.DefaultStyleKey = typeof(CustomTabViewItem); TabItem = new TabViewItem(); Id = ++_objectNN; Chapter = chapter; TabItem.Header = Chapter.BookTabHeader(); //Icon = new SymbolIcon(Symbol.Document); BitmapIcon bitmapIcon = new BitmapIcon(); bitmapIcon.ShowAsMonochrome = false; bitmapIcon.UriSource = new Uri("ms-appx:///Assets/favicon.png"); TabItem.Icon = bitmapIcon; TabContent = new TabContent(chapter); // we intentionaly left Conten uninitialized. TabContent becomes content of page //TabItem.Content = new TabContent(chapter); }