Click here to Skip to main content
16,006,749 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to add simple C# user control to WPF project ? Pin
Yanshof6-Sep-10 4:48
Yanshof6-Sep-10 4:48 
AnswerRe: How to add simple C# user control to WPF project ? Pin
Kunal Chowdhury «IN»6-Sep-10 18:41
professionalKunal Chowdhury «IN»6-Sep-10 18:41 
GeneralRe: How to add simple C# user control to WPF project ? Pin
Yanshof6-Sep-10 18:56
Yanshof6-Sep-10 18:56 
GeneralRe: How to add simple C# user control to WPF project ? Pin
Kunal Chowdhury «IN»6-Sep-10 19:51
professionalKunal Chowdhury «IN»6-Sep-10 19:51 
GeneralRe: How to add simple C# user control to WPF project ? Pin
Yanshof6-Sep-10 19:55
Yanshof6-Sep-10 19:55 
AnswerRe: How to add simple C# user control to WPF project ? Pin
Abhinav S11-Sep-10 21:03
Abhinav S11-Sep-10 21:03 
AnswerRe: How to add simple C# user control to WPF project ? Pin
PumbaPumba27-Sep-10 6:54
PumbaPumba27-Sep-10 6:54 
QuestionTransform a model's positions directly Pin
Frank Boettcher5-Sep-10 23:38
Frank Boettcher5-Sep-10 23:38 
Hi;

I'm new to WPF, and I'm trying to understand the underlying architecture, so please correct me if I'm wrong:

As far as I know, there are three possibilities to dynamically transform a GeometryModel3D during runtime:

a) Set the model's Transform-property to a Transform3DGroup once, to which you add new / duplicate Transformations.

b) Cast the model's Transform-property as a MatrixTransform3D and multiply its matrix with the Value-property of a Transformation (which i guess is pretty much case (a) )

c) Leave the Transform-property as a identity matrix and instead transform the model's Geometry.Positions property directly (provided you use a MeshGeometry3D) like such:

int i;
MeshGeometry3D mesh;

mesh = (_SomeModel.Geometry as MeshGeometry3D);
for (i = 0; i < mesh.Positions.Count; i++)
{
   mesh.Positions[i] = _SomeTransform.Transform(
     mesh.Positions[i]);
}



On first glance, option (c) seems like the best (though not most intuitive) choice, especially when you need the actual positions of the model(s); for example to calculate hit-detection.

Is there another way to easily access a model's current, transformed position(s)? And why does WPF transform a model's own space instead of just the actual coordinates?

Kind regards, Frank
AnswerRe: Transform a model's positions directly Pin
Kubajzz6-Sep-10 0:11
Kubajzz6-Sep-10 0:11 
QuestionWpf Ribbon Control Pin
techaspnet5-Sep-10 20:18
techaspnet5-Sep-10 20:18 
AnswerRe: Wpf Ribbon Control Pin
Abhinav S11-Sep-10 2:51
Abhinav S11-Sep-10 2:51 
QuestionAuto completing multiple values separated by comma into a single autocompletebox. Pin
ananddayalan5-Sep-10 13:02
ananddayalan5-Sep-10 13:02 
AnswerRe: Auto completing multiple values separated by comma into a single autocompletebox. Pin
Abhinav S5-Sep-10 23:31
Abhinav S5-Sep-10 23:31 
QuestionCan't get rid of the scrollbar Pin
Yariv5-Sep-10 6:32
Yariv5-Sep-10 6:32 
AnswerRe: Can't get rid of the scrollbar Pin
Yariv5-Sep-10 23:27
Yariv5-Sep-10 23:27 
GeneralRe: Can't get rid of the scrollbar Pin
Abhinav S11-Sep-10 2:52
Abhinav S11-Sep-10 2:52 
QuestionHow to add new property to ResourceDictionary item ? Pin
Yanshof5-Sep-10 4:20
Yanshof5-Sep-10 4:20 
AnswerRe: How to add new property to ResourceDictionary item ? Pin
Kubajzz5-Sep-10 22:24
Kubajzz5-Sep-10 22:24 
QuestionHow to bind a List to a ListBox in a UserControl Pin
davidnhilda5-Sep-10 1:10
davidnhilda5-Sep-10 1:10 
AnswerRe: How to bind a List to a ListBox in a UserControl Pin
Abhishek Sur5-Sep-10 1:22
professionalAbhishek Sur5-Sep-10 1:22 
QuestionWPF window - Get Client Rect Pin
huy.tran3-Sep-10 1:43
huy.tran3-Sep-10 1:43 
AnswerRe: WPF window - Get Client Rect Pin
Pete O'Hanlon3-Sep-10 2:00
mvePete O'Hanlon3-Sep-10 2:00 
QuestionListView Scrolling with MVVM Pin
krishnan.s2-Sep-10 19:09
krishnan.s2-Sep-10 19:09 
AnswerRe: ListView Scrolling with MVVM Pin
Abhinav S2-Sep-10 23:50
Abhinav S2-Sep-10 23:50 
AnswerRe: ListView Scrolling with MVVM Pin
krishnan.s3-Sep-10 2:24
krishnan.s3-Sep-10 2:24 

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.