|
<Window x:Class="FileBrowser.cs.Browser"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:odc="clr-namespace:Odyssey.Controls;assembly=Odyssey"
xmlns:local="clr-namespace:FileBrowser.cs"
Title="BreadcrumbBar Browser Demo" Height="300" Width="700" Background="LightSteelBlue">
<Window.Resources>
<DataTemplate DataType="{x:Type local:FolderItem}">
<TextBlock Text="{Binding Folder}"/>
</DataTemplate>
<Style TargetType="{x:Type odc:BreadcrumbItem}">
<Setter Property="Image" Value="Web.png"/>
</Style>
</Window.Resources>
<DockPanel Margin="4">
<odc:BreadcrumbBar x:Name="bar" Focusable="True"
DockPanel.Dock="Top"
Path="Computer\C:\"
PopulateItems="BreadcrumbBar_PopulateItems"
BreadcrumbItemDropDownOpened="bar_BreadcrumbItemDropDownOpened"
TraceBinding="{Binding Folder}"
ImageBinding="{Binding Image}"
PathConversion="BreadcrumbBar_PathConversion">
<odc:BreadcrumbBar.Buttons>
<Button Click="Button_Click">Refresh</Button>
</odc:BreadcrumbBar.Buttons>
<odc:BreadcrumbBar.DropDownItems>
<TextBlock Text="C:\Windows"/>
<TextBlock Text="C:\Windows\System32"/>
<TextBlock Text="C:\Users"/>
</odc:BreadcrumbBar.DropDownItems>
<odc:BreadcrumbItem Header="Desktop">
<odc:BreadcrumbItem Header="Computer"/>
<odc:BreadcrumbItem Header="Network"/>
<odc:BreadcrumbItem Header="Control Panel"/>
<odc:BreadcrumbItem Header="Recylce bin"/>
</odc:BreadcrumbItem>
</odc:BreadcrumbBar>
<StatusBar DockPanel.Dock="Bottom" Background="Transparent">
<TextBlock DockPanel.Dock="Bottom" Text="{Binding Path, ElementName=bar}"/>
</StatusBar>
<Grid>
</Grid>
</DockPanel>
</Window>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.