Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Generally speaking, the WPF/VB.NET sample will be analogous to the WPF/C# sample. However, the problems are in the details: I initially find the WPF subsystem contains several C#-specific patterns in vbcontrols.xml; for example there example, there are a int and double casts as well as a few other C# patterns relating to data binding; for example:

 

Code Block
title vbcontrols.xml
 <pattern id="Top.Set" >
 <wpf narg="2" code="Canvas.SetTop(%2d,(double)(%1d))\c" />
 <all narg="2" code="%2d.Top = %1d\c" />
 </pattern> 

 

What is needed here is a VB.NET form for some WPF operations. This is analogous to the situation with SubSystem=loc/lob where some patterns need both a VB.NET and a C# form.  For WPF we will need a pair of subsystems, wpf/wpb, for C#/VB.NET respectively. The new subsystem is added to enumerations.xml:

...

I find another dialect-specific WPF pattern in VBASIC.XML.   This pattern specifies the operation needed to start a WPF application.  A VB.NET version is added:

...

A critical part of supporting the WPF upgrade relates to authoring XAML from the VB6 forms and declaring the WPF Application class.  This work is done in the wpfSubSystem.gmsl script.  This gmSL script contains various upgrade event handlers and supportig supporting routines that are called by gmBasic at the appropriate times during the authoring process.   Support for VB.NET was added by making the code in wpfSubSystem.gmsl dialect-specific: adding logic to author either C# or VB.NET code depending on the dialect setting.

...