How to set default XAML view in Visual Studio 2008 - xaml

In Visual Studio 2008, when you add a new XAML window to a WPF Application Project, the default view you get is "split view" where the visual designer and the XAML code are shown one above the other in the same document.
I prefer an alternative view which you can get by double-clicking on either the Design or XAML tabs. The visual designer and the XAML are in separate side-by-side tabbed views. This makes it easy to switch between them
I want to know if it possible to make this the default view for all new XAML documents I add to my project, and where in the options you would set it.

Tools/Options/Text Editor/Xaml/Miscellaneous, check the "Always open documents in full XAML view"

Related

Applying a theme for a Telerik RadMultiComboBox

I have a vb.net application with many data-entry forms. On some of these forms a Telerik RadMultiComboBox control is used. I want the VisualStudio2012Light theme applied to all of these controls. I have no trouble applying the theme on all forms but one. On that one form, VisualStudio2012Light is not an option. I change the theme thru Properties...StyleSheet...ThemeName in the Visual Studio designer. I can manually enter it by typing it in but it does not stick and goes back to the default theme.
Using Visual Studio 2022 and version 2022.2.622.40 of Telerik.
What am I doing wrong?
If you are using RadForm, the ThemeName property should work. You can drag-drop the VisualStudio2012Light theme from the ToolBox to the RadForm. Check the following image: enter image description here
Then from the Visual Studio Properties window, you can navigate to the ThemeName property and set it to the desired theme. The last step is to apply the theme to all controls from the smart tag of the RadForm. This should do the trick:
enter image description here

VS 2022 Preview not showing the XAML designer

I've just installed VS 2022 preview to use Maui but there seems no way to see a designer view of the XAML, I want to drag and drop controls onto the page but all I get is an ancient looking XAML text view.
Visual Studio has removed the XAML designer. For now, there is no official plan to readd it.
But Visual Studio support Hot Reload to modify your apps managed source code while the application is running, without the need to manually pause or hit a breakpoint. You could preview the view at runtime when you change the UI. For more details, please check the blog. https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/
Like Cfun said, you could use live visual tree as well. It shows a tree view of the UI elements of your running Xamarin.Forms application. https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/live-visual-tree
For a WPF dotnet6 project, the XAML designer can be enabled here:
Don't know why it's disabled by default.

Understanding how Cross-Platform App starts and uses xaml pages

(I have experience with MVC, WebForms, WinForms. I am getting started with Cross-Platform App projects.)
I created a Cross-Platform App project including Xamarin.Forms.
Visual Studio created 4 sub-projects:
"MyProject"
"MyProject".Android
"MyProject".iOS
"MyProject".UWP
I suppose that I actually have to develop most of my project in "MyProject" except for UI specifics things?
Then I have two questions:
Where is it written in "MyProject".UWP that it has to display "MyProject"\MainPage.xaml?
Why can't I view "MyProject"\MainPage.xaml in designer mode?
I think I found both aswers:
Where is it written in "MyProject".UWP that it has to display
"MyProject"\MainPage.xaml?
Somewhere in "MyProject".UWP\MainPage.xaml.cs is the line MainPage = new MyProject.App(); and in "MyProject".UWP\App.xaml.cs is MainPage = new MyProject.MainPage();
(For those not used to work XAML files: the .cs code can be viewder click on the arrow left to the XAML file.)
Why can't I view "MyProject"\MainPage.xaml in designer mode?
According to https://developer.xamarin.com/guides/xamarin-forms/troubleshooting/questions/forms-xaml-designer/
Possible answer: "There is not yet a visual designer for generating XAML in Xamarin.Forms applications, so all XAML must be hand-written."

Why is the Xamarin.Forms toolbox view empty?

Visual Studio for Mac 7.0
I'm a new to use the Ide
image
in the picture,the toolbox is empty。
I entered it by hand
<Button Text="ok"/>
No code hints
How can I solve this problem?
This is working as expected. There is no visual designer for Xamarin.Forms. XAML must be written manually. You can however use the XAML previewer to assist you.
The Preview button can be displayed on the editor by right-clicking a
XAML file, and selecting Open With > XAML Viewer. The preview pane can
then be shown or hidden by pressing the Preview button in the
top-right corner of any XAML document window
Information about the previewer can be found here: https://developer.xamarin.com/guides/xamarin-forms/xaml/xaml-previewer/

Is there a way to automatically reformat Blend's XAML view?

Blend tends to create its XAML in very long lines.
Is there a way to reformat it so that the properties of each element are lined up vertically under each other?
There isn't a feature in Blend that will autoformat XAML. I usually do xaml formatting with Visual Studio.
Another option is to paste your XAML into Kaxaml and use its excellent XAML scrubber, then paste the result back into Blend.
You can see a demo on Channel9: http://channel9.msdn.com/shows/Continuum/Kaxaml/
You can do it by using Visual Studio:
Change the default settings for XAML documents, and then use CTRL+E,D (Edit | Advanced | Format Document) or CTRL+E,F (Edit | Advanced | Format Selection).
http://weblogs.asp.net/fmarguerie/archive/2008/06/07/xaml-markup-formatting-in-visual-studio.aspx
Or try xaml styler hosted at http://xamlstyler.codeplex.com/ for visual studio 2010. If you ever used Kaxaml's Xaml Scrubber and you like it, then you could think of this extension is the "Xaml Scrubber" for Visual Studio.
Check http://xamlstyler.codeplex.com/ for feature highlights.
Go into Visual Studio. (I'm using 2012).
Tools > Options > Xaml Styler (at the bottom)
Under Misc
Set Beautify on saving xaml to FALSE
You can now save your xaml however you like, and it will stay like that.