示例#1
0
 public PickGenreImage(GenrePath genrePath)
 {
     InitializeComponent();
     DataContext = this;
     InitializePidList(genrePath.Path);
     GenrePath = genrePath;
 }
示例#2
0
        private void ZoomIn_Click(object sender, RoutedEventArgs e)
        {
            GenrePath clicked = (sender as Button).DataContext as GenrePath;

            if (clicked.Children.Count() > 0)
            {
                treeMap.ItemsSource = clicked.Children;
            }
            else
            {
                new PickGenreImage(clicked).Show();
            }
        }
示例#3
0
        private void ZoomOut_Click(object sender, RoutedEventArgs e)
        {
            IEnumerable <GenrePath> selection = (treeMap.ItemsSource as IEnumerable <GenrePath>);

            if (selection != null)
            {
                if (selection.Count() > 0)
                {
                    GenrePath item   = selection.First();
                    GenrePath parent = (from p in paths where p.Path == item.Parent select p).FirstOrDefault();
                    if (parent != null)
                    {
                        treeMap.ItemsSource = from p in paths where p.Parent == parent.Parent select p;
                    }
                }
            }
        }