Click here to Skip to main content
15,913,055 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Resource Dictionary and Data Templates Pin
User 2710091-May-09 4:56
User 2710091-May-09 4:56 
GeneralRe: Resource Dictionary and Data Templates Pin
BlitzPackage1-May-09 7:04
BlitzPackage1-May-09 7:04 
GeneralRe: Resource Dictionary and Data Templates Pin
User 2710091-May-09 7:11
User 2710091-May-09 7:11 
GeneralRe: Resource Dictionary and Data Templates Pin
BlitzPackage1-May-09 7:36
BlitzPackage1-May-09 7:36 
GeneralRe: Resource Dictionary and Data Templates Pin
Pete O'Hanlon1-May-09 8:38
mvePete O'Hanlon1-May-09 8:38 
GeneralRe: Resource Dictionary and Data Templates Pin
User 2710091-May-09 8:43
User 2710091-May-09 8:43 
GeneralRe: Resource Dictionary and Data Templates Pin
BlitzPackage1-May-09 8:55
BlitzPackage1-May-09 8:55 
QuestionXBAP keyboard event capture Pin
ita6cgr28-Apr-09 5:34
ita6cgr28-Apr-09 5:34 
Questioninternationalization of silverlight applications Pin
ManjuHanzan28-Apr-09 2:12
ManjuHanzan28-Apr-09 2:12 
AnswerRe: internationalization of silverlight applications Pin
Mark Salsbery28-Apr-09 5:40
Mark Salsbery28-Apr-09 5:40 
QuestionProblem with silverlight Pin
sureshreddy178927-Apr-09 22:29
sureshreddy178927-Apr-09 22:29 
AnswerRe: Problem with silverlight Pin
Mark Salsbery28-Apr-09 5:35
Mark Salsbery28-Apr-09 5:35 
QuestionProblem in silverlight Pin
sureshreddy178927-Apr-09 17:26
sureshreddy178927-Apr-09 17:26 
AnswerRe: Problem in silverlight Pin
VCsamir27-Apr-09 19:16
VCsamir27-Apr-09 19:16 
GeneralRe: Problem in silverlight Pin
sureshreddy178927-Apr-09 21:17
sureshreddy178927-Apr-09 21:17 
QuestionRe: Problem in silverlight Pin
Mark Salsbery28-Apr-09 5:36
Mark Salsbery28-Apr-09 5:36 
QuestionSilverlight to WPF Porting Pin
bdb3886527-Apr-09 12:51
bdb3886527-Apr-09 12:51 
AnswerRe: Silverlight to WPF Porting Pin
Mark Salsbery27-Apr-09 14:07
Mark Salsbery27-Apr-09 14:07 
GeneralRe: Silverlight to WPF Porting Pin
bdb3886528-Apr-09 6:42
bdb3886528-Apr-09 6:42 
GeneralRe: Silverlight to WPF Porting Pin
Mark Salsbery28-Apr-09 8:01
Mark Salsbery28-Apr-09 8:01 
GeneralRe: Silverlight to WPF Porting Pin
bdb3886528-Apr-09 11:10
bdb3886528-Apr-09 11:10 
GeneralRe: Silverlight to WPF Porting Pin
Mark Salsbery28-Apr-09 12:44
Mark Salsbery28-Apr-09 12:44 
GeneralRe: Silverlight to WPF Porting Pin
bdb3886529-Apr-09 6:52
bdb3886529-Apr-09 6:52 
QuestionRe: Silverlight to WPF Porting Pin
Mark Salsbery29-Apr-09 7:21
Mark Salsbery29-Apr-09 7:21 
AnswerRe: Silverlight to WPF Porting Pin
bdb3886529-Apr-09 7:44
bdb3886529-Apr-09 7:44 
Here is the calculation method. It is the same in silverlight and WPF.
private void posImage()
{
//System.Windows.Forms.MessageBox.Show("HEllo");
for (int i = 0; i < _images.Count; i++)
{
Image image = _images[i];
Point3D point3D = _imagePoint3Ds[image];

double zActual = SPACE_LENGTH + (point3D.z - _camera.z);
double scale = SPACE_LENGTH / zActual - EFFECT_FACTOR;

// update the image position and scale
if (scale > 0)
{
image.SetValue(Canvas.LeftProperty, (point3D.x - _camera.x) * scale);
image.SetValue(Canvas.TopProperty, (point3D.y - _camera.y) * scale);
Log.WriteToLog(image.ToString() +": "+ Convert.ToString((point3D.x - _camera.x) * scale));

ScaleTransform scaleTransform = new ScaleTransform();
scaleTransform.ScaleX = scale * NEW_SCALE;
scaleTransform.ScaleY = scale * NEW_SCALE;
image.RenderTransform = scaleTransform;

image.Opacity = 1 - 0.99 * zActual / SPACE_LENGTH * 0.5;
//image.Opacity = 1;

// sort the children according to the scale
image.SetValue(Canvas.ZIndexProperty, (int)(SPACE_LENGTH - point3D.z));

}
else
{
// if text move over the screen, place it at the back
point3D.z += SPACE_LENGTH * 2;
}

}

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.