Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1812 XAML Add new event handler failes

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
HBTeun Posted - Feb 22 2010 : 04:48:34 AM
When I want to add a event handler to a control in XAML (in the WPF/Silverlight editor). The first time the list box opens I get the option to create a new event handler, but it only enters the following string between quotes: "operator<New Event Handler>" and does not add the event handler to code behind. The second time that option is not shown only the already existing event handlers in the code behind are shown.

When I disable VAX it works as it should be.

I use version 1812 in VS2010 RC.
8   L A T E S T    R E P L I E S    (Newest First)
support Posted - Apr 10 2010 : 9:25:57 PM
case=40890 is fixed in build 1819
accord Posted - Mar 12 2010 : 7:14:15 PM
*ah* That's why you recommended the name "Test" for the project Sorry.
Now, I am seeing the same effect here:

case=40890

Thank you for the clear description.
HBTeun Posted - Mar 12 2010 : 07:34:49 AM
quote:
Originally posted by accord

I may write this to an incorrect place, but got this:





It's the correct place. Go on with step 3 but instead of "Test (Test)" use in your case "WpfApplication2 (WpfApplication2)"
accord Posted - Mar 11 2010 : 4:30:28 PM
I may write this to an incorrect place, but got this:

HBTeun Posted - Mar 11 2010 : 09:25:30 AM
I noticed the same happening when adding new namespaces in the XAML file.

To reproduce:
1. Start new silverlight project and name it for example "Test".
2. In the mainpage XAML file and type the following:

xmlns:local=

3. At this point a dropdown listbox is opened with the possible namespaces. Choose "Test (Test)" and press Tab.
The following line is produced:

xmlns:local="Test (Test)"

It should be:

xmlns:local="clr-namespace:Test"

Pressing enter does insert the correct string.
accord Posted - Feb 28 2010 : 7:46:54 PM
I have put in a separate bug report for this:

case=40335

and mentioned the original one. Now, I tried this in the XAML file and I was seeing a similar problem there.
Thank you for the clear description
HBTeun Posted - Feb 24 2010 : 5:05:23 PM
Place a button inside the Grid:
<Grid x:Name="LayoutRoot" Background="White">
<Button />
</Grid>

Add a Click event: (with VAX On)
<Grid x:Name="LayoutRoot" Background="White">
<Button Click="operator<New Event Handler>" />
</Grid>
In the listbox the following option is displayed:
operator<New Event Handler>


(With VAX disabled)
<Grid x:Name="LayoutRoot" Background="White">
<Button Click="Button_Click" />
</Grid>
and in code-behind an event handler is created.

Listbox with VAX Disabled:


Listbox with VAX Enabled: (had to press ctrl)



BTW, had not discovered it also happen in code-behind. :)
So both use cases work to display the error.

Also if there is already a handler in the code-behind it is listed in the listbox and you can use it as the handler (this is correct behavior). But the option to create a new handler still goes wrong.
accord Posted - Feb 24 2010 : 3:49:20 PM
I am seeing the same effect here:

case=40179

I was able to reproduce this via using a button:

1. Placed a button on the "form" or whatever it is called so I got button1
2. I wrote button1.Click +=
and got this with Visual Assist disabled

            button1.Click += new RoutedEventHandler(button1_Click);

and a new function

        void button1_Click(object sender, RoutedEventArgs e)
        {
            throw new NotImplementedException();
        }

With Visual Assist enabled I got

            button1.Click += new button1.Click

This is a good start. But can you please explain what handler did you use? (by step-by-step please, since I am not a WPF expert )
I will add your steps to the bug report as an additional test case, just for sure.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000