hah… supposed to be my last post but hey i have 1 more thing to post. This is a good book for 3d – plus it’s very focus and not thick at all. Very well written.

I have to buy this full-price since I can’t order book from the company anymore. Actually I ordered it from my admin 2 months ago and nothing came (テクスチャの位). Maybe they know I’m already leaving :-). That could save me $25 and now I’m $25 poorer.

This should be my last blog post here at MSDN blog. 9/14/2007 is my last day at Microsoft and if you know me or would like to contact me or would like to chat about UI/UX technologies – email me at kenny.lim@frogdesign.com. I’m still based in Seattle, WA.

Thank you.

]]>https://blogs.msdn.microsoft.com/digitalnetbizz/2007/09/12/last-blog-post-here/feed/0Given a point, how to get the element at that coordinate?https://blogs.msdn.microsoft.com/digitalnetbizz/2007/08/30/given-a-point-how-to-get-the-element-at-that-coordinate/
https://blogs.msdn.microsoft.com/digitalnetbizz/2007/08/30/given-a-point-how-to-get-the-element-at-that-coordinate/#commentsThu, 30 Aug 2007 13:02:00 +0000https://blogs.msdn.microsoft.com/digitalnetbizz/2007/08/30/given-a-point-how-to-get-the-element-at-that-coordinate/

UIElement.InputHitTest is a hidden function that could do just that,

public IInputElement InputHitTest (Point point)

Passing in the coordinate, and this function will look at the element subtree and get the element (IInputElement because it’s a common interface between ContentElement and UIElement) that is at that location.

Then you can use PresentationSource to determined, if an element is rendered. If so it must be connected to PresentationSource.

PresentationSource.FromVisual(uielement); will return a PresentationSource object if connected, null otherwise.

PresentationSource.FromVisual(uielement).RootVisual is an alternate way to get to your Root UI like a Window without walking up the visual tree.

You can use PresentationSource.AddSourceChangedHandler to determined when the element are disconnected from it’s Parent.

Finally, you can also get CompositionTarget which is another cool class by presentationSource.CompositionTarget. By using CompositionTarget, you can do stuffs like this but don’t over-do it cause it’s expensive in performance. CompositionTarget.Rendering is an alternate way to get high fidelity (animation class) rendering. Here a summary of CompositionTarget.Rendering.

The CompositionTarget.Rendering event is fired when the animation system finishes applying animation related changes.The updated display information is then handed off to the rendering engine, which evaluates how many times per-second it can redisplay based on scene complexity and other factors.Depending on that, it may decide to skip a particular frame produced by the animation system.Putting it another way, the draw rate can easily be different from the rate of the CompositionTarget.Rendering events.

Browsing around the my Windows Vista at home, I saw this “people near me” icon. Reading more about it, it’s a new capability of Peer to peer networking built into Windows Vista. It allows you to connect to literally people near you in the airport, in a meeting room, starbucks etc.

For example, if you want to get notification whenever a property change but you don’t own the code and you don’t derive from the class and it does not expose SomethingChanged event. How can you get notification.

So whenever someone do a SetValue/ResetValue/ClearValue on myElement.Background, myEventHandler will be raised. When you are done listening to change notification, you can do RemoveValueChanged(..) to unsubscribe.

The hardest thing about creating 3D is where to source my MeshGeometry3D data. That’s the TriangleIndices, Normals and Positions. These numbers are enormous. Lucky thing there are tools (reading Tim’s blog), I found ZAM 3D and other conversion utilities. This list is priceless. Other than this Mesh3D thingy, I found that 3D in XAML is very straight forward, just like normal 2D XAML.

Using the tool, I’m dragging in a Torus model and copy to XAML. Grab those Meshes and I play with brushes, textures, transforms, rotation, cameras etc.. and you got a nice looking 3D XAML Finally, I got it to look like a rotating Jade ring.

5-6 years ago, there’s a trend to have app written in irregular window, layered window, pixel opacity or different chrome. Then came a wave of products doing just that. I think what’s coming next (in my own opinion) is the application have multiple layers and 1..n layer that display 3d visuals. For example, a TV app with tv controls in another layer in a Viewport3d floating in 3d or even animating a bit