Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links


Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories


Post Categories

.NET Framework


Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

aprile 2010 Blog Posts

"XAML Code Snippets" addin for VS 2010 updated to target RTM

Some time ago I published onto CodePlex a new addin for Visual Studio 2010, named "XAML Code Snippets", which provides custom support for adding and exporting XAML code snippets in the WPF and Silverlight XAML code editor. Now I updated the source code in order to target VS 2010 RTM (also fixing some minor bugs). You can find it here. Also the addin has now a page on the Visual Studio Gallery, available here, meaning that can be found via the Extension Manager dialog in Visual Studio. Your feedback would be really appreciated. Alessandro

posted @ lunedì 26 aprile 2010 00:34 | Feedback (103) | Filed Under [ Visual Studio 2010 Visual Basic Silverlight/Windows Phone Windows Presentation Foundation ]

XAML Code Snippets

Provides support for adding XAML code snippets in the Visual Studio 2010 code editor for XAML in WPF and Silverlight projects. The addin has been written in Visual Basic 2010 and actually targets Visual Studio 2010 RTM. It uses and creates classic .Snippet files for XML syntax. At runtime the XML markup is simply pasted as XAML in the code editor. You use it as follows: 1. to insert a code snippet, right click the code editor and select Insert XAML Code Snippet from the context menu: 2. in the appearing dialog select the folder containing your XML .Snippet files and then select...

posted @ domenica 25 aprile 2010 01:00 | Feedback (0) | Filed Under [ My CodePlex projects ]

WPF: Initializing My.User

If you use the My namespace from Visual Basic in WPF applications, especially the User object which allows accessing properties about the logged user, you might encounter a small problem. While in Windows Forms the following line returns the user name in the form of Domain\UserName: Dim userName As String = My.User.Name in WPF the same line of code returns an empty string. So, how can we solve this? there are basically two solutions. The first one is initializing My.User as follows: My.User.InitializeWithWindowsUser() 'then invoke My.User.Name Dim userName As String = My.User.Name The second solution is utilizing the WindowsIdentity class as follows: Dim userName As String = System.Security.Principal.WindowsIdentity.GetCurrent().Name If you like...

posted @ giovedì 22 aprile 2010 12:47 | Feedback (0) | Filed Under [ Visual Basic Windows Presentation Foundation ]

Powered by:
Powered By Subtext Powered By ASP.NET