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

ottobre 2009 Blog Posts

Updated code for my "Export selection as Code Snippet" add-in for VB 2010 Beta 2

Some time ago I published onto CodePlex an open source add-in for Visual Studio 2008 which allows exporting the selected code block within the code editor to a reusable code snippet (.snippet file), providing full VB 2008 source code, installer and video. I decided to update the add-in to target Visual Studio 2010 Beta 2, with Visual Basic 2010. I had no particular problems in updating my code and I could also take advantage of some new features such as auto-implemented properties which make the code clearer. I still used Xml literals and Linq to Xml for easily generating snippets. If anyone of you...

posted @ venerdì 30 ottobre 2009 00:14 | Feedback (0) | Filed Under [ Visual Studio 2010 Visual Basic Visual Studio Extensibility ]

WPF 4: SelectionBrush and CaretBrush

Among the new features available in Windows Presentation Foundation with .NET 4, there are two new Brush objects: SelectionBrush and CaretBrush. The first brush allows specifying the highlight color when selecting text, e.g. in TextBox controls, whereas the second one allows specifying the filling color for the mouse pointer.    The following XAML code defines a SelectionBrush for a TextBox, so that selected text will be highlighted with a gradient:           <TextBox Width="250" Height="40" Name="TextBox1" FontSize="16"                  FontWeight="Bold">             <TextBox.SelectionBrush>                 <LinearGradientBrush>                     <GradientStop Offset="0" Color="Red"/>                     <GradientStop Offset="0.5" Color="Yellow"/>                     <GradientStop Offset="1" Color="Orange"/>                 </LinearGradientBrush>             </TextBox.SelectionBrush>                   </TextBox >   The above code produces the following result:       As you can imagine, you...

posted @ lunedì 26 ottobre 2009 00:39 | Feedback (0) | Filed Under [ Windows Presentation Foundation ]

XAML serialization with .NET 4.0 and VB 2010

To be honest the technique I'm going to describe in this blog post is not really new in .NET 4.0 (although I'm going to explain it with Visual Basic 2010), by the way the new Framework version introduces something new. First, there is a new assembly named System.Xaml.dll which is responsible for processing and parsing XAML code in WPF applications. Most of what was part of the WindowsBase.dll assembly about XAML, now is exposed by the new library which exposes a namespace named System.Xaml.   Now it's time to discuss the technique that entitles this blog post. During...

posted @ sabato 17 ottobre 2009 23:45 | Feedback (0) | Filed Under [ Visual Basic Windows Presentation Foundation ]

WPF 4: assigning images to Image controls at design-time

Another improvement to the Visual Studio 2010 designer for WPF that you can check out in the Beta 1 is the capability of assigning images to Image controls at design-time in a better way. After adding Image controls to the UI, simply click the "..." button for the Source property in the Properties window. This will show up the Choose image dialog (see figure below) where you can select one or more images: The interesting thing is the Path text box: Visual Studio shows the so called Packed Uri pointing to the image. At this point selected images are basically part of the...

posted @ giovedì 8 ottobre 2009 14:35 | Feedback (0) | Filed Under [ Visual Studio 2010 Visual Basic Windows Presentation Foundation ]

WPF 4: setting controls' color brushes in the Visual Studio 2010 designer

If you are interested into WPF and you had a chance of trying the bits of Visual Studio 2010 Beta 1 you will have probably noticed some improvements to the WPF designer (also known as Cider) although this is just the first Beta. In fact the designer now offers more advanced tools than in the past. One of such tools provides the ability of setting controls colors, such as Background, Foreground and all those properties that you can assign with brushes. For example, if you want to define a gradient color as the background to a Window you simply click the Background property within the Properties window to...

posted @ mercoledì 7 ottobre 2009 23:52 | Feedback (0) | Filed Under [ Visual Studio 2010 Visual Basic Windows Presentation Foundation ]

Powered by:
Powered By Subtext Powered By ASP.NET