Power Commands for Visual Studio 2017 doesn't format XAML? - xaml

I couldn't find any documentation on this but I use Power Commands for Visual Studio with the Power Commands to format my document when I save. And I really love this tool. But for some reason it won't format XAML code. Even though I can format XAML using the known ctrl+k, ctrl+d command.
I thought it would just format anything that would be formatted when using ctrl+k, ctrl+d, but apparently it doesn't? How can I fix this? Is there another workaround so I can save AND format XAML with one command?

Related

Is there a way to change the VBA editor's own font?

In the red range, the font is different from the system font. The system font is Microsoft YaHei UI, but these parts of the font is SimSun.
Is there a way to change these parts of the font?
Or is there a way to beautify the VBA editor? VBA editor is not pretty.
Check out [Tools] -> [Options] -> [Editor Format] - in there you can set the fonts used for various elements of the VBE.
I have an alternative solution.
VBA editor is ugly and doesn't have good intellisense. In addition, VBA is not fast.
These are reasons to prompt me to use Python+xlwings.
When I can use Python, beautiful editor UI and good intellisense I can get easily.
The most important, Excel operations will be faster.(numpy, pandas, etc can be used)
I am using xlwings to make Python operating Excel.
From the pictures, do the same operation to Excel, Python+xlwings only need 4s, but VBA needs 31s.
So if someone can use a little Python, I recommend using Python+xlwings to operate excel.
The VBA editor UI is based on Windows system fonts. You need to edit the windows registry keys to make the required changes, see How to change the default font in Windows® 8.1

How do I adjust the column ruler in Visual Studio 2017 for Mac Community Edition?

The column ruler defaults to the 80th character which is way too small. How do I adjust this? (I circled it in red below)
I tried looking for extensions, but according to this post I can't install things like Productivity Power Tools that give me the option to adjust this.
Is there a plist file somewhere that I can edit?
This issue is super frustrating to me, so any help is greatly appreciated.
You can configure this in the preferences dialog. Select Source Code - Code Formatting. Then select the type of file you want to configure. Most code formatting styles inherit from Text file so you may just want to select that.
Then change the Desired file width setting. By default it is 80.
I have checked all settings in Visual Studio 2017 for Mac and I don't find any settings could change the column ruler's size. And I also searching in Visual Studio -> Extensions in Visual Studio for Mac, there also doesn't have such extension could adjust the column ruler.
So I submit this requirement to Visual Studio for Mac User Voice site. You could vote it and add comments from below link.
https://visualstudio.uservoice.com/forums/563332-visual-studio-for-mac/suggestions/31250842-column-ruler-size

Use photoshop in command window hiddenly

Is there a way to use Photoshop to convert image from command line.
for example :
Photoshop.exe -convert c:/img1.tif c:/img1.png
I want to run this command from command line, without opening Photoshop application.
I don't want to see Photoshop window.
Photoshop.exe -convert c:/img1.tif c:/img1.png
Won't actually do anything. Photoshop Scripts work in three flavours; Visual Basic, JavaScript and Applescript. There are no commands to "convert" between file types. You can write a script to save a .tiff to a .png BUT it will involve opening the Photoshop application.
I think you're actually after imageMagick - which can do conversions like the one above.
You can use ImageMagick, which is available for Windows from here. The command you want is convert like this:
convert c:\img1.tif c:\img1.png

How to Pretty print VBA code?

How do you copy VBA code into a Word document and retain the VBA editor color scheme?
You can use Notepad++ to accomplish this in three ways. Just so you know, Notepad++ is a more advanced version of Notepad, which supports syntax highlighting of different code files "out of the box" - Visual Basic included!
Download & install it, fire it up, and load up your VBA code. You should automatically see it beautifully coloured (if not, because the file extension is something other than .vb, go to Language -> VB or Language -> V -> VB).
If you need to change any of the colours, you can easily do so - just go to Settings -> Styler Configurator. From that menu, you can change the various highlighting and font options, to suit your needs - although the default usually suffices for most.
Then, go to Plugins -> NppExport. From there, you have three options you can consider:
Directly print from Notepad++
Copy all formats to clipboard
Export to RTF
Export to HTML
The first is self explanatory. The second one - "Copy all formats to clipboard" - will copy the entire file with the highlighted syntax to the clipboard. Once you click it, then open Microsoft Word or your other favourite document editor, and just hit paste! You should see the beautifully syntax-highlighted code. If something goes wrong, then you can try one of the other options (export to RTF/HTML), although I've never had a problem with the clipboard method.
There are two programs on cnet downloads, which are free to try. In case you did not try them, here are the links:
VB-VBA Code Formatter & Printer 2.2
VBAcodePrint 6.13.110
Smart Indenter could be what you're looking for? You'd load the result into Notepad++, set language to VB and save as .rtf/.doc (or print to file, can't remember off the top of my head).
For a more modern approach, Sublime Text users can install ExportHTML from Package Control. This has the added benefit of being able to include the line numbers, and changing the code coloration.
HTML files can be opened directly within Word.
Highlight supports a wide range of Operating Systems and 150+ languages including Visual Basic, although I'm not sure about VBA.
I would recommend this one: planetB
It works well with Internet Explorer (didn't work wit Firefox for me, not sure abt Chrome).
Plus it's online, so no need to install anything (the case of Company/University PC's)
Regards
Wheeliam
The following works with Visual Studio Code:
Start VS Code.
New file.
Copy & Paste the VBA code into the VS Code window.
In the lower right-hand corner, click on "Plain Text" and select "Visual Basic" instead. Note that the code is now syntax-highlighted.
Copy & Paste the formatted code into Word.

Creating a dataset.designer.vb from XSD

I have an .xsd, .vb, .xsc, and .xss file for a dataset in Visual Studio 2008 that I copied over from another Visual Studio project, however I need to make changes to the dataset. Thus I got into the XSD file, created new columns, deleted ones that aren't needed, etc., etc. However I realized when I attempted to use the new dataset I did not have the Visual Basic code behind the scenes. This code is typically found in dataset.designer.vb. When I copied the old one over of course it was no longer valid since columns changed.
How I can force Visual Studio 2008 to use a .xsd file and to have it create/update its designer code?
You just have to exclude your .xsd file and include it again. It will regenerate your designer.vb file.
I don't know if this is still a common problem for others, but I did find an answer (I think). Click the .xsd file in Solution Explorer. Update the "Custom Tool" property to "MSDataSetGenerator". This will automatically regenerate the *.Designer.vb file.
You can right click the .xsd file and select 'Run Custom Tool' to regenerate the dataset.designer.vb file.
THANKS for the help, in the end I JUST was able to get a dataset.vb file generated using the xsd.exe tool. It works for now, however, I still think something isn't set right in Visual Studio 2008 or at least the "Generate Dataset" menu option from the context menu on an XSD file is gone.
I'll just need to remember that if I modify the XSD file from here on out that Visual Studio isn't updating the .vb file automatically, I'll probably get stuck with reusing the xsd.exe program.
For others the command is (using Visual Studio 2008 Command Prompt Window Tool, in Admin mode if using Windows Vista).
xsd.exe /d /l:VB "XSD FILE LOCATION PATH"
/d means create a dataset code. /l is the language.
The .vb file will be created in C:\Windows\System32.
Unfortunately, this is in the gray area of things things that I can do when I need to, but I haven't needed to do enough to impart the knowledge to others.
All I know is that *.designer.vb means that this code was generated by Visual Studio, and if it generated it once it can do it again. Additionally, the very few times (maybe twice, both in Visual Studio 2005) that I have done this, it seemed like it was as simple as adding the *.xsd file to Solution Explorer. If that alone doesn't do it, try showing all files or right/double clicking on the *.xsd.
Just delete the extra designer.vb file created when u add the xsd file.