Is it possible to create a control like this? I've tried so much, but I can't create a control exactly like this.
-
1Sure it's possible. What have you tried and where are you falling short?Eric J.– Eric J.2012-07-29 08:56:30 +00:00Commented Jul 29, 2012 at 8:56
-
with WPF it would be easy but with winforms less easierHassan Boutougha– Hassan Boutougha2012-07-29 08:58:55 +00:00Commented Jul 29, 2012 at 8:58
-
You can start by looking this codeproject.com/Articles/23746/TreeView-with-Columns and this codeproject.com/Articles/14741/Advanced-TreeView-for-NETAlessio Koci– Alessio Koci2012-07-29 21:01:22 +00:00Commented Jul 29, 2012 at 21:01
-
So far i've created a tree like this imageshack.us/photo/my-images/845/sofara.jpg using draw text in OwnerDrawnTextMode and also a custom control for the tree like imageshack.us/photo/my-images/707/newaqg.jpg I've lagging in the node bounds, i cant able to change the node bounds.Bala Subramaniam– Bala Subramaniam2012-07-30 06:40:09 +00:00Commented Jul 30, 2012 at 6:40
-
thanq AleWin i've already seen that controls, but no use. i would like to change the bounds of the nodeBala Subramaniam– Bala Subramaniam2012-07-30 06:42:24 +00:00Commented Jul 30, 2012 at 6:42
Add a comment
|
1 Answer
It is super easy to do in WPF once you have a fair grounding in the technology. You need to understand the following key concepts :
Control creation overview : http://msdn.microsoft.com/en-us/library/ms745025.aspx I recommend you use a UserControl for this simple task.
DataContext : http://msdn.microsoft.com/en-us/library/ms752347.aspx
3 Comments
Bala Subramaniam
thanq sir but we have already started our project in winforms. we where in the middle of the project... Is there any way that i can host these custom WPF components in Winform?? Even if such hosting is possible does it supports drag and drop between winforms and WPF.... I need ur kind advice....
basarat
It is possible to host WPF components in winforms : msdn.microsoft.com/en-us/library/ms742215.aspx And drag and drop works as well.
Bala Subramaniam
So far i've created a tree like this imageshack.us/photo/my-images/845/sofara.jpg using draw text in OwnerDrawnTextMode and also a custom control for the tree like imageshack.us/photo/my-images/707/newaqg.jpg I've lagging in the node bounds, i cant able to change the node bounds.