My Expression blend is giving an error INVALID XAML and is not showing the GUI. but the XAML is correct becuase when i run the applicaiton on VS2008 it perfectly built the application and run. seems like blend is not understanding the MouseRightButtonDown
& MouseRightButtonUp events and producing error in the following code.
I checked the available events of treeview in the Expression Blend, the mouserightbuttondown event is not there, i m now sure this mouseRightButtonDown event is not known for Expression Blend. but due to this it is not loading the GUI I am unable to work
in design any more. please help.
Its not working, I hav tried doing this, now the code cannot be built. VS2008 is now giving the error.
'System.Windows.Controls.TreeView' does not contain a definition for 'MouseRightButtonDown' and no extension method 'MouseRightButtonDown' accepting a first argument of type 'System.Windows.Controls.TreeView' could be found (are you missing a using directive
or an assembly reference?)
if it is not included in silverlight 3 then how is the applicaiton running perfectly?
Are you sure your App is a Silverlight 3 App?
I created a simple Silverlight 3 App for testing and it won't run if I add the MouseRightButtonDown (or MouseRightButtonUp) event for TreeView.
When I built it then error occurs:
Error 1 The property 'MouseRightButtonDown' does not exist on the type 'TreeView' in the XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls'.
Error 2 The property 'MouseRightButtonUp' does not exist on the type 'TreeView' in the XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls'.
Error 3 The property 'MouseRightButtonDown' was not found in type 'TreeView'.
Error 4 The property 'MouseRightButtonUp' was not found in type 'TreeView'.
If I change it to Silverlight 4 everything will be fine.
you can check XAML in my first post above, the mouse events are there and this code is compiling/running perfectly, if I try to dynamically add these events in code behind like mytree.MouseRightButtonUp += ... this gives me error saying that there is no
definition of MouseRightButtonUP. And about the version of silverlight yes I am sure because I am working on VS 2008 and expression blend 3.
it would not be possible for me to send all the code, all the XAML related to my tree is already posted above. i think i once installed the framwork 4 but not VS 2010 so is it possible framwork 4 is helping it to run correctly ? its only producing compile
time error when i try to register event in the code behind, but if i do it in XAML no error and it runs fine. if it is really not included in silverlight 3 then I think somthing else is helping it to run.
mumairkhan
Member
23 Points
66 Posts
Invalid XAML - Silverlight 3 - Blend 3
Dec 27, 2010 11:09 AM | LINK
My Expression blend is giving an error INVALID XAML and is not showing the GUI. but the XAML is correct becuase when i run the applicaiton on VS2008 it perfectly built the application and run. seems like blend is not understanding the MouseRightButtonDown & MouseRightButtonUp events and producing error in the following code.
<controls:TreeView x:Name="sysTree" SelectedItemChanged="sysTree_SelectedItemChanged" MouseRightButtonDown="sysTree_MouseRightButtonDown" MouseRightButtonUp="sysTree_MouseRightButtonUp" > <controls:TreeView.ItemTemplate > <common:HierarchicalDataTemplate ItemsSource="{Binding Folders}" > <StackPanel Orientation="Horizontal" > <Image Source="{Binding Icon}" Margin="0,0,5,0" ></Image> <TextBlock Margin="0" Text="{Binding Name, Mode=OneWay}" FontSize="12" /> </StackPanel> </common:HierarchicalDataTemplate> </controls:TreeView.ItemTemplate> </controls:TreeView>mumairkhan
Member
23 Points
66 Posts
Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 27, 2010 11:14 AM | LINK
I checked the available events of treeview in the Expression Blend, the mouserightbuttondown event is not there, i m now sure this mouseRightButtonDown event is not known for Expression Blend. but due to this it is not loading the GUI I am unable to work in design any more. please help.
JeyZ
Participant
1391 Points
206 Posts
Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 27, 2010 11:24 AM | LINK
A quick solution would be, to get rid of the events subscription from the XAML
and move it to your page constructor.. something like...
myTreeView.MouseLeftButtonDown += OnMyTreeViewMouseLeftButtonDown;
That way your GUI will load in blend, and the functionality still remains intact. (That is if as you say, event subscriptions, have broken blend)...
Regards
J
Awarded, Microsoft Community Contributor 2011
Blog - Freebies
mumairkhan
Member
23 Points
66 Posts
Re: Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 27, 2010 11:30 AM | LINK
Its not working, I hav tried doing this, now the code cannot be built. VS2008 is now giving the error.
'System.Windows.Controls.TreeView' does not contain a definition for 'MouseRightButtonDown' and no extension method 'MouseRightButtonDown' accepting a first argument of type 'System.Windows.Controls.TreeView' could be found (are you missing a using directive or an assembly reference?)
Daoping Liu...
All-Star
15960 Points
2045 Posts
Microsoft
Re: Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 29, 2010 08:17 AM | LINK
Hi,
I have to tell you that MouseRightButtonDown And MouseRightButtonUp not support in Silverlight 3.
For verify this, please check links below:
http://msdn.microsoft.com/en-us/library/system.windows.controls.treeview%28v=VS.95%29.aspx
Find the MouseRightButtonDown event And MouseRightButtonUp event and open the links and focus on Version Notes and version Information.
Hope this will help.
Regards
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
mumairkhan
Member
23 Points
66 Posts
Re: Re: Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 29, 2010 10:01 AM | LINK
if it is not included in silverlight 3 then how is the applicaiton running perfectly?
Daoping Liu...
All-Star
15960 Points
2045 Posts
Microsoft
Re: Re: Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 30, 2010 01:40 AM | LINK
Hi,
Are you sure your App is a Silverlight 3 App?
I created a simple Silverlight 3 App for testing and it won't run if I add the MouseRightButtonDown (or MouseRightButtonUp) event for TreeView.
When I built it then error occurs:
Error 1 The property 'MouseRightButtonDown' does not exist on the type 'TreeView' in the XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls'.
Error 2 The property 'MouseRightButtonUp' does not exist on the type 'TreeView' in the XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls'.
Error 3 The property 'MouseRightButtonDown' was not found in type 'TreeView'.
Error 4 The property 'MouseRightButtonUp' was not found in type 'TreeView'.
If I change it to Silverlight 4 everything will be fine.
Hope this helps.
Regards
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
mumairkhan
Member
23 Points
66 Posts
Re: Re: Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 30, 2010 06:29 AM | LINK
you can check XAML in my first post above, the mouse events are there and this code is compiling/running perfectly, if I try to dynamically add these events in code behind like mytree.MouseRightButtonUp += ... this gives me error saying that there is no definition of MouseRightButtonUP. And about the version of silverlight yes I am sure because I am working on VS 2008 and expression blend 3.
Daoping Liu...
All-Star
15960 Points
2045 Posts
Microsoft
Re: Re: Re: Invalid XAML - Silverlight 3 - Blend 3
Dec 31, 2010 01:47 AM | LINK
Hi,
This indicate there is no MouseRightButtonUp in your current app.
but you said that your code can run, could you zip up all your code for us so that we can test it?
Thanks.
Regards
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
mumairkhan
Member
23 Points
66 Posts
Re: Re: Re: Invalid XAML - Silverlight 3 - Blend 3
Jan 03, 2011 06:28 PM | LINK
it would not be possible for me to send all the code, all the XAML related to my tree is already posted above. i think i once installed the framwork 4 but not VS 2010 so is it possible framwork 4 is helping it to run correctly ? its only producing compile time error when i try to register event in the code behind, but if i do it in XAML no error and it runs fine. if it is really not included in silverlight 3 then I think somthing else is helping it to run.