Telerik Forums
UI for Silverlight Forum
4 answers
82 views

Hi,

 Is there a possibility to detect as an event when a BreadCrumb item is expanded and then collapsed?

 Thank you.

Jerome MAILLEY
Top achievements
Rank 1
 answered on 27 May 2015
2 answers
78 views
Hi. How to view all the name without scrollbar? (first attachment file)
And how to move the menu? (second attachment file)
Thanks for help
Pavel R. Pavlov
Telerik team
 answered on 05 Jan 2015
5 answers
60 views
Hi there,

Will someone please guide me on how to update BreadCrumb items after they've been bound once. I've tried it multiple ways and no matter what variation I try, I always get some kind of read-only collection exception. It seems like a simple thing to update the collection of the RootBreadCrumb but I have yet to be successful.

Thanks!
Adam.g
Zarko
Telerik team
 answered on 06 Aug 2014
2 answers
37 views
Dear telerik forum,

Is it possible to open the dropdown of a breadcrumb when user clicks on the header?
Currently, it seems the user has to explicitly click on the arrow, and we get feedback from users that they do not find that intuitive. They click on the header text and expect the dropdown to open.

Any help appreciated,

Yves.
Yves
Top achievements
Rank 1
 answered on 08 Apr 2014
3 answers
54 views
1. Problem
If I set Path via mvvm BreadCrump not want to update UI or simple show only root name.

 

Path="{Binding Path=SelectedTreePath, Mode=TwoWay }"


<telerik:RadBreadcrumb x:Name="breadcrumbDocumentCategory" 
  
Header="{Binding PathDocumentsTree}" 
   
ItemsSource="{Binding Path=PathDocumentsTree.ChildNodes, Mode=TwoWay}" 
  
PathSeparator="/" TextModePath="Header" 
  
Path="{Binding Path=SelectedTreePath, Mode=TwoWay }"    
IsHistoryEnabled="True"
   
  
<telerik:RadBreadcrumb.HeaderTemplate
   
 
<DataTemplate
   
  <TextBlock Text="{Binding CategoryName}" /> 
   
</DataTemplate
   
</telerik:RadBreadcrumb.HeaderTemplate
  
<telerik:RadBreadcrumb.ItemTemplate
   
<telerik:HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}"
  
<TextBlock Text="{Binding CategoryName}" /> 
   
</telerik:HierarchicalDataTemplate
  
</telerik:RadBreadcrumb.ItemTemplate
  
</telerik:RadBreadcrumb

 

private
  
   
  
   
  
string _selectedTreePath; 
   
  
   
  
   
  
public string SelectedTreePath 
   
  
{
  
   
  
   
  
get 
   
  
{
  
_recResult = 
  
   
  
string.Empty; 
   
  
   
  
   
  
if (this.SelectedTreeNode as CategoryViewModel != null && PathDocumentsTree != null
   
  
{
  
_selectedTreePath = ContainerFromItemRecursive(
  
   
  
this.SelectedTreeNode as CategoryViewModel, PathDocumentsTree.ChildNodes); 
   
  
   
  
Breadcrumb.Path = _selectedTreePath;
  
}
  
   
  
   
  
return _selectedTreePath; 
   
  
}
  
   
  
   
  
set { _selectedTreePath = value; RaisePropertyChanged(() => SelectedTreePath); } 
   
  
}
  
  
  
  
private
  
   
  
   
  
string ContainerFromItemRecursive(CategoryViewModel selectedTreeNode, IEnumerable<CategoryTree> documentTree, string path = null
   
  
  
   
  
   
  
if (documentTree != null
   
  
{
  
   
  
   
  
string mp = path; 
   
  
   
  
   
  
int n = 0; 
   
  
   
  
   
  
foreach (var item in documentTree) 
   
  
{
  
mp = mp + CPathSeparator + item.CategoryName;
  
   
  
   
  
if (item.CategoryId == selectedTreeNode.ID) 
   
  
{
  
path = GetPath(mp, n) + CPathSeparator + item.CategoryName;
  
_recResult = CRootName + CPathSeparator + path.Replace(
  
   
  
"//", CPathSeparator); 
   
  
   
  
   
  
break
   
  
}
  
   
  
   
  
else 
   
  
  
ContainerFromItemRecursive(selectedTreeNode, item.ChildNodes, mp); 
  
}
  
n++;
  
}
  
  
   
  
   
  
return _recResult.Replace("//", CPathSeparator); 
   
  
}


2. Second problem is runtime error if I use CurrentItem to change UI address in RadBreadcrumb (if not appear error it is work correct).

My be problem is becouse I do not use your recursive travers tree function like ContainerFromItemRecursive()?

this

 

 

.explorerBreadcrumb.Path = this.explorerTree.ContainerFromItemRecursive(e.AddedItems[0]).FullPath;

 


But I thing mine function result is equal to yours?


 I have error in when call RaisePropertyChanged(() => SelectedTreePathItem);

   //Error
   Ambiguous match found.
   {System.Collections.ListDictionaryInternal}

   at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
   at System.Type.GetProperty(String name)
   at Telerik.Windows.Controls.RadBreadcrumb.GetItemChildren(Object currentItem)
   at Telerik.Windows.Controls.RadBreadcrumb.FindCurrentItemRecursively(String currentPath, IEnumerable items, Object searchValue)
   at Telerik.Windows.Controls.RadBreadcrumb.FindCurrentItem(Object newValue)
   at Telerik.Windows.Controls.RadBreadcrumb.OnCurrentItemChanged(Object oldValue, Object newValue)
   at Telerik.Windows.Controls.RadBreadcrumb.OnCurrentItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
   at System.Windows.Data.BindingExpression.SendDataToTarget()
   at System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
   at System.Windows.PropertyPathListener.ReconnectPath()
   at System.Windows.Data.Debugging.BindingBreakPoint.<>c__DisplayClass4.<BreakOnSharedType>b__3()
  
       
   //my binding property in ViewModel    
   private CategoryTree _selectedTreePathItem;
        public CategoryTree SelectedTreePathItem
        {
            get
            {
                _recCategoryResult = null;
                if (this.SelectedTreeNode as CategoryViewModel != null && PathDocumentsTree != null)
                {
                    _selectedTreePathItem = RecursiveTraverseTreeAndLocateItemById(this.SelectedTreeNode as CategoryViewModel, PathDocumentsTree.ChildNodes);
                    //if (_selectedTreePathItem != null)
                    //    _selectedTreePathItem.ChildNodes.Clear();
                }
                return _selectedTreePathItem;
            }
            set { _selectedTreePathItem = value; RaisePropertyChanged(() => SelectedTreePathItem); }
        }
       
       
    // my RadBreadcrumb with CurrentItem
   

<telerik:RadBreadcrumb Header="{Binding PathDocumentsTree}" 
                              ItemsSource="{Binding Path=PathDocumentsTree.ChildNodes, Mode=TwoWay}" 
                                
                              PathSeparator="/" TextModePath="Header"
                              CurrentItem="{Binding SelectedTreePathItem, Mode=TwoWay}"
                              IsHistoryEnabled="True">            
          <telerik:RadBreadcrumb.HeaderTemplate>
               <DataTemplate>
                   <TextBlock Text="{Binding CategoryName}" />
               </DataTemplate>
           </telerik:RadBreadcrumb.HeaderTemplate>
           <telerik:RadBreadcrumb.ItemTemplate>
               <telerik:HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">                   
                   <TextBlock Text="{Binding CategoryName}" />                    
               </telerik:HierarchicalDataTemplate>
           </telerik:RadBreadcrumb.ItemTemplate>
       </telerik:RadBreadcrumb>

        
        
        
          // my function that return value

private CategoryTree _recCategoryResult;
      private CategoryTree RecursiveTraverseTreeAndLocateItemById(CategoryViewModel selectedTreeNode, IEnumerable<CategoryTree> documentTree)
      {                       
          foreach (var item in documentTree)
          {
              if (item.CategoryId == selectedTreeNode.ID)
              {
                  _recCategoryResult = item;
                  break;                    
              }
              RecursiveTraverseTreeAndLocateItemById(selectedTreeNode, item.ChildNodes);
          }
          return _recCategoryResult;
      }
        
        
      // my models
      public class CategoryTree : FeatureCategoryTreeNode, ICategoryTree, INotifyPropertyChanged
  {                
      private ObservableCollection<CategoryTree> _childNodes;
      public new ObservableCollection<CategoryTree> ChildNodes
      {
          get { return _childNodes; }
          set 
          
              _childNodes = value;
              OnPropertyChanged("ChildNodes");
          }
      }
      public CategoryTree(string name)
{
          this.CategoryName = name;
          this.ChildNodes = new ObservableCollection<CategoryTree>();            
}
      public CategoryTree(ICategoryTree categoryTree)
      {
          this.CategoryName = categoryTree.CategoryName;
          this.ChildNodes = new ObservableCollection<CategoryTree>();
      }
      public CategoryTree(FeatureCategory featureCategory)
{
          this.CategoryName = featureCategory.CategoryName;
          this.CategoryId = featureCategory.CategoryId;
          this.ParentId = featureCategory.ParentId;
          this.ChildNodes = new ObservableCollection<CategoryTree>();            
}
      public CategoryTree(IFeatureCategory featureCategory)
{
          this.CategoryName = featureCategory.CategoryName;
          this.CategoryId = featureCategory.CategoryId;
          this.ParentId = featureCategory.ParentId;
          this.ChildNodes = new ObservableCollection<CategoryTree>();            
}
      public CategoryTree()
      {
      }
      public event PropertyChangedEventHandler PropertyChanged;
      public void OnPropertyChanged(string propertyName)
      {
          if (PropertyChanged != null)
              PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
  }
  public interface ICategoryTree
  {
      string CategoryName { get; set; }
      ObservableCollection<CategoryTree> ChildNodes { get; set; }
       
      Guid CategoryId { get; set; }
      Guid ParentId { get; set; }
  }


.
       ...

Pavel R. Pavlov
Telerik team
 answered on 27 Jun 2013
1 answer
96 views

I am currently displaying a Breadcrumb with the intention of showing the Parents of the currentItem.  When the user clicks on the breadcrumb the dropdown displays of all Parents of the currentItem.  When any of those Parents are clicked on the Hierarchical list, it changes the breadcrumb's current item to the newly selected one.

Question:  Is it possible to disable any changes from the Hierarchical dropdown list, i.e. when a user clicks th dropdown nothing will happen.?

I can provide more code if necessary.

<
telerik:RadBreadcrumb x:Name="explorerBreadcrumb"

CurrentItemChanged="explorerBreadcrumb_CurrentItemChanged"

 

Grid.Column="1" Grid.ColumnSpan="2" Margin="60,0,0,0"

 

Header="{Binding Root}"

 

HeaderMemberPath="Header"

 

Path="Path"

 

HierarchicalItemsSource="Parents"

 

HierarchicalMemberPath="Header"

 

IsIconVisible="False"

 

ItemsSource="{Binding Root.Parents}"

 

TextModePath="Path"

 

PathSeparator="=>"

 

IsHistoryEnabled="False"

 

IsTextSearchEnabled="False">

 

</telerik:RadBreadcrumb>

Pavel R. Pavlov
Telerik team
 answered on 20 Mar 2013
4 answers
76 views
Hey,

i have a little problem or rather a suggestion.
The default behavior of the breadcrumb is to display the root header in the path (if not in textmode).
Even the history paths include the root header.

This should also be available in textmode of breadcrumb itself.
Since the breadcrumb is not supporting it, is there a way to get this to work?

Example hierarchy:

Root
-- Node 1
---- Node 1.1

Path: Node 1\Node 1.1
History: Root\Node 1\Node 1.1

Here the path should equal the history.

Greets
Andreas
Top achievements
Rank 1
 answered on 29 Jan 2013
2 answers
116 views
Hey,

Ive got a syncronized breadcrumb and treeview.
The only problem i got is the fact that a node in my treeview on a certain level (which is unknown) has IsLoadOnDemand enabled.

So my question is:
How do i update the current item in the breadcrumb to display its children, or even select those.

For more information about my setup:
I am using a webservice to retrieve a list of hierarchical data items. This result is currently attached to the treeview ItemsSource directly (which will may be moved to a more specific application context list, but doesnt matter here). On the same step the ItemsSource of the breadcrumb will be bound to the same list.

Every node in my tree has an attribute which determines if this node has children. This only indicates if the webservice can give me more information about the children even if the current node object doesn't have children. This is done to keep the loading time/data transport low.

Now if i navigate in the tree, the breadcrumb gets updated due to the current selection in the tree until i get to a node which has IsLoadOnDemand enabled. The node updates itself, but the breadcrumb will stay on the old "object" without childs. If i inspect the items directly, it has children. It looks like the RadBreadCrumbItem not does not update if its Item gets changed. (Little side note here: I have the INotifyPropertyChanged interface implemented on my node to notify if any attribute gets changed.)
Andreas
Top achievements
Rank 1
 answered on 29 Nov 2012
2 answers
59 views
Hi,

We're currently binding to the CurrentItem property of the breadcrumb control. This works, but for some reason, the icon is not changing correctly.
When binding to the path property, everything works, but we would like to avoid using this approach, since converting back and forth between objects and strings is quite cumbersome.
We need this functionality to work, as we're using the same object model for both a treeview and the breadcrumb.


Thanks in advance.
Kenneth
Top achievements
Rank 1
 answered on 19 Nov 2012
1 answer
29 views

Hi,

We are using a RadBreadCrumb for displaying a path. However, when the BreadCrumb is embedded in a Scrollview, it no longer receives focus for typing when the BreadCrumb is clicked with the mouse. There is no cursor and typing does not have any effect.

This does work when the BreadCrumb is not embedded in a ScrollViewer.

It can easily be reproduced with the following xaml code snippet:

<ScrollViewer>
    <telerik:RadBreadcrumb/>
</ScrollViewer>


Is this a known issue?

Thanks

Pavel R. Pavlov
Telerik team
 answered on 11 Oct 2012
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?