How to move CodeLens references indicator? - visual-studio

I don't like it this way:
It stretches code and reduces readability. Is there a way to move it to the right side and maybe even change "references" word to some icon, like this:
I researched this question, this type of question has been asked multiple times with similar suggestions to move indicator to not add lines in order to not stretch code:
https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/5120120-move-code-lens-to-the-left-side-instead-of-above-m
https://github.com/Microsoft/vscode/issues/23652
Display CodeLens above attributes
But Microsoft decline it every time for some reason and I couldn't find any solution to this problem.
Did someone figure out how to move CodeLens to the side yet?

Related

How to quickly snap a view in storyboard back into its constraints after accidentally moving it

Everything I have found, every one says this cant be done.
I studied in fullsail university and they taught me how to do this so I know without a doubt it can be done. No one just knows how and assumes it can't.
Basically, when in XCode-story board, I would add constraints to a view and everything is all blue and perfect. From there, if you click, hold a drag, the view to another position then all of the constraints will turn orange. (Not RED because the constraints are still good it just simply needs to snap back into place..)
When in school my teacher taught me a quick key short cut that you press and everything snaps back into place and its all blue again. It has been a while since I have coded and i am just now getting back into it again and i just cant remember what that shortcut was.
I hope someone out there knows how to do this. Maybe any fullsail graduates?
Your responses are greatly appreciated.
I figured it out.
option + CMND + '='
What you're looking to do is referred to as "Update(ing) Frames."
The quick command is indeed option-command-equals
The command can also be reached from the bottom menu of a storyboard.
This link may change in the future but check out the Auto Layout Guide. Specifically reference the "Resolve Auto Layout Issues Tool" section.

CPropertySheet: How to get the child page from OnDrawItem

I've added some code as found here Big problems with MFC/WinAPI to colour tab titles the same as the reset of the dialog, which works, but unfortunately all the tabs end up with the same name. This doesn't surprise me all that much as GetCurSel() is used to grab the text to use, and only one tab can currently be selected, but I'm struggling to see how you access the correct tab index from OnDrawItem().
I've googled and had a look on MSDN but don't see how anything passed to OnDrawItem lets you know which tab is currently being drawn, rather all the examples I've seen assume you're only interested in the one currently selected. All I want to do is something along the lines of GetWindowText() on the child window and redraw with that. I'm also unsure of the parent/child/sibling relationship between the sheet, tab control and page - it depends who you listen to.
I should probably add that I'm also unsure why all the tabs are redrawn when I select one. I don't know if this is normal or something specific to this implementation (that's something I'm looking at, but like seemingly everything else in this code base it's multiply inherited several times over ...).
Cheers for any help.
Not to worry, I now realise lpDrawItemStruct->itemID holds the tab index so I can get a handle to the tab using that.

ToolTip while Drop Down ComboBox

I have created a combo box in my project which takes a certain amount of numbers from a file.
This Combo drops down the list of the numbers each of represents something.
That something I want to be displayed in a tooltip when the mouse hovers on the combo box.
Until now everything has gone fine.
What I want now is to see the tooltip when the mouse rolls over the list of the dop down combo.
How can I do that? Until now the internet didn't give me something to work on it.
Is there some one to assist me on that?
Is this the sort of thing you're looking for, where a tooltip appears over a ComboBox item you mouse over?
If so take a look at this article on codeproject.com:
A Windows.Forms.ComboBox with Item ToolTips for 32 bit Windows XP (SP2)
It's VB.NET and currently displays a ComboBox item's text when moused over; I'm sure you can adapt it to your specific needs.
Finally I solved the issue with Combo Box which I mentioned on this question.
Of course there is no any solution give it from Microsoft for it, but with a small trick we manage to do what we want to do from one hand, and nobody seams to understand HOW we did it from the other hand.
So if anybody wants to see this solution please set a question and I will try to answer immediately.
For "bad and worst" please put a comment on this question.
My code is in vb.net.

Visual Studio - Splitting so that Design mode is on top

VS2008 seems to have a new feature that allows one to split a website into the source code and design aspects on the same page. This feature seems great, however it defaults to having the design part on the bottom half of the screen and the code part on the top half.
Unfortunately, my brain doesn't work this way and it ends up being more of a hassle than to just continue switching back and forth when needed like I've done in the past.
Is there a way to swap them so that the design part is on the top and the code part on the bottom? Most other tools in VS are drag and droppable, so I can't see why not, but I'm not finding the setting anywhere. I did a quick google search and found a way to make the split vertical, but thats not what I'm looking for. I'm just looking for the same horizontal split with the design part on top.
Thanks
Here's an alternative approach that may help. If it's a traditional .aspx page (one that has a codebehind), you can open both documents simultaneously. Then right click one in the tab area at the top and select New Horizontal Tab Group. You can manipulate it so that the design window is on top of the code window.
I would be very surprised if this possible, since I have never seen a window configuration that changes the vertical alignment of the Objects and Events drop-down-lists.
I could be wrong, though.
It does seem rather strange - in the xaml designer you can split the screen whichever way you want as there is a button to switch the position of the panes. The options for the html designer only seem to allow a vertical or horizontal split though, there isn't anything in there specifying whether to have code or design at the top, it does seem a little backwards as I imagine most people find it more natural to have the visual designer at the top with the code below.

Preferred UX for an empty-but-selectable item in a menu

In a project I'm working on, we have a nav menu where items are colored when the relevant section has information beneath it, or faded when there's nothing available to the user. In the case of an admin, these items may have no useful information but may still be clickable (since things like "Add news item" or "Add file" are implemented as sub-menus).
The call from On High has come down to make these admin items stand apart somehow. Since we're already using the faded text for unclickable items, I was wondering if there's an established UI convention for denoting that an item is clickable, yet contains no information.
And yes, I've already asked why we're bothering to show items that aren't available to the user. The short of it: because On High wants to.
Short answer, no I don't think there's a convention for this. Lots of people would say if its not applicable, don't show it. However, there's some debate on this. One of the reasons Microsoft started using The Ribbon in MS Office is because they wanted to get away from dynamic menus where options hid and showed 'intelligently'. Users couldn't figure out the rules for what appered where, and when.
Maybe separate the concerns here: 1) how to indicate the item is clickable, and then 2) how to indicate the item contains no information.
The first one is relatively well established -- blue underlined text. You can also make it look like a button Of course, if you've got a site-specific look for your hyperlinks, use that. Basically don't break the users' expectiations of what things are clickable.
Second, how to show there's nothing there worth clicking on. I think what you want is some visual indication of the priority/utility of these admin links relatively to others. Some options:
Can you move the admin links to the bottom of a list?
Add a number indication how many things are on the other side of the link?
Strikethrough on the text?
Since there are no hard-and-fast conventions on this sort of thing, just remember that anything you do which is consistent will work. Some things will just work better than others.
No matter what you choose, the user will learn after a few tries what the new method of empty indication is.
If it is well thought out and consistent, they will probably get it after a couple of clicks.
Also, remember that too many highlights, colors, fades, and underlines will wash out any amount of effectiveness at visually organizing your menu so it is easy to use. At some point it can actually get harder to use by over-organizing things.
Think about it this way: There are two boxes sitting on a virtual shelf. One is red and the other is blue. The selected box is identified by a differing color than the other box... Now, which is the selected box?

Resources