Click here to Skip to main content
15,909,091 members
Home / Discussions / WPF
   

WPF

 
QuestionRe: How to Customize SDK:Tab Control Pin
Mark Salsbery21-Nov-11 5:02
Mark Salsbery21-Nov-11 5:02 
QuestionRetrieving icons associated with installed Printers for use in C# and WPF Pin
Alisaunder20-Nov-11 12:55
Alisaunder20-Nov-11 12:55 
AnswerRe: Retrieving icons associated with installed Printers for use in C# and WPF Pin
SledgeHammer0120-Nov-11 17:32
SledgeHammer0120-Nov-11 17:32 
GeneralRe: Retrieving icons associated with installed Printers for use in C# and WPF Pin
Alisaunder20-Nov-11 18:24
Alisaunder20-Nov-11 18:24 
AnswerRe: Retrieving icons associated with installed Printers for use in C# and WPF Pin
Wayne Gaylard20-Nov-11 18:49
professionalWayne Gaylard20-Nov-11 18:49 
GeneralRe: Retrieving icons associated with installed Printers for use in C# and WPF Pin
Alisaunder21-Nov-11 5:15
Alisaunder21-Nov-11 5:15 
GeneralRe: Retrieving icons associated with installed Printers for use in C# and WPF Pin
SledgeHammer0121-Nov-11 6:18
SledgeHammer0121-Nov-11 6:18 
QuestionRotating 3d cylinder to a specific direction (Vector3d) Pin
ekoman20-Nov-11 1:17
ekoman20-Nov-11 1:17 
Hi!
Relatively new to WPF though have worked a bit with XNA previously and feel fairly experienced with C#.

Building a WPF control for visualizing networks in 3d. I got the network data structure of custom Node and Edge objects and I clone a GeometryModel3D object to each for each of the nodes, drawing these in my ViewPort3D according to their coordinates (Point3d). I have also created a simple cylinder shaped GeometryModel3d object, coded as a xaml resource, with base circle on the xz-plane, stretching 1 unit up on the positive y axis. Each Edge object will refer to one of these, with the appropriate scaling and rotation to connect the nodes in the graph.

My idea is to first scale the cylinder along the y-axis to reflect the distance between two connected nodes, subsequently rotating the cylinder in the correct direction, finally translating the cylinder to the first node's coordinate.

Calculating the direction that the cylinder is easy: I then create a Vector3d based on the nodal coordinates. Can I use this (non-normalized) vector directly to make my cylinder point in this direction? How do I deal with the fact that the "unmodified" cylinder object is directed along the y-axis?

Also: the whole network will animate. Though not according to a storyboard: instead, the location of the nodes will change in a spring-embedded fashion (i.e. force-directed based on relations between them). This means that for each iteration (which will involve calculating new Point3d-coordinates for the nodes), I have to rescale, rerotate and reposition the cylinders (representing arcs/edges between the nodes). How should I do this? Should I "reinitialize" the GeometryModel3D cylinder for each relation and subsequently do the scaling, rotating and translation again? Or should I calculate the differences in length (scale), rotation and position for each step and modify each cylinder? Or should I translate back to its original state and then redo the operation? As I will be dealing with quite a lot of nodes and edges, garbage collection and cpu load might be an issue here.

Or is it possible to build a "skeleton" (dunno the terminology...) in WPF 3d, thus making these edges/cylinders automatically be rotated, scaled and positioned based on some anchor points (i.e. the nodal coordinates)?
AnswerRe: Rotating 3d cylinder to a specific direction (Vector3d) Pin
ekoman20-Nov-11 4:05
ekoman20-Nov-11 4:05 
QuestionHow to remove the border when mouse enter a listboxitem Pin
Loveisasea19-Nov-11 17:41
Loveisasea19-Nov-11 17:41 
AnswerRe: How to remove the border when mouse enter a listboxitem Pin
Abhinav S20-Nov-11 2:38
Abhinav S20-Nov-11 2:38 
AnswerRe: How to remove the border when mouse enter a listboxitem Pin
Mark Salsbery20-Nov-11 8:04
Mark Salsbery20-Nov-11 8:04 
Questionsilverlight web site performance Pin
delibey19-Nov-11 14:17
delibey19-Nov-11 14:17 
AnswerRe: silverlight web site performance Pin
Abhinav S20-Nov-11 2:21
Abhinav S20-Nov-11 2:21 
AnswerRe: silverlight web site performance Pin
Mark Salsbery20-Nov-11 8:07
Mark Salsbery20-Nov-11 8:07 
SuggestionRe: silverlight web site performance Pin
delibey21-Nov-11 4:09
delibey21-Nov-11 4:09 
GeneralRe: silverlight web site performance Pin
Pete O'Hanlon21-Nov-11 4:12
mvePete O'Hanlon21-Nov-11 4:12 
GeneralRe: silverlight web site performance Pin
Mark Salsbery21-Nov-11 4:51
Mark Salsbery21-Nov-11 4:51 
QuestionWPF MVVM DataGrid Cell Changed Pin
Kevin Marois19-Nov-11 9:29
professionalKevin Marois19-Nov-11 9:29 
AnswerRe: WPF MVVM DataGrid Cell Changed Pin
Pete O'Hanlon19-Nov-11 10:58
mvePete O'Hanlon19-Nov-11 10:58 
QuestionWPF Nested Treeviews Pin
Kevin Marois19-Nov-11 8:19
professionalKevin Marois19-Nov-11 8:19 
QuestionHow to add Scrollviewer inside Dragdockpanel? Pin
Dhivakar.M18-Nov-11 2:04
Dhivakar.M18-Nov-11 2:04 
AnswerRe: How to add Scrollviewer inside Dragdockpanel? Pin
Shmuel Zang19-Nov-11 9:28
Shmuel Zang19-Nov-11 9:28 
QuestionDrag and Drop Listbox in Windows Phone 7.1 Pin
rajeevkuth17-Nov-11 23:25
rajeevkuth17-Nov-11 23:25 
AnswerRe: Drag and Drop Listbox in Windows Phone 7.1 Pin
Loveisasea19-Nov-11 18:22
Loveisasea19-Nov-11 18:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.