Desktop icon scale to fit when zoomed - c#

I have a problem where my icon doesn't scale to fit when I zoom in on it when it's on my desktop.
Followed by when I zoom in.
How can I make sure the image for my program scales as well?
It does scale down, but it stops scaling up after it gets to its default size.
I'm using Visual Studio and my software is done in C# WPF.

This has nothing to do with code. Your *.ico File is missing the supported images.
The *.ico icons can have different images for multiple sizes, eg. 16x16, 32x32, 48x48, 128x128, 256x256.
There is this question on SuperUser how to embed them.

Related

How to scale window according to screen resolution in UWP?

I am new to Stackoverflow as well as UWP (My English is regular too). I apologize in advance for my bad writing.
I am developing a windows application in UWP/C#. My monitor size is 23' and it is set to 1920x1080 (100%) resolution.
As seen in image 1, I have configured the application in such a way that the size of the main frame is 1920x1080, therefore, when I run the application on my computer it looks perfectly (see image 2).
However, when I run the application on another computer with a smaller screen size (17 "), it looks like in image 3, where it can be seen that the application does not fit this size. It seems to keep the original size and mi application "does not fit on the screen".
My question is: how do I program the application so that it does not lose its shape, distribution, aspect ratio, or proportion when it is run on screens that are different in size from the computer on which it was programmed? In this way, it automatically adjusts to the resolution and scale of the screen, without losing the original proportion and distribution with which it was programmed and designed.
Thank you very much for your help and understanding.
EDIT 1: I am not looking for the content of the application to fit a change of the window, but rather to fit screens of different sizes. That is, the same content, distribution and proportion are scaled to fit on any screen size, as evidenced in image 3 that does not happen. (see Image 4)
I don't want the image 3 to happen.
The control doing exactly what you want is called ViewBox, but as people already suggested above, it would be better to design adaptive UI using triggers or at least grids.

Wrong size of "unplated" icon is used

I am writing a UWP app that includes an "unplated" icon at the 32x32 size (file name Square44x44Logo.targetsize-32_altform-unplated.png). I also have the same icon at the 24x24 size (file name Square44x44Logo.targetsize-24_altform-unplated.png). I also have the same two sizes in non-"unplated" variants. However, when I build and run my app, the icon used in the taskbar (and only the taskbar) is of an incorrect size. The 24x24 icon is used, instead of the 32x32 icon, resulting in the icon appearing visibly smaller than the others in the taskbar. See picture below.
I have followed the advice in this question, to no effect.
The 24x24 icon is used, instead of the 32x32 icon, resulting in the icon appearing visibly smaller than the others in the taskbar.
Your icon looks smaller than others might because it's rectangle. It has fewer number of pixels on the vertical, showing it in a "unplated" fashion would make it "looks" smaller.
Below is a screenshot of the zoomed image, it shows that your icon has the same width with another two icons.
In this case, I suggest you using the “plated” icon to see if your icon is the same size of others.
Windows 10 introduces an evolution of the existing scaling model. In addition to scaling vector content, there is a unified set of scale factors that provides a consistent size for UI elements across a variety of screen sizes and display resolutions.
For more information, see to Guidelines for tile and icon assets.

Form icon resized wrong

There is quite a lot of discussions about icons in .NET and they still seem to give different people different problems. Still I dind't find an answer for my case.
I'm writing an application in Visual Studio which runs in Windows 7.
I set application icon in Project/Properties/Application. Nope, still default icon used in taskbar.
So I read that I should set the same icon for the form too.It works now, but still not perfect.
If I use icon 48x48 pictures it looks okay in taskbar but is badly resized to 16x16 at form's top.
If I use 16x16 it looks okay at form's top but is badly resized with big square pixels in taskbar.
Is there any way to set two different icons for a form? one for form's top and another for taskbar? Or maybe some other approach would work?
You need to use a .ico file that contains multiple versions of the icon. The system embeds in your executable file these different versions in what is known as an icon group using the RT_GROUP_ICON resource type.
The documentation on MSDN list the sizes that are required to be included in the icon:
Application icons and Control Panel items: The full set includes 16x16, 32x32, 48x48, and 256x256 (code scales between 32 and 256). The .ico file format is required. For Classic Mode, the full set is 16x16, 24x24, 32x32, 48x48 and 64x64.
Note that the 256px icons can (and should) be PNG icons to keep the size manageable.
You'll need to find an icon editor that can make .ico files that contain multiple versions of the image.
You might find this question helpful: Which icon sizes should my Windows application's icon include?
An icon file (.ico) can contain many different sizes of icons
Wikipedia Reference ". ICO files contain one or more small images at multiple sizes and color depths, such that they may be scaled appropriately".
So you need to specify all sizes you want to display cleanly. Namely: 16x16, 32x32 and 48x48
Get yourself a copy of IcoFx of another good icon editing program that allows multiple sizes (and colour depths) to be saves into one ico file

Resizing fonts for current display

I'm developing windows 8 application and I have got problem with resizing fonts. For example on big display (with big resolution) fonts are too small to read from distance. Is there a way to resize them - I want to have also option in settings to make fonts bigger/smaller.
You can make use of the bottom app bar to increase the front size and you can also make use of the viewbox control which will help you resize the front depending on the resolution of your screen.

Icons in WinForms

I created an icon with two different image sizes in it:
one 16x16 with 24bpp
one 32x32 with 24bpp
using the icon editor in Visual Studio.
I had hoped that when used by a form (the Form's Icon-propery) I would see the 16x16 version in its upper left corner and the 32x32 version on the task bar. Unfortunately, the 16x16 version is used in the task bar as well.
So my question is simply: how can I persuade Windows to make a "better" choice between the differnt sizes in my icon file?
Import the different sized images into Gimp as layers. Make sure the larger icon is the top layer. Then you can export as .ICO and Gimp will make one file containing multiple icons.
Change the order of the image in .ico file: Biggest -> Smallest.
To have the best quality of an icon for any use, I will create the largest size. This size is 256*256. It will help you to have a better quality, except smaller size that the windows won't manage them as unique, So try to create 256' , 32' and 16' separately as images and combine them as .ico file.

Categories

Resources