Hi,
I have a little problem. I put RadPanel in application based on Visual Studio theme with the following code.
<StackPanel x:Name="NavigationStackPanel">
<telerik:RadPanelBar
x:Name="NavigationPanel"
AutoScrollToSelectedItem="True"
BringIntoViewMode="HeaderAndItems"
ExpandMode="Multiple" SelectionMode="Single"
ItemsSource="{Binding Path=ApplicationNodes}"
ItemTemplate="{StaticResource PanelBarHeaderTemplate}"
SelectionChanged="NavigationPanel_SelectionChanged"
BorderThickness="0"
ScrollViewer.HorizontalScrollBarVisibility="Visible"
ScrollViewer.VerticalScrollBarVisibility="Visible" />
</StackPanel>
Unfortunately, scroll does not work properly as you can see on the screenshots. Any ideas how I can fix it?
Can anyone tell me how to get the second level items to behave like the first level items? I would expect any level that has children to show an expander. In my example, the Send Items header should have an expander icon.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:Calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input" xmlns:Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
xmlns:Animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls.Navigation"
x:Class="WpfApplication2.MainWindow"
Title="MainWindow" Height="500" Width="525">
<Window.Resources>
</Window.Resources>
<Grid>
<telerik:RadPanelBar Margin="10" Width="280" Height="300">
<telerik:RadPanelBarItem Header="Mail">
<telerik:RadPanelBarItem Header="Personal Folder" />
<telerik:RadPanelBarItem Header="Delete Items" />
<telerik:RadPanelBarItem Header="Inbox" />
<telerik:RadPanelBarItem Header="Send Items" >
<telerik:RadPanelBarItem Header="Personal Folder" />
<telerik:RadPanelBarItem Header="Delete Items" />
<telerik:RadPanelBarItem Header="Inbox" />
<telerik:RadPanelBarItem Header="Send Items" />
<telerik:RadPanelBarItem Header="OutBox" />
<telerik:RadPanelBarItem Header="Search Folders" />
</telerik:RadPanelBarItem>
<telerik:RadPanelBarItem Header="OutBox" />
<telerik:RadPanelBarItem Header="Search Folders" />
</telerik:RadPanelBarItem>
<telerik:RadPanelBarItem Header="Contacts">
<telerik:RadPanelBarItem Header="My Contacts" />
<telerik:RadPanelBarItem Header="Address Cards" />
<telerik:RadPanelBarItem Header="Phone List" />
<telerik:RadPanelBarItem Header="Shared Contacts" />
</telerik:RadPanelBarItem>
<telerik:RadPanelBarItem Header="Tasks">
<telerik:RadPanelBarItem Header="My Tasks" />
<telerik:RadPanelBarItem Header="Shared Tasks" />
<telerik:RadPanelBarItem Header="Active Tasks" />
<telerik:RadPanelBarItem Header="Completed Tasks" />
</telerik:RadPanelBarItem>
<telerik:RadPanelBarItem Header="Notes">
<telerik:RadPanelBarItem Header="My Notes" />
<telerik:RadPanelBarItem Header="Notes List" />
<telerik:RadPanelBarItem Header="Shared Notes" />
<telerik:RadPanelBarItem Header="Archive" />
</telerik:RadPanelBarItem>
<telerik:RadPanelBarItem Header="Folders List">
<telerik:RadPanelBarItem Header="My Client.Net" />
<telerik:RadPanelBarItem Header="My Profile" />
<telerik:RadPanelBarItem Header="My Support Tickets" />
<telerik:RadPanelBarItem Header="My Licenses" />
</telerik:RadPanelBarItem>
</telerik:RadPanelBar>
</Grid>
</Window>
Hi all,
I have successfully applied the VisualStudio2013 theme to the panelBar using implicit styling. However, I am still unable to figure out how to apply the VisualStudio2013_Dark Theme. Can anyone help me with this?
I have attached the sample program I used to try on.
<
Application
x:Class
=
"MapSetUp.App"
StartupUri
=
"MainWindow.xaml"
>
<
Application.Resources
>
<
ResourceDictionary
>
<
ResourceDictionary.MergedDictionaries
>
<
ResourceDictionary
Source
=
"Themes/Telerik.Windows.Controls.xaml"
/>
<
ResourceDictionary
Source
=
"Themes/Telerik.Windows.Controls.Navigation.xaml"
/>
</
ResourceDictionary.MergedDictionaries
>
</
ResourceDictionary
>
</
Application.Resources
>
</
Application
>
<
UserControl
x:Class
=
"Telerik.Windows.Examples.PanelBar.FirstLook.Example"
xmlns:interactions
=
"http://schemas.microsoft.com/expression/2010/interactions"
xmlns:interactivity
=
"http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:local
=
"clr-namespace:Telerik.Windows.Examples.PanelBar.FirstLook"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
>
<
UserControl.Resources
>
<
local:MainPageViewModel
x:Key
=
"myViewModel"
/>
</
UserControl.Resources
>
<
Grid
>
<
Grid
x:Name
=
"LayoutRoot"
Width
=
"766"
Height
=
"360"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
Background
=
"White"
DataContext
=
"{StaticResource myViewModel}"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"220"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
telerik:RadPanelBar
x:Name
=
"radPanelBar"
VerticalAlignment
=
"Stretch"
BorderBrush
=
"#FFCBD8E8"
BorderThickness
=
"1 1 0 1"
SelectedItem
=
"{Binding SelectedCategory, Mode=TwoWay}"
SelectionChanged
=
"radPanelBar_SelectionChanged"
>
<
telerik:RadPanelBarItem
IsExpanded
=
"True"
>
<
telerik:RadPanelBarItem.Header
>
<
TextBlock
Text
=
"Academic Staff"
Margin
=
"5 3"
/>
</
telerik:RadPanelBarItem.Header
>
<
ListBox
ItemsSource
=
"{Binding Employees}"
BorderThickness
=
"0"
BorderBrush
=
"Transparent"
SelectedItem
=
"{Binding SelectedEmployee, Mode=TwoWay}"
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
VerticalAlignment
=
"Center"
Orientation
=
"Horizontal"
>
<
Border
Margin
=
"10 5 15 5"
BorderBrush
=
"#FFA1A1A1"
BorderThickness
=
"1"
>
<
Image
Source
=
"{Binding SmallImagePath}"
Stretch
=
"None"
/>
</
Border
>
<
TextBlock
VerticalAlignment
=
"Center"
FontFamily
=
"Segoe UI"
Text
=
"{Binding Name}"
/>
</
StackPanel
>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
</
ListBox
>
</
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem.Header
>
<
TextBlock
Text
=
"Programs"
Margin
=
"5 3"
/>
</
telerik:RadPanelBarItem.Header
>
<
ListBox
ItemsSource
=
"{Binding WeekDays}"
BorderThickness
=
"0"
BorderBrush
=
"Transparent"
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
CheckBox
Margin
=
"10 5 5 5"
Command
=
"{Binding DayCheckedCommand, Source={StaticResource myViewModel}}"
Content
=
"{Binding Header}"
IsChecked
=
"{Binding IsChecked, Mode=TwoWay}"
/>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
</
ListBox
>
</
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem.Header
>
<
TextBlock
Text
=
"Selected Publications"
Margin
=
"5 3"
/>
</
telerik:RadPanelBarItem.Header
>
<
ListBox
ItemsSource
=
"{Binding PublicationPeriods}"
BorderThickness
=
"0"
BorderBrush
=
"Transparent"
>
<
ListBox.ItemTemplate
>
<
DataTemplate
>
<
CheckBox
Margin
=
"10 5 5 5"
Command
=
"{Binding PublicationCheckedCommand, Source={StaticResource myViewModel}}"
Content
=
"{Binding Header}"
IsChecked
=
"{Binding IsChecked, Mode=TwoWay}"
/>
</
DataTemplate
>
</
ListBox.ItemTemplate
>
</
ListBox
>
</
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem.Header
>
<
TextBlock
Text
=
"Contact Information"
Margin
=
"5 3"
/>
</
telerik:RadPanelBarItem.Header
>
</
telerik:RadPanelBarItem
>
</
telerik:RadPanelBar
>
<
Border
Grid.Column
=
"1"
BorderBrush
=
"#FFCBD8E8"
BorderThickness
=
"1"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
Border
Margin
=
"10"
Background
=
"#FFF9F9F9"
>
<
Grid
Margin
=
"15 10"
DataContext
=
"{Binding SelectedEmployee}"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
Grid
Margin
=
"0 0 0 5"
>
<
TextBlock
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
FontFamily
=
"Segoe UI"
FontSize
=
"16"
FontWeight
=
"Bold"
Foreground
=
"#FF1E395B"
Text
=
"{Binding Department}"
/>
<
Image
HorizontalAlignment
=
"Right"
Source
=
"Images/PanelBar/Printer.png"
Stretch
=
"None"
/>
</
Grid
>
<
Border
Height
=
"1"
VerticalAlignment
=
"Bottom"
Background
=
"#FFA0AFC3"
>
<
Border.OpacityMask
>
<
LinearGradientBrush
StartPoint
=
"0,1"
EndPoint
=
"1,0"
>
<
GradientStop
Offset
=
"1"
/>
<
GradientStop
Offset
=
"0.5"
Color
=
"White"
/>
</
LinearGradientBrush
>
</
Border.OpacityMask
>
</
Border
>
<
Grid
Grid.Row
=
"1"
Margin
=
"0 10 0 0"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
Border
Grid.RowSpan
=
"3"
Margin
=
"10 5 15 5"
BorderBrush
=
"#FFA1A1A1"
BorderThickness
=
"1"
>
<
Image
Source
=
"{Binding LargeImagePath}"
Stretch
=
"None"
/>
</
Border
>
<
TextBlock
Grid.Column
=
"1"
Margin
=
"10 3 20 10"
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
Text
=
"Name:"
TextAlignment
=
"Right"
/>
<
TextBlock
Grid.Column
=
"2"
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
FontSize
=
"16"
Foreground
=
"#FF1E395B"
Text
=
"{Binding Name}"
/>
<
TextBlock
Grid.Row
=
"1"
Grid.Column
=
"1"
Margin
=
"10 3 20 10"
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
Text
=
"Position:"
TextAlignment
=
"Right"
/>
<
StackPanel
Grid.Row
=
"1"
Grid.Column
=
"2"
Margin
=
"0 0 0 10"
>
<
TextBlock
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
FontSize
=
"13.333"
FontWeight
=
"Bold"
Foreground
=
"#FF4C607A"
Text
=
"{Binding Position}"
/>
<
TextBlock
Width
=
"309"
Margin
=
"0 10 0 0"
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
FontSize
=
"12"
Text
=
"{Binding PositionAdditionalInfo}"
TextWrapping
=
"Wrap"
/>
</
StackPanel
>
<
TextBlock
Grid.Row
=
"2"
Grid.Column
=
"1"
Margin
=
"10 2 20 0"
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
Text
=
"Office:"
TextAlignment
=
"Right"
/>
<
TextBlock
Grid.Row
=
"2"
Grid.Column
=
"2"
Width
=
"309"
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
FontSize
=
"12"
Text
=
"{Binding Office}"
TextWrapping
=
"Wrap"
/>
</
Grid
>
</
Grid
>
</
Border
>
<
StackPanel
Grid.Row
=
"1"
Margin
=
"25 10"
>
<
TextBlock
Margin
=
"0 0 0 10"
HorizontalAlignment
=
"Left"
FontFamily
=
"Segoe UI"
FontSize
=
"13"
FontWeight
=
"Bold"
Foreground
=
"#FF1E395B"
Text
=
"{Binding AdditionalInfoType}"
/>
<
TextBlock
FontFamily
=
"Segoe UI"
Text
=
"{Binding AdditionalInfo}"
TextWrapping
=
"Wrap"
/>
</
StackPanel
>
</
Grid
>
</
Border
>
</
Grid
>
</
Grid
>
<!--<
telerikQuickStart:QuickStart.ConfigurationPanel
>
<
StackPanel
Margin
=
"3"
>
<
RadioButton
Margin
=
"0 2"
Checked
=
"OnRadioButtonClick"
Content
=
"Single ExpandMode"
IsChecked
=
"true"
Unchecked
=
"OnRadioButtonClick"
/>
<
RadioButton
Margin
=
"0 2"
Content
=
"Multiple ExpandMode"
/>
</
StackPanel
>
</
telerikQuickStart:QuickStart.ConfigurationPanel
>-->
</
UserControl
>
Regards,
Vincent
Hi,
can I use PanelBar as a simple container without selection options?
I want use it as a navigator control that help to organize informations and inputs.
Is possible to disable background changes on mouse over, selections...?
Thank's,
marc.
I’m trying to do something similar to Automation. I need to drive a Web App containing Telerik controls. Specifically, I need to click (which activates functionality) on elements of a RadPanelBar. The RadPanelBar has two levels. The top level has four siblings, each of which has about a dozen sub items.
I am using a Win Form application running a WebBrowser control. This hosts the page pointing to the Telerick based web page containing the RadPanelBar. I can successfully programmatically “Click” the top level item. I first find the HtmlElement from its text property as shown on the working Telerik application. I then simply use the element.InvokeMember(“click”) method. This successfully expands the list of sub items on the page. Doing the same on the sub elements successfully finds the HtmlElement, but the InvokeMember(“click”) method does nothing. It does not give an error nor does it activate the code behind associated with the element.
I’ve looked at the underlying Dom for the page and have done Google searches using key words found in the actual html generated by the RadPanelBar in conjunction with keywords WebBrowser and InvokeMember. All to no avail.
I am hoping someone with underlying knowledge of the RadPanelBar can suggest reasons why it works on the first tier, but not the second and hopefully points me in the right direction.
Thanks for any help you can provide.
<
telerik:RadPanelBar
DockPanel.Dock
=
"Left"
Width
=
"200"
regions:RegionManager.RegionName
=
"NavPanelRegion"
Background
=
"LightBlue"
>
<
telerik:RadPanelBarItem
regions:RegionManager.RegionName
=
"NavPanelHomeRegion"
Header
=
"Home"
>
</
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem
regions:RegionManager.RegionName
=
"NavPanelToolsRegion"
Header
=
"Tools"
>
</
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem
regions:RegionManager.RegionName
=
"NavPanelMaintenanceRegion"
Header
=
"Maintenance"
>
</
telerik:RadPanelBarItem
>
<
telerik:RadPanelBarItem
regions:RegionManager.RegionName
=
"NavPanelReportingRegion"
Header
=
"Reporting"
>
</
telerik:RadPanelBarItem
>
</
telerik:RadPanelBar
>
<
telerik:RadPanelBarItem
x:Class
=
"Modules.Dashboard.Views.DashboardPanelItemView"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:regions
=
"http://www.codeplex.com/CompositeWPF"
xmlns:vm
=
"clr-namespace:Modules.Dashboard.ViewModels"
Header
=
"Homepage"
>
<
telerik:RadPanelBarItem.Resources
>
<
vm:DashboardCommandViewModel
x:Key
=
"DashboardCommandVm"
/>
</
telerik:RadPanelBarItem.Resources
>
<
telerik:RadPanelBarItem.Command
>
<
Binding
Source
=
"{StaticResource DashboardCommandVm}"
Path
=
"Home"
/>
</
telerik:RadPanelBarItem.Command
>
</
telerik:RadPanelBarItem
>
public
void
Initialize()
{
Container.RegisterType<Object, Views.DashboardView>(
"DashboardView"
);
this
._regionViewRegistry.RegisterViewWithRegion(RegionNames.Navigation.HomeNavigationPanelRegion,
typeof
(Views.DashboardPanelItemView));
this
._regionViewRegistry.RegisterViewWithRegion(
"ContentRegion"
,
typeof
(DashboardView));
}