XTab's Blog

Ged Mead's Blog at vbCity

This blog hosted by:
http://blogs.vbcity.com      
  Home :: Syndication  :: Login

AprMay 2008Jun
SMTWTFS
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

Archives

Topics

Ramblings

VB.NET

   Adding controls at run time using VB.NET in Windows Forms is fairly well-documented. Finding C# code-behind samples for doing this with WPF controls under Framework 3.0 is also an easy task.
But I recently wanted to see how to do this with a WPF application in Visual Basic 2008 and I found that at the time of writing my searches produced no useful clear "How To" results.

   Direct conversion from C# to VB using the current conversion tools didn't always identify some essential code elements, resulting in quite a frustrating time spent finding the correct way of doing this. (Not an unusual scenario nowadays, as more and more samples - including too many MSDN ones - seem to have only C# samples available).

  Along the way I also discovered that not everything is as it seems - apparently difficult things were easy; things that seemed they should be easy turned out to be more difficult.
And of course as is often the case it turns out that there is more than one way to do most things.

   Once you have solved the puzzles it all seems easy, but I thought I'd save you the trouble of having to work out the steps involved if you should need to do this before better Visual Basic documentation becomes available.

  You can link to the first page of my article here.

posted on Tuesday, January 15, 2008 6:17 PM

Feedback

No comments posted yet.

Post Feedback

Title:
Name:
Url:
Comments: 
Protected by Clearscreen.SharpHIPEnter the code you see: