Visual studio and VS Code shortcuts side by side, Daily useful command
Ashish Khare
Below is useful list keyboard short cuts of
Visual Studio and VS Code, which I am using in my daily work J
Visual Studio |
Visual Studio Code |
Description |
Ctrl + , |
Ctrl + P |
Navigation or go
to File |
Ctrl + K + D |
Shift + Alt + F |
Format Code |
Ctrl + X |
Ctrl + X |
to remove a line |
|
Ctrl + ` |
toggle terminal |
Ctrl + F5 |
|
Run/Start without
debug To reflect new
changes just build and refresh browser |
Ctrl + Shift + B |
|
Build |
|
|
|
9/17/2020 11:23:00 am
KeyboardShortcuts
,
VSCode
How to debug Angular app in Visual Studio Code
Ashish Khare
To debug Angular app into Visual Studio Code Please flow below step:
Note: These are only one time activity
Lets start your Code Editor
Step 1 - Goto Extension options OR Press - Ctrl + Shift + X
Step 2 - Type on Search - "Debugger for Chrome"
Step 4 - Now Press F5 and Select Chrome from option list
Hide Default Context menu from CefSharp Chromium Web Browser
Ashish Khare
To hide Default Context menu you need implement IContextMenuHandler.
Add below class into your project
public class MenuHandler : CefSharp.IContextMenuHandler
{
public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model)
{
model.Clear();
}
public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags)
{
return false;
}
public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame)
{
}
public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback)
{
return false;
}
}
Use MenuHandler into browser
ChromiumWebBrowser browser = new ChromiumWebBrowser();
browser.MenuHandler = new MenuHandler();
9/16/2020 01:08:00 pm
CefSharp
,
ChromiumWebBrowser
CefSharp web browser chromium - Context menu doesn't disappears after click besides menu
Ashish Khare
Again i am back with solution of cefSharp meue control :)
Problem : Context menu doesn't disappears after click besides menu
Solution : to solve this issue, we need to create our own custom menu and this to browser menu handler.
Step 1. Please refer this git hub class MenuHandler Add it to your project.
Step 2. Now for this you need install "MvvmLightLibs" from Nuget package.
(Please refer How to add nuget package)
Step 3 . How to use MenuHandler
ChromiumWebBrowser browser = new ChromiumWebBrowser();
browser.MenuHandler = new MenuHandler();
new menu will have white background to set gray background add below 2 line in RunContextMenu while creating menu object.
var converter = new System.Windows.Media.BrushConverter();
menu.Background = (System.Windows.Media.Brush)converter.ConvertFromString("#F2F2F2");
Happy Coding!!
9/16/2020 12:35:00 pm
CefSharp
,
ChromiumWebBrowser
How to add Nuget package into your Project/Solution
Ashish Khare
To add NuGet Package - Right Click on your project/Solution and select Manage Nuget Package, like below.
Now search package which to want to add into your project like below and select and click on install.
9/16/2020 12:28:00 pm
Nuget
How to host web site in IIS
Ashish Khare
IIS (internet
information services) is a server provided By Microsoft to host web site. Now
we are going to learn how to host simple HTML website in our local host (IIS).
Thanks..
Step1- Design a page with simple HTML.
Open Text-Editor (Notepad) and past blow html code.
<head>
<title>
How to Host web site in IIS
</title>
<body>
<h1>Hello World.!!!!</h1>
<p> My demo site is ready with IIS (internet
information services) </p>
</body>
</head>
Save file as index.html
in any new directory, like I created “C:/IISDemo”.
Step2- Open IIS
First check your IIS is working or not, to check open
any browser and type localhost in
url and press enter. If IIS is working properly blow iis image will show.
And if IIS is not working so first install IIS , For
install visit here
Ok then Press windows key + R.
Type inetmgr
and press Enter.
IIS Manager will open.
Step3– Expand left side connection and find “Sites”.
Then Right click on “Sites” and select “Add Web Site…” Add Web site window will open.
Step4–
Type Site name - in demonstration “IISDemo”
Type Site name - in demonstration “IISDemo”
Select Physical
path - browse and select directory, which is having HTML file. In
demonstration “C:\IISDemo” .
Type any free port
for our site. In demonstration “5455”.
Click on OK.
Step5– Right Click on IISDemo and than Manage Web
site, and then click Browse.
Your website is ready, you can past any working
template in C:/IISDemo and check it again.
6/08/2014 11:22:00 pm
IIS
How to Reset IIS (Internet Information Services) in 2 steps
Ashish Khare
Reset
IIS
Step1- Press windows key + r OR click start and type run in search, click Run at the top of search
Step1- Press windows key + r OR click start and type run in search, click Run at the top of search
Step2- In the Run text box, type IISReset, and then click OK
Window will open to show status of
IIS
Your IIS will be reset successfully.
Thanks For giving your precious time.
5/28/2014 11:06:00 am
IIS
How to Configure or Install IIS in windows 7
Ashish Khare
Configure
IIS
Step1 - On the Start menu, click Control
Panel
Step2 - Click on
Large icons. Or Skip this step if you don’t see this window.
Step3
– Find Programs and Features and Click on it.
Step5
– Scroll
down and find Internet Information Services, Expand it and Checked all options
of IIS.
Note:
- Check all
carefully, if anyone is not checked you may get problem future.
Step6
– Click Ok.
And wait for Changes.
Now check your IIS is working or not, to check open any browser and type localhost in url and press enter. If IIS is working properly blow iis image will show.
Now Press windows key + r OR click start and enter run in
search, click Run at top of search.
In Run text box, type inetmgr, and then click ok.
Thanks For giving your precious time.
5/27/2014 11:56:00 pm
IIS
Subscribe to:
Posts
(
Atom
)