or
LocalizationManager.Manager = new TelerikGridViewCustomLocalizationManager();
...
class TelerikGridViewCustomLocalizationManager : LocalizationManager
{
public override string GetStringOverride(string key)
{
return MyLocalization.GetResource(key);
}
}
private
void
gridView_Grouping(
object
sender, GridViewGroupingEventArgs e)
{
var descriptor = e.GroupDescriptor
as
ColumnGroupDescriptor;
if
(descriptor !=
null
)
{
var functions = descriptor.Column.AggregateFunctions;
if
(functions.Count == 0)
{
functions.Add(
new
CountFunction());
}
}
}
private
void
gridView_Grouped(
object
sender, GridViewGroupedEventArgs e)
{
if
(e.Action == GroupingEventAction.Remove)
{
((ColumnGroupDescriptor)(e.GroupDescriptor)).Column.AggregateFunctions.Clear();
}
}
<
UserControl
x:Class
=
"SphinxV6.Data.MC_Table"
xmlns:win
=
"clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:v6
=
"clr-namespace:SphinxV6"
xmlns:v6Table
=
"clr-namespace:SphinxV6.Data.Table"
xmlns:v6Properties
=
"clr-namespace:SphinxV6.Properties"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikNavigation
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:v6Ribbon
=
"clr-namespace:SphinxV6.Ribbon"
xmlns:toolselements
=
"clr-namespace:SphinxV6.ToolsElements"
xmlns:tabletoolselements
=
"clr-namespace:SphinxV6.Data.Table.ToolsElements"
Unloaded
=
"UserControl_Unloaded"
DataContextChanged
=
"UserControl_DataContextChanged"
Loaded
=
"UserControl_Loaded"
>
<
Grid
x:Name
=
"root"
DataContext
=
"{Binding}"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadDocking
x:Name
=
"xDocking"
Grid.Row
=
"1"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
HasDocumentHost
=
"true"
Unloaded
=
"RadDocking_Unloaded"
v6:RadDockingExtensions.SaveFloatingPane
=
"True"
telerik:RadDocking.SerializationTag
=
"xDocking"
>
<
telerik:RadDocking.CompassStyle
>
<
Style
TargetType
=
"{x:Type telerik:Compass}"
>
<
Setter
Property
=
"IsCenterIndicatorVisible"
Value
=
"True"
/>
</
Style
>
</
telerik:RadDocking.CompassStyle
>
<
telerik:RadDocking.DocumentHost
>
<
win:WindowsFormsHost
Name
=
"windowsFormsHost1"
/>
</
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
InitialPosition
=
"DockedLeft"
Orientation
=
"Vertical"
Width
=
"250"
telerik:RadDocking.SerializationTag
=
"DockedLeft"
>
<
telerik:RadPaneGroup
telerik:RadDocking.SerializationTag
=
"gVars"
>
<
telerik:RadPane
DataContext
=
"{Binding DataContext.TE_Variables, ElementName=root}"
Header
=
"{Binding Title}"
CanDockInDocumentHost
=
"False"
CanUserClose
=
"False"
ContextMenuTemplate
=
"{x:Null}"
telerik:RadDocking.SerializationTag
=
"pVars"
>
<
tabletoolselements:TE_VariablesControl
/>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
<
telerik:RadPaneGroup
telerik:ProportionalStackPanel.RelativeSize
=
"200,35"
telerik:RadDocking.SerializationTag
=
"gSample"
>
<
telerik:RadPane
DataContext
=
"{Binding DataContext.TE_Samples, ElementName=root}"
Header
=
"{Binding Title}"
IsHidden
=
"{Binding DataContext.IsDockSampleVisible, ElementName=root, Mode=TwoWay, Converter={StaticResource convInverseBoolean}}"
CanDockInDocumentHost
=
"False"
ContextMenuTemplate
=
"{x:Null}"
telerik:RadDocking.SerializationTag
=
"pSample"
>
<
toolselements:TE_SamplesControl
/>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
<
telerik:RadPaneGroup
telerik:ProportionalStackPanel.RelativeSize
=
"200,15"
telerik:RadDocking.SerializationTag
=
"gLang"
>
<
telerik:RadPane
DataContext
=
"{Binding DataContext, ElementName=root}"
Header
=
"{x:Static v6Properties:Resources.languages}"
CanDockInDocumentHost
=
"False"
CanUserClose
=
"True"
IsHidden
=
"{Binding IsDockLangVisible, Mode=TwoWay, Converter={StaticResource convInverseBoolean}}"
ContextMenuTemplate
=
"{x:Null}"
telerik:RadDocking.SerializationTag
=
"pLang"
>
<
StackPanel
Margin
=
"3"
Orientation
=
"Horizontal"
>
<
v6:Ctrl_LangSelector
></
v6:Ctrl_LangSelector
>
</
StackPanel
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
</
Grid
>
</
UserControl
>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?><
RadDocking
SerializationTag
=
"xDocking"
><
SplitContainers
><
RadSplitContainer
SerializationTag
=
"DockedLeft"
Dock
=
"DockedLeft"
Width
=
"250"
Orientation
=
"Vertical"
><
Items
><
RadPaneGroup
SerializationTag
=
"gVars"
SelectedIndex
=
"0"
><
Items
><
RadPane
SerializationTag
=
"pVars"
IsDockable
=
"True"
Title
=
"Variables"
Header
=
"Variables"
CanUserClose
=
"False"
CanDockInDocumentHost
=
"False"
/></
Items
></
RadPaneGroup
><
RadPaneGroup
SerializationTag
=
"gSample"
RelativeWidth
=
"200"
RelativeHeight
=
"35"
SelectedIndex
=
"-1"
><
Items
/></
RadPaneGroup
><
RadPaneGroup
SerializationTag
=
"gLang"
RelativeWidth
=
"200"
RelativeHeight
=
"15"
SelectedIndex
=
"-1"
><
Items
><
RadPane
SerializationTag
=
"pLang"
IsHidden
=
"True"
IsDockable
=
"True"
Title
=
"Langues"
Header
=
"Langues"
CanUserClose
=
"True"
CanDockInDocumentHost
=
"False"
/></
Items
></
RadPaneGroup
></
Items
></
RadSplitContainer
><
RadSplitContainer
InitialPosition
=
"FloatingDockable"
FloatingWidth
=
"220"
FloatingHeight
=
"300"
FloatingX
=
"628"
FloatingY
=
"555"
IsInOpenWindow
=
"True"
RelativeWidth
=
"200"
RelativeHeight
=
"35"
IsAutoGenerated
=
"True"
><
Items
><
RadPaneGroup
RelativeWidth
=
"200"
RelativeHeight
=
"35"
IsAutoGenerated
=
"True"
SelectedIndex
=
"0"
><
Items
><
RadPane
SerializationTag
=
"pSample"
IsHidden
=
"False"
IsDockable
=
"True"
Title
=
"Strates"
Header
=
"Strates"
CanDockInDocumentHost
=
"False"
/></
Items
></
RadPaneGroup
></
Items
></
RadSplitContainer
></
SplitContainers
></
RadDocking
>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?><
RadDocking
SerializationTag
=
"xDocking"
><
SplitContainers
><
RadSplitContainer
SerializationTag
=
"DockedLeft"
Dock
=
"DockedLeft"
Width
=
"250"
Orientation
=
"Vertical"
><
Items
><
RadPaneGroup
SerializationTag
=
"gVars"
SelectedIndex
=
"0"
><
Items
><
RadPane
SerializationTag
=
"pVars"
IsDockable
=
"True"
Title
=
"Variables"
Header
=
"Variables"
CanUserClose
=
"False"
CanDockInDocumentHost
=
"False"
/></
Items
></
RadPaneGroup
><
RadPaneGroup
SerializationTag
=
"gSample"
RelativeWidth
=
"200"
RelativeHeight
=
"35"
SelectedIndex
=
"-1"
><
Items
/></
RadPaneGroup
><
RadPaneGroup
SerializationTag
=
"gLang"
RelativeWidth
=
"200"
RelativeHeight
=
"15"
SelectedIndex
=
"-1"
><
Items
><
RadPane
SerializationTag
=
"pLang"
IsHidden
=
"True"
IsDockable
=
"True"
Title
=
"Langues"
Header
=
"Langues"
CanUserClose
=
"True"
CanDockInDocumentHost
=
"False"
/></
Items
></
RadPaneGroup
></
Items
></
RadSplitContainer
>
<
RadSplitContainer
InitialPosition
=
"FloatingDockable"
FloatingWidth
=
"220"
FloatingHeight
=
"300"
FloatingX
=
"649"
FloatingY
=
"514"
IsInOpenWindow
=
"False"
RelativeWidth
=
"200"
RelativeHeight
=
"35"
IsAutoGenerated
=
"True"
><
Items
><
RadPaneGroup
RelativeWidth
=
"200"
RelativeHeight
=
"35"
IsAutoGenerated
=
"True"
SelectedIndex
=
"-1"
><
Items
><
RadPane
SerializationTag
=
"pSample"
IsHidden
=
"True"
IsDockable
=
"True"
Title
=
"Strates"
Header
=
"Strates"
CanDockInDocumentHost
=
"False"
/></
Items
></
RadPaneGroup
></
Items
></
RadSplitContainer
>
<
RadSplitContainer
InitialPosition
=
"FloatingDockable"
FloatingWidth
=
"220"
FloatingHeight
=
"300"
FloatingX
=
"649"
FloatingY
=
"514"
IsInOpenWindow
=
"False"
RelativeWidth
=
"200"
RelativeHeight
=
"35"
IsAutoGenerated
=
"True"
><
Items
><
RadPaneGroup
RelativeWidth
=
"200"
RelativeHeight
=
"35"
IsAutoGenerated
=
"True"
SelectedIndex
=
"-1"
><
Items
><
RadPane
SerializationTag
=
"pSample"
IsHidden
=
"True"
IsDockable
=
"True"
Title
=
"Strates"
Header
=
"Strates"
CanDockInDocumentHost
=
"False"
/></
Items
></
RadPaneGroup
></
Items
></
RadSplitContainer
></
SplitContainers
></
RadDocking
>
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsDockSampleVisible; DataItem=
'TableEnvironment'
(HashCode=18777961); target element
is
'CheckBox'
(Name=
'cbSamples'
); target property
is
'IsChecked'
(type
'Nullable`1'
) TargetInvocationException:
'System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'
un appel. ---> System.Reflection.TargetInvocationException: Une exception a été levée par la cible d
'un appel. ---> System.InvalidOperationException: L'
élément possède déjà un parent logique. Il doit être détaché de l
'ancien parent avant d'
être attaché au nouveau.
à MS.Internal.Controls.InnerItemCollectionView.AssertPristineModelChild(Object item)
à MS.Internal.Controls.InnerItemCollectionView.Insert(Int32 index, Object item)
à System.Windows.Controls.ItemCollection.Insert(Int32 insertIndex, Object insertItem)
à Telerik.Windows.Controls.RadPaneGroup.ShowSinglePane(RadPane pane)
à Telerik.Windows.Controls.RadPaneGroup.ShowPane(RadPane pane)
à Telerik.Windows.Controls.RadDocking.OnPaneShow(RadPane pane)
à Telerik.Windows.Controls.RadDocking.OnRadPaneShow(Object sender, StateChangeCommandEventArgs args)
--- Fin de la trace de la pile d'exception interne ---
à System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
à System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
à System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
à System.Delegate.DynamicInvokeImpl(Object[] args)
à System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
à System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
à System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
à Telerik.Windows.Controls.RadPane.OnShow(StateChangeCommandEventArgs args)
à Telerik.Windows.Controls.RadPane.Show()
à Telerik.Windows.Controls.RadPane.OnIsHiddenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
à System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
à System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
à System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
à System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
à System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
à System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
à System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
à System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
à MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
à MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
à MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
à MS.Internal.Data.PropertyPathWorker.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
à System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
à System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
à SphinxV6.EnvironmentBase.RaisePropertyChangedEvent(String sPropertyName) dans C:\dvlp\Project\WPF4\SphinxV6\_Common\Bases\EnvironmentBase.cs:ligne 1830
à SphinxV6.EnvironmentBase.set_IsDockSampleVisible(Boolean value) dans C:\dvlp\Project\WPF4\SphinxV6\_Common\Bases\EnvironmentBase.cs:ligne 73
--- Fin de la trace de la pile d'exception interne ---
à System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
à System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
à System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
à System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
à System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
à System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
à MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
à MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
à System.Windows.Data.BindingExpression.UpdateSource(Object value)'
<
Window
x:Class
=
"RadControlsWpfApp1.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Height
=
"550"
Width
=
"800"
>
<
Grid
>
<
telerik:RadPanelBar
Name
=
"radPanelBar1"
>
<
telerik:RadPanelBarItem
Header
=
"Item 1"
/>
<
telerik:RadPanelBarItem
Header
=
"Item 2"
/>
</
telerik:RadPanelBar
>
</
Grid
>
</
Window
>