Jaime Rodriguez On Windows Phone, Windows Presentation Foundation, Silverlight and Windows 7
First 3 hours of troubleshooting the problem my last post, I was thinking "I need snoop" ...
Next 5 hours, I wrote a very early rough version ... It needs work, I want to clean it up, but have not have a chance.. Sharing it in the mean time and adding this to my very long "to clean up later" list ... [email me if you want to be notified or think it would be useful]..
Here is what it does: 1 - Creates a VisualTree ... [in a different Silverlight control, as not to bother your code] 2 - you can click on any item in the visual tree and it will adorn it in the control .. [see known issues] 3 -- It can subscribe to either MouseMove or MouseEnter/MouseLeave in your code ... so you can get details on the items that the mouse hovers over.. of course for this, your item needs to be hitTestVisible... I did both events cause i thought mouseMove would be too much.. but I ended up adding a cache and MouseMove seems OK.. Still MouseEnter is likely a better choice for very large project.. the one I tested had about 2000 visuals.. 4- I added a flag to skip paths... this turned useful for me, but if you want paths, then change the flag in VisualTreeHelper.js
Here is a sample screenshot of the tree + details.. the LHS is the VisualTree, the RHS is a Silverlight control with items.. the Adorned item is in yellow..
Here are the known issues:
1- My treeview control and its scrollbar sucks .. sorry .. would have taken me longer to write the tree than the snoop functionality.. 2 -- If you are clicking on the tree, it does its best to guess the position for the adorner, but currently it ignores transforms... so it is more accurate if you subscribe to mouse move... or Mouse Enter .. cause then it caches the position it should adorn so it is accurate.. 3 -- tree 'ignores' changes once tree is built ... but you do have the ability to "refresh the tree" ... 4 -- in my machine I wired it in same window.. but for sample, to try to make it usable for people with lower resolutions, I hacked some very ugly buttons for a new window.. the problem is if you close the window with out unplugging the event listeners you will get errors..
My current wishlist:
Want to take it for a spin ??? It is "live" here ... The source is here..
The sample is no where representative of what this early snoop helped me troubleshoot... To see some of the intricacies, follow this sequence..
if you take this early sample and make it useful or good quality, please drop me an email so I can redirect ... If you run into issues, let me know too ..
PS -- apologies to Peter for calling it 'snoop' when it does 0.1 of what snoop does.. Peter, imitation is flattery ..
Another week has shot by. Didn't have any time to look at Silverlight although I have managed to download
Cream , as in 'Pick of the Litter' is always subjective, but this is my list for today as I view
1. Ernie Booth的Reflector Silverlight Browser View Source Reflector tool for .NET Silverlight Sites http
转自思归的bloghttp://blog.joycode.com/saucer/archive/2007/05/22/103008.aspx1.ErnieBooth的ReflectorSilv...
1. Ernie Booth的Reflector Silverlight Browser View Source Reflector tool for .NET Silverlight Sites http://blogs.msdn.com/ebooth/archive/2007/05/19/view-source-reflector-tool-for-net-silverlight-sites.aspx
During the weekend I spent some minutes to collect some of the greatest Silverlight examples. Most of
分享几个国外的silverlight例子和blog GreatVisualStudioQuickStarts
Silverlight相关链接(Reflector插件,Silverlight控件等 ) 1. Ernie Booth的Reflector Silverlight Browser View Source