tag:blogger.com,1999:blog-5295746446529817470.post1242023790167880472..comments2023-05-09T16:29:24.130+02:00Comments on Dotnet by Example: Writing behaviors in PCL for Windows Phone 8.1 and Windows 8.1Joost van Schaikhttp://www.blogger.com/profile/02182444268071162776noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5295746446529817470.post-76787788857755303082014-05-07T09:03:45.509+02:002014-05-07T09:03:45.509+02:00Hi @Daniel,
Thanks for you suggestion. I will loo...Hi @Daniel,<br /><br />Thanks for you suggestion. I will look into this.Joost van Schaikhttps://www.blogger.com/profile/02182444268071162776noreply@blogger.comtag:blogger.com,1999:blog-5295746446529817470.post-59206142531489615862014-05-06T23:58:49.069+02:002014-05-06T23:58:49.069+02:00This sounds great!
I do have a suggestion however...This sounds great!<br /><br />I do have a suggestion however. Instead of creating new interface which derives from Microsoft.Xaml.Interactivity, try putting an interface with the exact same name and members in the PCL. Then in the platform-specific assemblies, put a type-forward attribute:<br /><br />[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Xaml.Interactivity.IBehavior))]<br /><br />That way the portable version of the interface will have the right members on it, so you'll get compile-time checking that you implement all of them correctly (as well as the intellisense helpers to auto-implement the interface, etc.)Danielhttps://www.blogger.com/profile/07523811351761648797noreply@blogger.com