Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Window x:Class="_WPF__CREATE_TREE_OF_FOLDER.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:_WPF__CREATE_TREE_OF_FOLDER"
- mc:Ignorable="d"
- Title="MainWindow" Height="600" Width="800" MinHeight="600" MinWidth="800"
- WindowStartupLocation="CenterScreen">
- <Window.Resources>
- <local:WidthFourConverter x:Key="widthFourConverter" />
- <local:WidthFourConverter1 x:Key="widthFourConverter1" />
- </Window.Resources>
- <DockPanel>
- <Menu DockPanel.Dock="Top">
- <MenuItem Header="_File" >
- <MenuItem Header="_Open Folder" Click="MenuItem_Click" />
- <Separator />
- <MenuItem Header="_Exit" Click="MenuItem_Click_1"/>
- </MenuItem>
- <MenuItem Header="_About" Click="MenuItem_Click_2" />
- </Menu>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="3*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <ListView Margin="5" BorderThickness="1" BorderBrush="Black" ScrollViewer.CanContentScroll="False"
- >
- <ListView.ItemContainerStyle>
- <Style TargetType="{x:Type ListViewItem}">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListViewItem}">
- <ContentPresenter />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ListView.ItemContainerStyle>
- <Expander Header="Explorer" Expanded="Expander_Expanded" Margin="5,5,5,5">
- <TreeView x:Name="foldersItem" Margin="5,5,5,5" Padding="5,5,5,5"
- Width="Auto" Background="#FFFFFFFF" BorderBrush="Black" Foreground="#FFFFFFFF">
- </TreeView>
- </Expander>
- <Expander Header="File Info" Margin="5,5,5,5" >
- <Border Name="b" Padding="5" BorderThickness="1" BorderBrush="black" Background="LightGray">
- <TextBlock Name="nofile">No File is Selected</TextBlock>
- </Border>
- </Expander>
- <Expander Header="Slide Show" Margin="5,5,5,5"/>
- </ListView>
- <ListView ItemsSource="{Binding Images}" Margin="5" BorderThickness="1" BorderBrush="Black" Grid.Column="2">
- <ListView.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation ="Vertical" >
- <Border Width ="100" Height ="100" HorizontalAlignment ="Left" BorderBrush =" Black " BorderThickness ="1">
- <Image Source="{Binding ImageSource}" Height="100" Width="100"></Image>
- </Border>
- <TextBlock x:Name="tipText" Text="{Binding Filename}" HorizontalAlignment="Center"/>
- </StackPanel>
- </DataTemplate>
- </ListView.ItemTemplate>
- <ListView.ItemsPanel>
- <ItemsPanelTemplate >
- <WrapPanel Width ="{Binding ActualWidth, RelativeSource ={RelativeSource AncestorType = ListView }}" />
- </ItemsPanelTemplate >
- </ListView.ItemsPanel >
- </ListView>
- </Grid>
- </DockPanel>
- </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement