Resizing XAML designer for Windows Store app to preview different screen sizes - visual-studio

I'd like to preview how my app page will look with some different screen widths (full screen and several narrow layouts) in Visual Studio XAML designer. At this moment it's laid out as if for the full screen.
Is there a way to preview the page for different widths in Visual Studio?

There is a Device tool window available from the Design menu that has a list of different standard devices as well as orientation and other settings that can affect the display of your app. The same is available in Blend.

Related

Xamarin Preview window show android layout decorations

I just found out how to get Xamarin's Preview Window working (gave several errors earlier) and it's great since I worked with Android Studio before which has a live preview. However, I can't seem to find how you show the statusbar, etc. (the "Show Layout Decorations" option in Android Studio). Is there a similar option in Xamarin?
Just to be clear: You cannot have a simular effect of AndroidStudio's Show Layout Decorations in the Xamarin preview window.

Visual Studio 2017 color changes

I am trying to change colors of my VS. I am using Color Theme Editor.
And I am struggling to find few option which controls View windows background.
How do you change that background which is circled in images?
First is Solution Explorer window, and second Team Explorer.
If any one stumbles upon this, when you click Customize colors under Tools you need to switch to Show all elements view. There you need to find TreeView category. And there are all options to manipulate Solution Explorer and some part of Team Explorer.

Does Xamarin.Forms have designer support on VS?

I recently downloaded Xamarin.Forms as Microsoft made it free. I am looking around in Visual Studio for a visual designer, that is usually included in Xamarin.Droid and Xamarin.IOS. Is there no such feature for Xamarin.Forms? Surely I must be missing something ?
Xamarin does not have a designer for Xamarin.Forms at this time, but is working on the Xamarin.Forms Previewer which renders a live preview of a Xamarin.Forms page side-by-side with the XAML markup directly inside the Visual Studio and Xamarin Studio IDEs.
You can open the Xamarin.Forms Previewer by clicking on View -> Other Windows -> Xamarin.Forms Previewer in the Visual Studio menu or alternatively just searching for Xamarin.Forms in the Visual Studio quicklaunch box.
In addition to the official Xamarin.Forms Previewer, there is at least one other third party tool that exists in this space as well:
Gorilla Player by UX Divers is a real time Xamarin.Forms previewer currently in beta that runs in both a simulator and on hardware devices.
Update (2018): There is now also the Xamarin Live Player for Xamarin.Forms that allows you visualize your XAML layouts running live on a physical device as you are developing them.
No, Xamarin Forms does not have a drag and drop design surface. There is a live XAML previewer, but it is still in alpha release.
A Xamarin previewer (while not a designer, it is still VERY handy) is available in the latest version of Visual Studio. To access it go to
View > Other Windows > Xamarin.Forms Previewer.
When you open a XAML page, you can see it in the previewer (make sure your project is built first or you will get an error.)
The preview will update automagically as you edit your XAML, no save is required. When working with lists etc, you will want to create some dummy data to ensure you can see how it will work. There is an example at https://xamarinhelp.com/xamarin-forms-previewer/
There are options to view your Xamarin
Xamarin Form Previewer - you view it on visual studio
Xamarin Live Player - you can view it on the target devices
Gorilla Player - you can view it on target devices with real-time update
However all comes with limitation, if you're using third party controls than it may not be supported.
You can find a "Design" named button under your source code. Click on it and you will be able to use drag and drop from the tool box on the left.

Zooming in the visual studio form designer

I'm using the Visual Studio 2013 form designer to edit a form. The size of the form in the designer window is too big so I want to zoom out.
In applications like Photoshop or Blend I could (among other things) use the keyboard shortcut Ctrl-0 to fit the design to the screen.
In Visual Studio how do I zoom out in the form design window?
The Windows Forms designer doesn't zoom. The WPF one does because it's vector based, but WinForms is pixel based you don't get the zooming.
If you've got multiple monitors you can drag the designer to a second screen and work with it that way, or you can press Alt+Shift+Enter to toggle full screen and work with it that way.
in VS 2022 I've been doing some C# and had the same problem with the default grid element (the form) being zoomed way out in the Designer, so it looked extremely small, and the controls were super tiny. I found the following Microsoft page that explains how to change the zoom feature (yes, Visual Studio 2022 has a zoom feature). https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-set-grid-options-for-all-windows-forms?view=netframeworkdesktop-4.8
So, I went into the Tools menu, down to Options, and then in the Options window I scrolled down to the XAML Designer General option. I changed the "Zoom by using" setting to "Mouse Wheel". Using "Ctrl + Mouse Wheel" didn't work for me. And I changed the "Default Zoom Setting" to "Last Used". I closed VS and opened it again. "Last Used" didn't work for me. So, I changed the "Default Zoom Setting" back to "Fit all". Closed VS again (you need to do this for the new settings to take effect). Opened VS again. And everything worked. I am able to use the mouse wheel to zoom in and out of the form. The settings I'm using are "Mouse Wheel" and "Fit All".

Does Visual Studio 2010 let you edit icons?

When I double click on a .ico file in Visual Studio 2010 (Professional), it opens what looks like an icon editor. It looks like it should be really easy to pick a color from the left and edit pixels.
But my mouse is a magnifying glass icon. Left click, right click, all they do is toggle zoom on the icon. I can't figure out how to do anything useful.
Am I missing something obvious? Is this icon view as useless as it seems?
You can't directly edit 32-bit color icons but you can convert them manually to 24-bit :
Right click > Add new icon
Open your Icon1.ico file.
Right click > New Image Type or press Ins to open the New Icon Image Type dialog.
Select the format you want, say 96x96, 24 bit or add any custom size and color depth.
Then copy/paste from your 32-bit icon file and save.
Et voilĂ  ! You can now edit your 24-bit color icon.
Doh! I needed to enable View -> Toolbars -> Image Editor.
Thanks to #detale.
The icon is built by an external app.
For Visual Studio 2008 & 2010 image editor,
"Using the Image Editor, you can view 32-bit images, but you cannot edit them."
http://msdn.microsoft.com/en-us/library/s1dadd79.aspx
For the PNG images used as button icons that Visual Studio cannot edit you can use external editor as MS Paint.
open PNG in Visual Studio 2010
right click on the white canvas -> Open External Editor
Visual Studio can edit icons, but not 24-bit color icons.
If you have a Mac OS X machine around, you can edit Windows icons with the Icon Composer application included with the free Developer Tools.
I just discovered this accidentally while working on some cross-platform Mac/Windows code.
I finally found an easy way to do it without visual studio, GIMP
https://www.gimp.org/downloads/
Visual Studio 2022 (available free) has an icon editor built in. Just in case you end up here because you tried to insert a colourful image into a a 256x256 24 bit icon and your colours get messed up: in the editor toolbar on the top right there is a selector for opaque/transparent background, but only when you have a rectangle- or irregular area selection tool active. Default backgroundis set to transparent, you need to set it to opaque to retain your image. (There's a special colour for transparency; though my image does not contain that the colours were wrong)

Resources