public sealed class ConsoleViewThe panel that is looked at most often when something has gone wrong.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Doc 20 calls the Console "the least built thing in the shell" and the largest single item in its Part A, and both were true: it was a TextBlock saying "Nothing logged yet." What replaces it is doc 20's A7 in full — a virtualised list over the ring the diagnostics layer already keeps, level toggles carrying counts, a category filter, a search box, collapse-duplicates, clear, clear-on-play, and a detail pane showing the whole record and its stack.
⚠ It does not allocate per line. Doc 20 is blunt about why — "a game logging per frame into a panel that keeps strings is a leak with a UI" — and there are two halves to it. ConsoleModel pulls only what is new out of the ring and keeps indices rather than text; VirtualizingPanel keeps about thirty row elements whatever the list holds. A hundred thousand lines is a hundred thousand records the sink had already allocated, and thirty elements.
The panel is ConsoleView.vxml, its rows an @rows block (#758) — the last production list that set CreateRow/BindRow by hand. This file is the intrinsic tags the rows and the detail pane are written in. ConsoleViewDumpTests holds the panel to what the hand-written control drew.
Fields and properties (10)
protected override string TagNameprotected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public ConsoleModel? ModelWhat it is showing.
public UiElement ToolbarThe strip along the top.
public VirtualizingPanel ListThe list itself.
public UiElement DetailThe pane under the list showing the whole of the selected record.
public SearchBox SearchThe search box.
public Select CategoriesThe category picker.
public bool ClearsOnPlayWhether the console throws itself away when play mode is entered.
public LogRecord? SelectedWhich record the detail pane is showing, or .
Events (1)
public Action<ConsoleView, LogRecord>? ActivatedRaised when a row is activated, for a host that can open a source file.
Methods (5)
protected override void OnCreated()protected override void OnRemoved()public void Show(ConsoleModel shown)Points the console at a sink's records.
public void Tick(TimeSpan now = default(TimeSpan))Takes whatever has been logged, which is what brings the rows up to date.
public void Clear()Empties the console, which empties the ring behind it.
Used by (7)
- ChromeFixtureVixen.Editor.Ui.Tests
- ConsolePanelTestsVixen.Editor.App.Tests
- ConsoleViewDumpTestsVixen.Editor.Ui.Tests
- ConsoleViewTestsVixen.Editor.Ui.Tests
- EditorConsoleVixen.Editor.App
- HarnessVixen.Editor.Ui.Tests
- ScrollingPanelPictureTestsVixen.Editor.App.Tests