WPF VB.Net Tutorial

  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="SolidColorBrush Example" Height="415" Width="270">
  
    
      
        From Hex string using ColorConverter:
      
              Stroke="Blue" />
    

  

//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Shapes
Namespace WpfApplication1
  Public Partial Class SolidColorBrushExample
    Inherits Window
    Public Sub New()
      InitializeComponent()
      Dim brush As New SolidColorBrush()
      ' From a Hex string using ColorConverter: 
      brush = New SolidColorBrush(CType(ColorConverter.ConvertFromString("#CBFFFFAA"), Color))
      rect5.Fill = brush
    End Sub
  End Class
End Namespace