Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree view project #448

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 31 additions & 22 deletions Sample Applications/WPF Application Samples.sln
Original file line number Diff line number Diff line change
@@ -1,61 +1,63 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23103.0
# Visual Studio Version 17
VisualStudioVersion = 17.4.33103.184
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConcentricRingsDemo", "ConcentricRingsDemo\ConcentricRingsDemo.csproj", "{0C7755BD-E5D1-4CB1-8271-445863408B5B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConcentricRingsDemo", "ConcentricRingsDemo\ConcentricRingsDemo.csproj", "{0C7755BD-E5D1-4CB1-8271-445863408B5B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CubeAnimationDemo", "CubeAnimationDemo\CubeAnimationDemo.csproj", "{8EF611EF-44AD-4871-9CF9-A80D501A1300}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CubeAnimationDemo", "CubeAnimationDemo\CubeAnimationDemo.csproj", "{8EF611EF-44AD-4871-9CF9-A80D501A1300}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomComboBox", "CustomComboBox\CustomComboBox.csproj", "{9E3EECAF-86CF-45CB-8ABB-01A850A308F0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomComboBox", "CustomComboBox\CustomComboBox.csproj", "{9E3EECAF-86CF-45CB-8ABB-01A850A308F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataBindingDemo", "DataBindingDemo\DataBindingDemo.csproj", "{D56C3A49-C7A9-42E5-9C59-AF1670B08276}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataBindingDemo", "DataBindingDemo\DataBindingDemo.csproj", "{D56C3A49-C7A9-42E5-9C59-AF1670B08276}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DropShadow", "DropShadow\DropShadow.csproj", "{5E760E96-A59B-491D-9FDC-70587AE24240}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DropShadow", "DropShadow\DropShadow.csproj", "{5E760E96-A59B-491D-9FDC-70587AE24240}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditingExaminerDemo", "EditingExaminerDemo\EditingExaminerDemo.csproj", "{E689F47C-198B-4E3C-941D-81BD73D61B2C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EditingExaminerDemo", "EditingExaminerDemo\EditingExaminerDemo.csproj", "{E689F47C-198B-4E3C-941D-81BD73D61B2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExpenseItDemo", "ExpenseItDemo\ExpenseItDemo.csproj", "{D1729F17-99A5-45AF-AB38-72FA6ECCE609}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ExpenseIt", "ExpenseIt", "{07258053-D6F1-4D8F-B3E4-A93423EFDF78}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditBoxControlLibrary", "EditBoxControlLibrary\EditBoxControlLibrary.csproj", "{558EEE03-6927-4FE6-AEB6-972769960849}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FontDialogDemo", "FontDialog\FontDialogDemo.csproj", "{18DA881E-FE67-46E6-95E5-6FDC99331E2B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FontDialogDemo", "FontDialog\FontDialogDemo.csproj", "{18DA881E-FE67-46E6-95E5-6FDC99331E2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeometryDesignerDemo", "GeometryDesignerDemo\GeometryDesignerDemo.csproj", "{FBA69105-5C42-44A4-82E6-0BF3BC09F2A5}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeometryDesignerDemo", "GeometryDesignerDemo\GeometryDesignerDemo.csproj", "{FBA69105-5C42-44A4-82E6-0BF3BC09F2A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphingCalculatorDemo", "GraphingCalculatorDemo\GraphingCalculatorDemo.csproj", "{1C45AF74-269B-4828-A054-6D0761304E61}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphingCalculatorDemo", "GraphingCalculatorDemo\GraphingCalculatorDemo.csproj", "{1C45AF74-269B-4828-A054-6D0761304E61}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexSphereDemo", "HexSphereDemo\HexSphereDemo.csproj", "{48FC0038-9FDF-443C-B24B-9418C8956100}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HexSphereDemo", "HexSphereDemo\HexSphereDemo.csproj", "{48FC0038-9FDF-443C-B24B-9418C8956100}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LayoutTransitionsDemo", "LayoutTransitionsDemo\LayoutTransitionsDemo.csproj", "{9CB40026-7C2F-441F-B496-CDBB454AC309}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LayoutTransitionsDemo", "LayoutTransitionsDemo\LayoutTransitionsDemo.csproj", "{9CB40026-7C2F-441F-B496-CDBB454AC309}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogonScreenDemo", "LogonScreenDemo\LogonScreenDemo.csproj", "{20B6AAAA-E9A8-43B6-83A8-E855206269B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotepadDemo", "NotepadDemo\NotepadDemo.csproj", "{AC0A939B-050C-46B5-9EC8-F5349616AD03}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ParticlesDemo", "ParticlesDemo\ParticlesDemo.csproj", "{F10AB8C9-CE19-44D6-BEA6-9EBA03850664}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ParticlesDemo", "ParticlesDemo\ParticlesDemo.csproj", "{F10AB8C9-CE19-44D6-BEA6-9EBA03850664}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhotoFlipperDemo", "PhotoFlipperDemo\PhotoFlipperDemo.csproj", "{769F1C36-6975-4390-8D67-9E50A42D2755}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PhotoFlipperDemo", "PhotoFlipperDemo\PhotoFlipperDemo.csproj", "{769F1C36-6975-4390-8D67-9E50A42D2755}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhotoStoreDemo", "PhotoStoreDemo\PhotoStoreDemo.csproj", "{D6567F46-7604-4714-9785-F99341AE5C81}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PhotoStoreDemo", "PhotoStoreDemo\PhotoStoreDemo.csproj", "{D6567F46-7604-4714-9785-F99341AE5C81}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StickyNotesDemo", "StickyNotesDemo\StickyNotesDemo.csproj", "{4CB08E17-0C15-4F66-8659-003D39E576BA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StickyNotesDemo", "StickyNotesDemo\StickyNotesDemo.csproj", "{4CB08E17-0C15-4F66-8659-003D39E576BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlidePuzzleDemo", "SlidePuzzleDemo\SlidePuzzleDemo.csproj", "{587E93FE-3686-4AE0-88A7-2E067AB0783A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SlidePuzzleDemo", "SlidePuzzleDemo\SlidePuzzleDemo.csproj", "{587E93FE-3686-4AE0-88A7-2E067AB0783A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrafficAlertDemo", "TrafficAlertDemo\TrafficAlertDemo.csproj", "{0980E7C5-85A6-4451-B9E0-71EB4CDEC52A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CalculatorDemo", "CalculatorDemo\CalculatorDemo.csproj", "{5731865D-6685-47A7-8877-5DBAF39B54CD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CalculatorDemo", "CalculatorDemo\CalculatorDemo.csproj", "{5731865D-6685-47A7-8877-5DBAF39B54CD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VideoTextDemo", "VideoTextDemo\VideoTextDemo.csproj", "{8FD5A19E-9F9D-4F54-A2A6-4459A11E292A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhotoViewerDemo", "PhotoViewerDemo\PhotoViewerDemo.csproj", "{77372DB6-7B08-404D-B70E-69CF5ACD865C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PhotoViewerDemo", "PhotoViewerDemo\PhotoViewerDemo.csproj", "{77372DB6-7B08-404D-B70E-69CF5ACD865C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VideoViewerDemo", "VideoViewerDemo\VideoViewerDemo.csproj", "{439F91F2-9A8D-41EF-B9BB-D7CB2BCF3F10}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VideoViewerDemo", "VideoViewerDemo\VideoViewerDemo.csproj", "{439F91F2-9A8D-41EF-B9BB-D7CB2BCF3F10}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlToXamlDemo", "HtmlToXamlDemo\HtmlToXamlDemo.csproj", "{1AF5ED2C-BB8A-4B12-8CB5-8C8F2E838908}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HtmlToXamlDemo", "HtmlToXamlDemo\HtmlToXamlDemo.csproj", "{1AF5ED2C-BB8A-4B12-8CB5-8C8F2E838908}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfTreeView", "WpfTreeView\WpfTreeView.csproj", "{4DB0B7F2-36D1-4A9D-8EAF-DF4E4A0043E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -167,6 +169,10 @@ Global
{1AF5ED2C-BB8A-4B12-8CB5-8C8F2E838908}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AF5ED2C-BB8A-4B12-8CB5-8C8F2E838908}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1AF5ED2C-BB8A-4B12-8CB5-8C8F2E838908}.Release|Any CPU.Build.0 = Release|Any CPU
{4DB0B7F2-36D1-4A9D-8EAF-DF4E4A0043E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DB0B7F2-36D1-4A9D-8EAF-DF4E4A0043E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DB0B7F2-36D1-4A9D-8EAF-DF4E4A0043E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DB0B7F2-36D1-4A9D-8EAF-DF4E4A0043E5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -175,4 +181,7 @@ Global
{D1729F17-99A5-45AF-AB38-72FA6ECCE609} = {07258053-D6F1-4D8F-B3E4-A93423EFDF78}
{558EEE03-6927-4FE6-AEB6-972769960849} = {07258053-D6F1-4D8F-B3E4-A93423EFDF78}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CA7A4369-DB85-4780-872F-FD5AFEA01D0E}
EndGlobalSection
EndGlobal
9 changes: 9 additions & 0 deletions Sample Applications/WpfTreeView/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="WpfTreeView.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfTreeView"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions Sample Applications/WpfTreeView/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace WpfTreeView
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
10 changes: 10 additions & 0 deletions Sample Applications/WpfTreeView/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
52 changes: 52 additions & 0 deletions Sample Applications/WpfTreeView/HeaderToImageConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace WpfTreeView
{
/// <summary>
/// Converts a full path to a specific image type of a drive, folder or file.
/// </summary>

[ValueConversion(typeof(string), typeof(BitmapImage))]
public class HeaderToImageConverter : IValueConverter
{
public IDictionary<string, ImageSource> KnownFiles { get; set; }

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
// Get the full Path
var path = (string)value;

// if the path is null, ignore
if (path == null)
return null;

// Get the name of the file/folder
var name = MainWindow.GetFileFolderName(path);

// By default, we presume an image
var image = "Images/file.png";

// If the name is blank, we presume it's a drive as we cannot have a blank file or folder name
if (string.IsNullOrEmpty(name))
image = "Images/drive.png";
else if (new FileInfo(path).Attributes.HasFlag(FileAttributes.Directory)) // checks if this path is a directory
image = "Images/folder-closed.png";
else if (KnownFiles != null && KnownFiles.ContainsKey(Path.GetExtension(path)))
return KnownFiles[Path.GetExtension(path)];

return new BitmapImage(new Uri($"pack://application:,,,/{image}"));

}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
Binary file added Sample Applications/WpfTreeView/Images/c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/cpp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/csharp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/java.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/json.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/pdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/python.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/txt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sample Applications/WpfTreeView/Images/xlsx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions Sample Applications/WpfTreeView/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<Window x:Class="WpfTreeView.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfTreeView"
Loaded="Window_Loaded"
mc:Ignorable="d"
Name="This"
Title="MainWindow" Height="450" Width="800">

<Window.InputBindings>
<KeyBinding Key="C" Modifiers="Ctrl" Command="{Binding ElementName=This, Path=CopyCommand}"/>
<KeyBinding Key="V" Modifiers="Ctrl" Command="{Binding ElementName=This, Path=PasteCommand}"/>
<KeyBinding Key="X" Modifiers="Ctrl" Command="{Binding ElementName=This, Path=CutCommand}"/>
</Window.InputBindings>
<Window.Resources>
<BitmapImage x:Key="PythonIcon" UriSource="Images/python.png"/>
<BitmapImage x:Key="CSharpIcon" UriSource="Images/csharp.png"/>
<BitmapImage x:Key="CIcon" UriSource="Images/c.png"/>
<BitmapImage x:Key="CppIcon" UriSource="Images/cpp.png"/>
<BitmapImage x:Key="JavaIcon" UriSource="Images/java.png"/>
<BitmapImage x:Key="JavascriptIcon" UriSource="Images/javascript.png"/>
<BitmapImage x:Key="TextIcon" UriSource="Images/txt.png"/>
<BitmapImage x:Key="JsonIcon" UriSource="Images/json.png"/>
<BitmapImage x:Key="XslxIcon" UriSource="Images/xlsx.png"/>
<BitmapImage x:Key="PdfIcon" UriSource="Images/pdf.png"/>
<local:HeaderToImageConverter x:Key="ImageConverter"/>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>

<StackPanel Orientation="Horizontal" Grid.Row="0">
<Button Content="Copy" Command="{Binding ElementName=This, Path=CopyCommand}"/>
<Button Content="Paste" Command="{Binding ElementName=This, Path=PasteCommand}"/>
<Button Content="Cut" Command="{Binding ElementName=This, Path=CutCommand}"/>
</StackPanel>
<TreeView x:Name="FolderView"
Grid.Row="1"
SelectedItemChanged="FolderView_SelectedItemChanged"
Focusable="True"
AllowDrop="True">
<TreeView.ContextMenu>
<ContextMenu>
<MenuItem Header="Refresh" Command="{Binding RefreshCommand}"/>
<MenuItem Header="Copy" Command="{Binding CopyCommand}"/>
<MenuItem Header="Paste" Command="{Binding PasteCommand}"/>
<MenuItem Header="Cut" Command="{Binding CutCommand}"/>
<MenuItem Header="Open in Explorer" Command="{Binding OpenExplorerCommand}"/>
</ContextMenu>
</TreeView.ContextMenu>

<TreeView.Resources>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="KeyboardNavigation.TabNavigation" Value="Continue"/>
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Width="20" Margin="3"
Source="{Binding
RelativeSource={RelativeSource
Mode=FindAncestor,
AncestorType={x:Type TreeViewItem}},
Path=Tag,
Converter={StaticResource ImageConverter}
}" />
<TextBlock VerticalAlignment="Center" Text="{Binding}" />
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</TreeView.Resources>


<TreeView.ItemContainerStyle>
<Style TargetType ="{x:Type TreeViewItem}">
<!-- We have to select the item which is right-clicked on -->
<!--<EventSetter Event="TreeViewItem.DragOver" Handler="treeView_DragOver" />-->
<!--<EventSetter Event="TreeViewItem.Drop" Handler="treeView_Drop" />-->
<!--<EventSetter Event="TreeViewItem.MouseMove" Handler="treeView_MouseMove" />-->
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
</Grid>
</Window>


Loading