Work with WPF Xaml in turbo window
steps to reproduce: in the wpf app project:
-
open some editors with the code, and some with the WPF xaml markup for the window. xaml opens in the VS's xaml editor
-
switch to the Turbo vindow, and request changes with the "SendCode" feature
expected result: xaml should be seen and changed if necessary
actual result: xaml is not seen and is not changed, extension ignores xaml editing windows.
and an other question: if I pressed "send code" with shift hold, and code appeared in the tools window what should I do to quickly apply it to the my files?
From what you're saying, it seems like the extension ignored the XAML code because when you clicked the SendCode button, the active editor was the code editor (.cs), not the XAML one (.xaml).
The SendCode button uses the context of the editor that is active at the moment. If you want the chat to have context from multiple files, the best way is to select them through the "Solution Context Window."
Regarding your other question, there's currently no shortcut that applies what’s in the chat directly to the editor. The current method is to copy and paste.
It theams that your extension does not handle xaml editor as a code editor at all, because it is not a standard code editor, but a part of the xaml-designer tool window. It successfully seas the XAML through the solution context tool.
But I can't use completion feature in the xaml editor or automaticly modify the XAML through the Turbo window.
An other question: if I open multiple code editors in the tabs, can I change multiple files automaticly by one request by the turbo window? Or only the active editor?
Hum, ok, I will investigate more further the turbo chat integration with the xaml editor, and I will see what could be inproved.
About your another question, for now it is not possible.
@ilyapashuk, can you paste here a screenshot of your Visual Studio when you use the "Send Code" command with the XAML window?
This is because on my side it continues to recognize the XAML window as the editor normally.
By the way, are you using VS2022 or VS2019?
I'm sorry. Now I checked again, and it works properly with xaml.