eBooks from Laurence Moroney
All books and eBooks by Laurence Moroney:
Introducing Microsoft® S...
Chapter 6 The Silverlight Browser Object 169 Silverlight.onUpgradeRequired = function() { document.getElementById("silverlightControlHost").innerHTML = PromptUpgrade; }; Silverlight.onInstallRequired = function() { }; Task 4. Work Around Known Issues A known issue affects Firefox users that are upgrading from Silverlight 1.0 or a beta of Silverlight 2 to the release of Silverlight 2. It has been fixed for future versions of Silverlight but needs to be worked around for Silverlight 2. Firefox users will see the tag’s fallback experience after an upgrade to Silverlight 2 unless they restart their browser. This is fixed by using the following script after the definition. try { if (navigator.plugins["Silverlight Plug-In"].description) { document.getElementById("SLInstallFallback").innerHTML = PromptRestart; } } catch (e) { } Another issue is that Mac Firefox users are misidentified as being in the upgrade required state when they are actually in the restart required state. There is no known workaround at this time,
(2009)
Introducing Windows® 7 f...
by Yochay Kiriaty, Laurence Mor..., Alon Fliess, and Sasha Goldsh...
Chapter 8 Using Windows 7 Touch with Silverlight 189 • The GetPosition method takes an element as its parameter and returns a Point that repre- sents the x and y coordinates of the mouse pointer relative to that element. If nothing is passed in, the Point contains the coordinates relative to the position of the control that raised the event. • The GetStylusInfo method returns a StylusInfo object that contains information about the state of the stylus. StylusInfo has the following properties: o IsInverted: When a pen is inverted, it indicates that the user wants to use it to erase points instead of draw them. This property returns true in that circumstance. o DeviceType: This property returns a string containing the device type—Mouse, Sty- lus, or Touch. • The GetStylusPoints method returns a clone of the stylus points that were collected since the last mouse event. This is a StylusPointCollection
(2009)

