Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <UserControl x:Class="ePharma.Silverlight.View.Controls.CategoryControl"
- 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:vm="clr-namespace:ePharma.Silverlight.ViewModel"
- mc:Ignorable="d"
- xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" Height="300" Width="300">
- <UserControl.Resources>
- <vm:MenuGroupBoxViewModel x:Key="MenuGroupBoxVM"></vm:MenuGroupBoxViewModel>
- <sdk:HierarchicalDataTemplate x:Key="SubItemTemplate" ItemsSource="{Binding Path=Categorie.SubCategorie}">
- <TextBlock Text="{Binding Path=SubCategoryId}" Foreground="Red"/>
- </sdk:HierarchicalDataTemplate>
- <sdk:HierarchicalDataTemplate x:Key="MainItemTemplate" ItemTemplate="{StaticResource SubItemTemplate}" >
- <TextBlock Text="{Binding Path=CategoryId}" Foreground="Blue"/>
- </sdk:HierarchicalDataTemplate>
- </UserControl.Resources>
- <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource MenuGroupBoxVM}}">
- <sdk:TreeView Height="200" HorizontalAlignment="Left" Name="treeView" VerticalAlignment="Top" Width="174"
- ItemTemplate="{StaticResource MainItemTemplate}" ItemsSource="{Binding Path=Categories}" />
- </Grid>
- </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement