chadr wrote:I could have shown C#'s equivalent scenario by going into the Window1 ctor and typing "button1.click +=..." and then C# would have gen'd a handler stub for me and completed the delegate add. Download the Beta and give that a try
chadr wrote:The reason I chose VB here is because VB's language allows for the "Handles" declarator, and the language service generates handlers from those object/event dropdowns in the editor. It just made the example more streamlined -- didn't mean to imply that C# didn't work, it just works differently.
y2k4life wrote:chadr wrote:The reason I chose VB here is because VB's language allows for the "Handles" declarator, and the language service generates handlers from those object/event dropdowns in the editor. It just made the example more streamlined -- didn't mean to imply that C# didn't work, it just works differently.Why not have that in the C# verison like in VS2005? I thought the idea was to add feature not take them away? That is something I do when I release bug fixes. I fix the bug, but break the code some where else. So, is it going to be the old way or the new way, write code?Why make VB *streamlined* and not C#.
CPrest wrote:Its in beta right now. you know what beta means correct ?
So, the Beta 1 technology that is implemented for WPF to support event hookup is exactly the same for both VB and C#. That is, at Beta 1, there are no more or less lines of code in the designer for either language's support of events in WPF. And that LOC count is, effectively, zero in Beta 1 *The odd and confusing reality is, without designer support for event hookup in Beta 1, you're seeing the fallback feature of code-editor-only support -- which is the same for WPF as it is for Windows Forms. And, as with Windows Forms, there are some differences between C# and VB for event code gen and hookup.Once WPF Designer & XAML Language Service event support comes online (as it is today in our internal builds and you'll see in Beta 2), intellisense will give completion on events in the XAML editor, and double-clicking on a control will generate the handler and take you to code.No harm in asking about a feature you care about, just try not to use Beta 1 to jump to conclusions about the final product or how we prioritize language support. We're still working * Note: it's not really zero, but there are multiple levels and layers of goo that have to be in place to make event hookup work, each of which is necessary but not sufficient. Not all goo was there, so effectively there's nothing there cuz you can't see any features.
chadr wrote:No harm in asking about a feature you care about, just try not to use Beta 1 to jump to conclusions about the final product or how we prioritize language support. We're still working