<
DataTemplate
x:Key
=
"TitleTemplate"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
ContentPresenter
Content
=
"{Binding}"
/>
<
StackPanel
Orientation
=
"Horizontal"
Grid.Column
=
"1"
>
<
ComboBox
x:Name
=
"Top"
ItemsSource
=
"{Binding Source={x:Static TopLevelElements}}"
/>
<
ComboBox
x:Name
=
"Middle"
ItemsSource
=
"{Binding ElementName=Top, Path=SelectedItem.MiddleLevelElements}"
/>
</
StackPanel
>
</
Grid
>
</
DataTemplate
>
<!--xmlns declarations in example omitted for brevity-->
<
UserControl
x:Class
=
"BottomItemView"
>
<
Border
>
<
ListBox
x:Name
=
"Bottom"
ItemsSource
=
"{Binding ElementName=Middle, Path=SelectedItem.BottomLevelElements}"
/>
</
Border
>
</
UserControl
>
Public
Class
CustomRadPane
Inherits
RadPane
Public
Sub
New
(
ByVal
title
As
Object
)
MyBase
.
New
()
Me
.Title = title
Me
.TitleTemplate = TryCast(FindResource(
"TitleTemplate"
), DataTemplate)
Me
.Content = System.Activator.CreateInstance(BottomItemView)
End
Sub
End
Class
<
ControlTemplate
TargetType
=
"{x:Type Telerik_Windows_Controls_TabControl:DropDownMenu}"
>
<
Grid
x:Name
=
"PopupContentElement"
Margin
=
"40,0,40,80"
RenderTransformOrigin
=
"0,0"
>
<
Grid.RenderTransform
>
<
TranslateTransform
X
=
"-40"
/>
</
Grid.RenderTransform
>
<
Border
BorderBrush
=
"#FF848484"
BorderThickness
=
"{TemplateBinding BorderThickness}"
Background
=
"White"
>
<
Border.Effect
>
<
DropShadowEffect
BlurRadius
=
"40"
Color
=
"Black"
Direction
=
"0"
Opacity
=
"0.85"
RenderingBias
=
"Quality"
ShadowDepth
=
"0"
/>
</
Border.Effect
>
Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
Ambiguous match found.
at System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) at System.Type.GetProperty(String name) at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsDirect() at MS.Internal.ComponentModel.DependencyPropertyKind.get_IsAttached() at MS.Internal.ComponentModel.APCustomTypeDescriptor.GetProperties(Attribute[] attributes) at MS.Internal.ComponentModel.APCustomTypeDescriptor.GetProperties() at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultExtendedTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetProperties() at System.ComponentModel.TypeDescriptor.GetPropertiesImpl(Object component, Attribute[] attributes, Boolean noCustomTypeDesc, Boolean noAttributes) at System.ComponentModel.TypeDescriptor.GetProperties(Object component) at MS.Internal.Model.ModelPropertyCollectionImpl.GetProperties(String propertyNameHint) at MS.Internal.Model.ModelPropertyCollectionImpl.<GetEnumerator>d__0.MoveNext() at MS.Internal.Designer.PropertyEditing.Model.ModelPropertyMerger.<GetFirstProperties>d__0.MoveNext() at MS.Internal.Designer.PropertyEditing.Views.PropertyEntryReader.RedraftEntries(IPropertyViewManager viewManager, Selection selection, Boolean attachedOnly, IEventCodeBehindProxy eventCodeBehindProxy, CategoryList categoryList) at MS.Internal.Designer.PropertyEditing.PropertyInspector.UpdateCategories(Selection selection, Boolean attachedOnly, IEntryReader entryReader) at MS.Internal.Designer.PropertyEditing.PropertyInspector.RefreshPropertyList(Boolean attachedOnly) at MS.Internal.Designer.PropertyEditing.PropertyInspector.OnSelectionChangedIdle()
Thank's
<
Style TargetType="{x:Type telerik:RadGridView}">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="RowIndicatorVisibility" Value="Collapsed"/>
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="AutoExpandGroups" Value="True" />
</Style>
<Style TargetType="{x:Type telerik:GridViewDataColumn}">
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="Width" Value="Auto" />
<Setter Property="Header">
<Setter.Value>
<TextBlock TextWrapping="Wrap" />
</Setter.Value>
</Setter>
</Style>
xaml file
<
telerik:RadGridView Grid.Row="0" ItemsSource="{Binding SearchResult, Mode=OneWay}" IsReadOnly="True" IsFilteringAllowed="True">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Cost_Centre_Code}" Header="Cost Centre" Width="Auto"> </telerik:GridViewDataColumn>
...
<telerik:GridViewDataColumn DataMemberBinding="{Binding Description_Display}" Header="Description" Width="*"> </telerik:GridViewDataColumn>
<telerik:GridViewDataColumn DataMemberBinding="{Binding DR}" Header="DR" TextAlignment="Right" HeaderTextAlignment="Right" Width="Auto"> </telerik:GridViewDataColumn>
<telerik:GridViewDataColumn DataMemberBinding="{Binding CR}" Header="CR" TextAlignment="Right" HeaderTextAlignment="Right" Width="Auto"> </telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>