How to Obtain the Width and Height of the SplitColumn Layout When Using Spectre.Console? #1693
-
I'm currently creating a demo for a console game using the Spectre.Console library. During implementation, I encountered a problem: I cannot determine the width and height of the "main" area of the console. Could anyone advise on how I should write the code to dynamically get the dimensions of the console's main area? i‘m using a Canvas to Display the Tested Drawing Area in Spectre.Console
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can't get the width and the height like that, since it's calculated dynamically on rendering. I think your best bet is to create a custom |
Beta Was this translation helpful? Give feedback.
You can't get the width and the height like that, since it's calculated dynamically on rendering. I think your best bet is to create a custom
IRenderable
, that way you can get the requested max width. The height you cannot know, but if you're running in "full screen" you can probably use that as height.