Click here to Skip to main content
15,921,351 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Wpf datagrid Pin
User 27100930-Dec-08 22:23
User 27100930-Dec-08 22:23 
GeneralRe: Wpf datagrid Pin
Feras Mazen Taleb31-Dec-08 3:41
Feras Mazen Taleb31-Dec-08 3:41 
QuestionTreeViewItem.MouseDoubleClick fires three times. Pin
Lutosław13-May-08 1:58
Lutosław13-May-08 1:58 
AnswerProblem resolved Pin
Lutosław13-May-08 2:02
Lutosław13-May-08 2:02 
GeneralRe: Problem resolved Pin
Mark Salsbery13-May-08 6:22
Mark Salsbery13-May-08 6:22 
GeneralRe: Problem resolved Pin
Lutosław14-May-08 14:46
Lutosław14-May-08 14:46 
GeneralRe: Problem resolved Pin
Mark Salsbery14-May-08 14:53
Mark Salsbery14-May-08 14:53 
GeneralRe: Problem resolved Pin
Lutosław14-May-08 23:10
Lutosław14-May-08 23:10 
Here is a complete code:
private void AllToUI(MenuNode node, ItemCollection items)
{
    foreach (MenuNode subNode in node.Nodes) {
        NodeToUI(node, items);
        if (subNode.Nodes.Count > 0)
	        AllToUI(subNode, items);
    }
}
private void NodeToUI(MenuNode node, ItemCollection items)
{
    TreeViewItem item = new TreeViewItem();
    StackPanel itemContent = new StackPanel() {
        Orientation = Orientation.Horizontal
    };
    item.Header = itemContent;
    if (node.GetBitmap() != null)
        itemContent.Children.Add(new Image {
	        Height = 20,
	        Source = node.GetBitmap()
        });
    Label content = new Label { Content = node.Header };
    if (!System.IO.File.Exists(node.File))
        content.Foreground = Brushes.Gray;
    itemContent.Children.Add(content);
    items.Add(item);
    item.Expanded += new RoutedEventHandler(item_Expanded);
    item.MouseDoubleClick += new MouseButtonEventHandler(item_MouseDoubleClick);
    item.Tag = node;
}

void item_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
    if (treeMenu.SelectedItem == e.Source) {
        e.Handled = true;
        packLaunch();
    }
}

In fact this also doesn't work because after packLaunch(); a new window appears behind the main window, which is unacceptable.

Greetings - Gajatko

Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

QuestionDataBinding using WPF Pin
cbe_200813-May-08 0:24
cbe_200813-May-08 0:24 
AnswerRe: DataBinding using WPF Pin
Pete O'Hanlon13-May-08 0:42
mvePete O'Hanlon13-May-08 0:42 
QuestionWorld map using silverlight Pin
rajahram11-May-08 21:35
rajahram11-May-08 21:35 
AnswerRe: World map using silverlight Pin
Michael Sync11-May-08 22:07
Michael Sync11-May-08 22:07 
QuestionHow to create Tab control in silver light (Expression Blend 2) Pin
kishorekumar.malla@live.com10-May-08 23:41
kishorekumar.malla@live.com10-May-08 23:41 
AnswerRe: How to create Tab control in silver light (Expression Blend 2) Pin
Michael Sync11-May-08 22:03
Michael Sync11-May-08 22:03 
QuestionExpression Blend UserControl [modified] Pin
BlitzPackage10-May-08 19:42
BlitzPackage10-May-08 19:42 
AnswerRe: Expression Blend UserControl Pin
Insincere Dave11-May-08 8:01
Insincere Dave11-May-08 8:01 
Questioncombo Box Binding Pin
AAKAra9-May-08 11:38
AAKAra9-May-08 11:38 
AnswerRe: combo Box Binding Pin
User 27100910-May-08 0:17
User 27100910-May-08 0:17 
GeneralRe: combo Box Binding Pin
AAKAra10-May-08 5:41
AAKAra10-May-08 5:41 
GeneralRe: combo Box Binding Pin
User 27100910-May-08 5:44
User 27100910-May-08 5:44 
QuestiondnrTV Silverlight presentations won't run Pin
Kevin McFarlane9-May-08 9:27
Kevin McFarlane9-May-08 9:27 
AnswerRe: dnrTV Silverlight presentations won't run Pin
Michael Sync15-May-08 7:34
Michael Sync15-May-08 7:34 
QuestionKarl Shifflett - MasterPages Pin
Jammer9-May-08 5:01
Jammer9-May-08 5:01 
AnswerRe: Karl Shifflett - MasterPages Pin
User 2710099-May-08 5:22
User 2710099-May-08 5:22 
QuestionWPF App and Debug Issue Pin
Jammer9-May-08 3:33
Jammer9-May-08 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.