Search

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Tuesday, September 24, 2019

Default keyboard shortcuts in Visual Studio for Mac

You can access a variety of commands in Visual Studio for Mac by using the appropriate keyboard shortcut. This document lists the default shortcuts for the Visual Studio for Mac key binding scheme.

Code Navigation

Commands
Keyboard shortcuts
Find References
⇧⌘R, F12
Go to Declaration
⌘D, F12
Next Error
⌥⇧⇟, ⇧⌘F12
Next Issue in File
⌥⇟
Previous Error
⌥⇧⇞
Previous Issue in File
⌥⇞

Debug

Commands
Keyboard shortcuts
Enable or Disable Breakpoint
⌥⌘/, ⌘F9
Pause
⌥⌘P, ⌥⌘L5
Remove All Breakpoints
⇧⌘F9
Run To Cursor
⌘F10
Set Next Statement
⇧⌘F10
Show Next Statement
⌥*
Step Into
⇧⌘I, ⌘F11
Step Out
⇧⌘U, ⇧⌘F11
Step Over
⇧⌘O, F10
Toggle Breakpoint
⌘\, F9
View Breakpoints
⌥⌘B

Designer

Commands
Keyboard shortcuts
Switch between related files
⌃⌘↑

Edit

Commands
Keyboard shortcuts
Constraint Editing Mode
⌘E
Copy
⌘C
Cut
⌘X
Delete
⌘⌫
Format Document
⌃I
Indent Selection
⌘]
Paste
⌘V
Preferences
⌘,
Redo
⇧⌘Z
Rename
⌘R, F2
Select All
⌘A
Show Code Generation
⌘I
Toggle All Folds
⌥⇧⌘↑
Toggle Definitions
⌥⇧⌘↓
Toggle Fold
⌥⇧⌘←
Toggle Line Comment(s)
⌘/
Undo
⌘Z
Unindent Selection
⌘[
Update Frame from Constraints
⇧⌘R

F# Integration

Commands
Keyboard shortcuts
Clear F# Interactive
⌃⌥C
F# Interactive
⌃⌥F
Restart F# Interactive
⌃⌥R
Send line to F# Interactive
⌃⌥L
Send references to F# Interactive
⌃⌥P
Send selection to F# Interactive
⌃⏎

File

Commands
Keyboard shortcuts
Close All
⇧⌘W
Close File
⌘W
Close Workspace
⌥⌘W
New File
⌘N
New Solution
⇧⌘N
Open
⌘O
Print
⌘P
Quit
⌘Q
Revert
⌘U
Save
⌘S
Save All
⇧⌘S

Help

Commands
Keyboard shortcuts
API Documentation
⌥⌘?
Unity API Reference
⌘'

Other

Commands
Keyboard shortcuts
Implement Unity Messages
⇧⌘M
Inspect
⌥⌘I

Project

Commands
Keyboard shortcuts
Add Files
⌥⌘A
Build
⌘K, ⇧F6
Build All
⌘B, F6
Clean
⇧⌘K
Rebuild
⌃⌘K
Rebuild All
⌃⌘B
Start Debugging
⌘⏎, F5
Start Without Debugging
⌥⌘⏎, ⌃F5
Stop
⇧⌘⏎, ⇧F5

Refactoring

Commands
Keyboard shortcuts
Import Symbol
⌃⌥␣
Quick Fix
⌥⏎

Search

Commands
Keyboard shortcuts
Command
⇧⌘P
Find in Files
⇧⌘F
Find Next
⌘G, F3
Find Next Like Selection
⌘E, ⌘F3
Find Previous
⇧⌘G, ⇧F3
Find Previous Like Selection
⇧⌘F3
Find
⌘F
Go to File
⇧⌘D
Go to Line
⌘L
Go to Type
⇧⌘T
Navigate To
⌘.
Replace in Files
⌥⇧⌘F
Replace
⌥⌘F

Text Editor

Commands
Keyboard shortcuts
Complete Word
⌃␣
Delete left character
⌃H
Delete next subword
⌃⌦
Delete next word
⌥⌦
Delete previous subword
⌃⌫
Delete previous word
⌥⌫
Delete right character
⌃D
Delete to end of line
⌃K
Dynamic abbrev
⌃/
Expand selection
⌥⇧↓
Expand selection
⌥⇧↑
Expand selection to document end
⇧⌘↓, ⇧⌘↘
Expand selection to document start
⇧⌘↑, ⇧⌘↖
Expand selection to line end
⇧↘, ⇧⌘→
Expand selection to line start
⇧↖, ⇧⌘←
Expand selection to next line
⇧↓
Expand selection to next word
⌥⇧→
Expand selection to page down
⇧⇟
Expand selection to page up
⇧⇞
Expand selection to previous line
⇧↑
Expand selection to previous word
⌥⇧←
Expand selection to the left
⇧←
Expand selection to the right
⇧→
Find caret
⌘|
Go left one character
⌃B
Go right one character
⌃F
Go to beginning of document
⌘↑
Go to beginning of line
⌘←, ⌃A
Go to end of document
⌘↓
Go to end of line
⌘→, ⌃E
Go to Matching Brace
⇧⌘\
Go to next line
⌃N
Go to next word
⌥→
Go to previous line
⌃P
Go to previous word
⌥←
Insert line break after the caret
⌃O
Move caret to EOL and insert new line
⇧⏎
Move the line or highlighted selection down
⌥↓
Move the line or highlighted selection up
⌥↑
Move to next usage
⌃⌥⌘↓
Move to prev usage
⌃⌥⌘↑
Show Parameter List
⌃⇧␣
Show quick info
⌘F1
Show Scopes
⌥⇧⌘P
Transpose characters
⌃T
Wrap with <div>
⌥⇧W

View

Commands
Keyboard shortcuts
Center and Focus Document
⌃L
Focus Document
F7
Full Screen
⌃⌘F
Move to Next Notebook
⌥⌘→
Move to Previous Notebook
⌥⌘←
Navigate Back
⌃⌘←
Navigate Forward
⌃⌘→
Normal Size
⌘0
One Editor Column
⌥⌘1
Show Next
⌥⌘↓, F8
Show Previous
⌥⌘↑, ⇧F8
Two Editor Columns
⌥⌘2
Zoom In
⌘+, ⌘=
Zoom Out
⌘-, ⌘_

Window

Commands
Keyboard shortcuts
Activate 1
⌘1
Activate 2
⌘2
Activate 3
⌘3
Activate 4
⌘4
Activate 5
⌘5
Activate 6
⌘6
Activate 7
⌘7
Activate 8
⌘8
Activate 9
⌘9
Hide Others
⌥⌘H
Hide Visual Studio
⌘H
Minimize
⌘M
Next Document
⌘}, ⌘F6
Previous Document
⌘{, ⇧⌘F6
Switch to next document
⌃⇥
Switch to next pad
⌃⌥⇥
Switch to previous document
⌃⇧⇥
Switch to previous pad
⌃⌥⇧⇥

macOS key symbols lookup

Symbol
Key
⌘
Command (cmd)
⌥
Option (alt)
⇧
Shift
⌃
Control (ctrl)
⇞
Page Up (Pg Up)
⇟
Page Down (Pg Dn)
⌫
Delete (Backspace)
⌦
Forward Delete
⏎
Return
←→↑↓
Arrow Keys
↖
Home
↘
End
␣
Space Bar
⇥
Tab

Saturday, September 21, 2019

Referencing an External Xamarin iOS Storyboard using Visual Studio


Storyboards feature first introduced in iOS 5 that save time building user interfaces for iOS mobile apps. Storyboards allow you to prototype and design multiple view controller views within one file. A typical remark is that storyboards are great for small projects, but fall short for larger projects.
Source code is another hurdle when working with storyboards is collaboration. A storyboard is stored as one file. This means that every change you and a team member make to a storyboard affects the same file. At some point, this will inevitably lead to merge conflicts. We don’t have any problem, when using XIB files since each XIB file represents one scene of the user interface. 
Apple introduced storyboard references in iOS 9 and macOS 10.11 with the goal of making storyboards less daunting and easier to manage. Storyboard references allow you to break a storyboard up into multiple, smaller storyboards. 
Create New Xamarin.iOS Application
In order to learn the storyboard, let’s start creating a new Xamarin.iOS project using Visual Studio 2019 or VS for Mac. When using Visual Studio 2019 on Windows machine, you will need to pair the mac machine. 

Open Visual Studio 2019 >>Create New Project or select "Open Recent Application" and the available templates will appear on a Windows like below. Select Xamarin.iOS app and click on “Next”
Create a Empty iPhone/iPad Single View Storyboard Application 
The content of a storyboard is stored as an XML file. Storyboard files are compiled into binary files known as nibs. At runtime, these nibs are initialized and instantiated to create new views. After selection of single view application, solutions template will generate as below 
Main StoryBoard:
Open Main.storyboard where you can find single view controller. Add one more view controller and update the view controllers as shown below.
View Controller Segue:
Let us now connect both the view controllers. Segue is used in iOS development to represent a transition between scenes. To create a segue, hold down the Ctrl key and click-drag from one scene to another. As we drag our mouse, a blue connector appears and select as Show/ Push as image below
Referencing Storyboard:
Let we continue to add a reference to an external Storyboard, follow the below steps 
In the Solution Explorer, right-click on our Project Name and select Add > New File... > iOS > Storyboard. Enter a Name for the new Storyboard and click the Add button
Design the layout of the new Storyboard's scenes 
Add Storyboard Reference:
Step 1: Open the Main Storyboard that you are going to be adding the reference to in the iOS Designer. Drag a Storyboard Reference from the Toolbox onto the Design Surface.
Step 2: In the Widget tab of the Properties Explorer, Enter the name (Login) of the Storyboard that you created above.
Step 3: Control-click on a Button on an existing Scene and create a new Segue to the Storyboard Reference.
 Step 4: The popup menu selects Show to complete the Segue, Save the changes and Click on Run Options 

Output:
When you run the application in an iPhone device, you will get the following output and click on button, it will navigate to new reference screen.
Summary:
This article has demonstrated how to create and referencing an External Xamarin iOS Storyboard using Visual Studio. I hope this article will help you. Please leave your feedback/query using the comments box, and if you like this article, please share it with your friends.

Getting Started with iOS Storyboards in Xamarin.IOS


Storyboards feature first introduced in iOS 5 that save time building user interfaces for iOS mobile apps. Storyboards allow you to prototype and design multiple view controller views within one file. Before Storyboards you had to use XIB files and you could only use one XIB file per view (UITableViewCell, UITableView or other supported UIView types).
A Storyboard is the visual representation of all the screens in an application. It contains a sequence of scenes, with each scene representing a View Controller and its Views. These views may contain objects and controls that will allow your user to interact with your application. 
The storyboard is a collection of views and controls (or subviews) is known as a Content View Hierarchy. Scenes are connected by segue objects, which represent a transition between view controllers. This is normally achieved by creating a segue between an object in the initial view, and the connecting view. The relationships on the design surface.
The following image shows what a storyboard looks like, and it’s similar to the storyboard you’ll build the Storyboard in the end of the article.
Create New Xamarin.iOS Application
In order to learn the storyboard, let’s start creating a new Xamarin.iOSproject using Visual Studio 2019 or VS for Mac. When using Visual Studio 2019 on a Windows machine, you will need to pair the Mac machine. 

Open Visual Studio 2019 >>Create New Project or select "Open Recent Application" and the available templates will appear on a Windows like below. Select Xamarin.iOS app and click on “Next”

Create a Empty iPhone/iPad Single View Storyboard Application 
The content of a storyboard is stored as an XML file. Storyboard files are compiled into binary files known as nibs. At runtime, these nibs are initialized and instantiated to create new views. After selection of single view application, solutions template will generate as below 

Main StoryBoard:
Open Main.storyboard where you can find single view controller. Add one more view controller and update the view controllers as shown below.
View Controller Segue:
Let us now connect both the view controllers. Segue is used in iOS development to represent a transition between scenes. To create a segue, hold down the Ctrl key and click-drag from one scene to another. As we drag our mouse, a blue connector appears and select as Show/ Push as image below


Change View Properties:
Add Controls into the view controller and Select the properties, Change the styles as per your needs 
Output: 
When we run the application in an iPhone device, we'll get the following output and click on button, it will navigate to new screen.


Summary:
This article has demonstrated how to create a iOS Storyboards using Xamairn iOS. I hope this article will help you. Please leave your feedback/query using the comments box, and if you like this article, please share it with your friends.

Wednesday, August 21, 2019

Faster Startup Times With Startup Tracing On Android

Startup Tracing can be used with Visual Studio 2019 Version 16.2 or Visual Studio for Mac 2019 Version 8.2. 
You can get started with Startup Tracing by editing your Android project’s .csproj file and adding the following property inside your Release <PropertyGroup>:
This can also be in the Android Options in your project settings starting with Visual Studio 2019 16.3 Preview 2:Enable startup tracing with a line of code.
For more documentation on Startup Tracing, see our release notes on this topic. 

Faster Startup Times With Startup Tracing On Android



Android Performance and App Size Challenge

  1. Choose one of your existing apps to enable these features with.
  2. Create a new issue in this GitHub Repository and follow the instructions.
  3. Enable the various features, log your before and after results, then submit your issue!
  4. Bonus Points: Post your results on Twitter with the hashtag #XamarinChallenge.