.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Treeview

Posted By: kamlesh     Posted Date: January 13, 2011    Points:2   Category :C#
Hi
i am creating windows application and in that i need tree view and when i right click on that it gives menu (ADD,Remove,Delete or else)so please help me if u have any idea or source code please help me

Thanks and regards ..
Kamlesh



Responses
Author: KK Yadav             
Posted Date: January 13, 2011     Points: 5   

Hi Kamlesh,
i am assuming that you are trying to create a context menu in Treeview in WPF. Here is the code:

<TreeView Grid.Row="2">
<TreeViewItem Header="Person">
<TreeViewItem.ContextMenu>
<ContextMenu>
<MenuItem Header="Add" Click="Add_Click" >
</MenuItem>
<MenuItem Header="Remove" Click="Remove_Click" >
</MenuItem>
</ContextMenu>
</TreeViewItem.ContextMenu>
</TreeViewItem>
</TreeView>



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend