This is a migrated thread and some comments may be shown as answers.

outlookbar horizontal splitter

1 Answer 41 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
Syed Asif
Top achievements
Rank 1
Syed Asif asked on 15 Jul 2013, 09:42 AM
outlookbar horizontal splitter it working in silverlight4 but same code its not working silverlight5 ,i am bining the the outlook bar from code behind
and ui also outlookbar horizontal splitter not able resize

           RadTreeView pnlMenuBar = new RadTreeView();
            pnlMenuBar.Style = (Style)Application.Current.Resources["RadTreeViewStyle1"];
            pnlMenuBar.IsExpandOnSingleClickEnabled = true;
            pnlMenuBar.Selected += new EventHandler<RadRoutedEventArgs>(pnlMenuBar_Selected);

            //RadOutlookBarItem OutLookRootItem = new RadOutlookBarItem();
            OutLookRootItem.Header = pNavigation.HeaderCaption;
            if (this.DefualtModule.Contains(pNavigation.HeaderCaption))
                OutLookRootItem.IsSelected = true;
            OutLookRootItem.Style = (Style)Application.Current.Resources["RadOutlookBarItemStyle1"];
            OutLookRootItem.Tag = pNavigation.Delegate;

            Image imgSrc = new Image();
            if (pNavigation.IconCode != null)
            {
                imgSrc.Source = new BitmapImage(new Uri(pNavigation.IconCode, UriKind.Relative));
                OutLookRootItem.Icon = imgSrc.Source;
            }
            foreach (NavigationRootLink root in pNavigation.RootItems)
            {
                RadTreeViewItem headerItem = new RadTreeViewItem();
                headerItem.Style = (Style)Application.Current.Resources["TreeViewRootStyle"];
                headerItem.Header = root.ItemName;
                if (root.IconCode != null)
                {
                    imgSrc.Source = new BitmapImage(new Uri(root.IconCode, UriKind.Relative));
                    headerItem.DefaultImageSrc = imgSrc.Source;
                }
                foreach (NavigationItemLink item in root.ChildItems)
                {
                    RadTreeViewItem childItem = new RadTreeViewItem();
                    if (item.IconCode != null)
                    {
                        imgSrc.Source = new BitmapImage(new Uri(item.IconCode, UriKind.Relative));
                        childItem.DefaultImageSrc = imgSrc.Source;
                    }
                    childItem.Style = (Style)Application.Current.Resources["TreeViewNodeStyle"];
                    childItem.Header = item.ItemName;
                    childItem.Tag = item.Delegate;
                    headerItem.Items.Add(childItem);
                }
                headerItem.Tag = root.Delegate;
                pnlMenuBar.Items.Add(headerItem);
            }
            ScrollViewer scrollstyle = new ScrollViewer();
            scrollstyle.Style = (Style)Application.Current.Resources["ScrollViewerStyle1"];
            scrollstyle.Content = pnlMenuBar;
            OutLookRootItem.Content = scrollstyle;
            if (this.DefualtModule.Contains(pNavigation.HeaderCaption))
            {
                var selectedMenuBar = ((ScrollViewer)OutLookRootItem.Content).Content as RadTreeView;
                if (selectedMenuBar != null)
                {
                    selectedMenuBar.CollapseAll();
                    var selTree = (from RadTreeViewItem headerItem in selectedMenuBar.Items select headerItem).FirstOrDefault();
                    if (selTree != null)
                    {
                        selTree.IsSelected = true;
                        ((LoadItemHandler)selTree.Tag).Invoke();
                    }
                }
            }

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 17 Jul 2013, 12:18 PM
Hello Syed,

I have posted an answer in the other thread you have opened. I was not able to use the code snippet to reproduce the issue and a sample project would be the best way to address the case.

I would like to recommend you use a single thread if the issues are the same. This will make our forums more useful for the clients.

Regards,
Hristo
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
OutlookBar
Asked by
Syed Asif
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or