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

Customizing Outlookbar (remove ContentElement, ItemPresenter)

2 Answers 133 Views
OutlookBar
This is a migrated thread and some comments may be shown as answers.
Christian Casutt
Top achievements
Rank 1
Christian Casutt asked on 11 May 2010, 04:38 PM
I want to customize the RadOutlookBar Control. I know i can create a ControlTemplate, that's what i did in the past, but this had the 'side-effect' that everytime, when there's a new release of the telerik controls, i had to remove and recreate the control template otherwise the designer (VS.NET 2010 and Blend3/4RC) did not render the controls correctly.

What i want is a RadOutlookBar without the ContentPresenter (ContentElement) and without the HorizontalSplitter. in other words, i need the RadOutlookBar ContentPresenter to have the same Content (a RadTreeView) 'independently' of the selected OutlookBarItem / Button. How can i accomplish this?

help's appreciated

Christian

2 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 13 May 2010, 04:52 PM
Hello Christian,

I am not sure what you are trying to achieve, but besides editing the ControlTemplate of RadOutlookBar, another way to remove/hide the horizontal splitter and the content element is by using VisualTreeHelper:

private void HideHorizontalSplitter_Click(object sender, RoutedEventArgs e)
{
    Panel root = VisualTreeHelper.GetChild(this.outlookBar1, 0) as Panel;
    Thumb horizontalSplitter = root.FindName("HorizontalSplitter") as Thumb;
    horizontalSplitter.Visibility = Visibility.Collapsed;
}
 
private void HideContentElement_Click(object sender, RoutedEventArgs e)
{
    Panel root = VisualTreeHelper.GetChild(this.outlookBar1, 0) as Panel;
    ContentPresenter contentElement = root.FindName("ContentElement") as ContentPresenter;
    contentElement.Visibility = Visibility.Collapsed;
}

Does this information help? If not, could you please elaborate a little bit more on the scenario you try to achieve. I'd be glad to further assist you.

Best wishes,
Kiril Stanoev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Dennys
Top achievements
Rank 1
answered on 08 Feb 2011, 02:37 PM
Is there a way to hide the HorizontalSplitter with a xaml declaration?


EDIT:

Just managed to do it ;)

XAML:
<Style TargetType="Thumb" x:Key="MyHorizontalSplitterStyle">
    <Setter Property="Visibility" Value="Collapsed"></Setter>
</Style>
 
<telerik:RadOutlookBar HorizontalSplitterStyle="{StaticResource MyHorizontalSplitterStyle}">
Tags
OutlookBar
Asked by
Christian Casutt
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Dennys
Top achievements
Rank 1
Share this question
or