Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
About my WPF app to draw a Bolt Hole Pattern.
Message
De
25/07/2008 12:49:51
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Titre:
About my WPF app to draw a Bolt Hole Pattern.
Divers
Thread ID:
01334102
Message ID:
01334102
Vues:
97
(Note: This topic was originally posted this on the MSDN WPF Forum, but I thought I'd post here as well, just in case it helps anyone getting started, like me.)

I working on re-writting an old VB app that I wrote in 1999 over in WPF, just to see what I can learn about simple WPF geometry and also learning some good OOP practices that I know so little about. The app draws a "Bolt Hole Pattern" by creating BoltCircle on a Canvas and then drawing several other smaller circles (Hole objects) around the circumference of the BoltCircle to create what is commonly called a "Bolt Hole Pattern" (i.e. 12 holes equally spaced on a 12.500 diameter circle). I am also populating a ListView with the X and Y Coordinates of the Holes. Eventually, I want to print the screen (Entire window, ListView and Canvas) somehow.

Here's a link to a PDF file with some screenshots and code-behind: http://www.jordanmachine.com/BoltHolePattern.pdf

The PDF shows a screenshot of the original VB app I wrote back in 1999, and a first pass at the WPF version I'm working on. I also put the C# code-behind for the logic in the PDF.

All comments on structure welcome. I'm trying to learn as much about OOP practices as I can, and this just turned out to be an app that I know about that has some real world use here in our factory.

Current battles:

1. I'm having to manually update the ListView, by setting ItemsSource to null and then back to the HoleList. I must need to do some Notify stuff with the list, but don't know what to do. The list is jsut a list field on the main window class, so maybe that is the problem.

2. Too manu decimals places are showing up the ListView. Is a ValueConverter thingy needed?

3. I want the textboxes to select all text when you tab into them.

4. I want a spinner control to drive the Hole Count and Start Angle textboxes. Looks liek WPF doesn't have this?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform