<
telerik:GridViewColumn Header="" IsSortable="False" IsFilterable="False" TextAlignment="Center">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<Rectangle Height="18" Width="18"
HorizontalAlignment="Center" VerticalAlignment="Center"
Fill="AliceBlue"/>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
Exception detail:
Event Type: Error
Event Source: RATS 3.0
Event Category: None
Event ID: 100
Date: 7/8/2010
Time: 11:26:50 AM
User: N/A
Computer:
Description:
Timestamp: 08-Jul-2010 3:26:50 PM
Message: HandlingInstanceID: c590513b-d517-41bf-88b5-b1304b1daab7
An exception of type 'System.NullReferenceException' occurred and was caught.
-----------------------------------------------------------------------------
07/08/2010 11:26:50
Type : System.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : PresentationCore
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void EnsureChildren()
Stack Trace : at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
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)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
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)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at WpfShell.App.Main() in C:\IS\TFSProd\CSS.Underwriting\Main\Rats3\Client\WpfShell\obj\Debug\App.g.cs:line 0
<
Window x:Class="RadControlsWpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Tree="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
Title="MainWindow" Height="350" Width="525">
<Grid>
<!--If you uncomment the line , autoexpand works just fine-->
<Tree:RadTreeView ItemsSource="{Binding Items}"
IsLoadOnDemandEnabled="True"
LoadOnDemand="RadTreeView_LoadOnDemand"
IsDragDropEnabled="True">
<Tree:RadTreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Name}"></TextBlock>
</HierarchicalDataTemplate>
</Tree:RadTreeView.ItemTemplate>
</Tree:RadTreeView>
</Grid>
</
Window>
using
System;
using
System.Collections.Generic;
using
System.Windows;
using
System.Windows.Navigation;
using
Telerik.Windows.Controls;
using
System.ComponentModel;
namespace
RadControlsWpfApp1
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.DataContext = this;
Items =
new List<object>(){
new Item{Id = 1 , Name = "1"},
new Item{Id = 2 , Name = "2"},
new Item{Id = 3 , Name = "3"},
new Item{Id = 4 , Name = "4"},
new Item{Id = 5 , Name = "5"}
};
}
public List<object> Items { get; set; }
private void RadTreeView_LoadOnDemand(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
RadTreeViewItem item = e.OriginalSource as RadTreeViewItem;
var Current = item.Item as Item;
Current.Children =
new List<object>(){
new Item{Id = 1 , Name = "1"},
new Item{Id = 2 , Name = "2"},
new Item{Id = 3 , Name = "3"},
new Item{Id = 4 , Name = "4"},
new Item{Id = 5 , Name = "5"}
};
item.IsLoadingOnDemand =
false;
}
}
public class Item : INotifyPropertyChanged
{
public int Id { get; set; }
public string Name { get; set; }
List<object> children = new List<object>();
public List<object> Children
{
get
{
return children;
}
set
{
children =
value;
PropertyChange(
"Children");
}
}
 
public event PropertyChangedEventHandler PropertyChanged = (a, b) => { };
public void PropertyChange(string propertyName)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
<telerik:RadTransitionControl />element on the windows I am starting to get these kind of errors:
<
Style
TargetType
=
"{x:Type telerik:RadPanelBarItem}"
>
<
Setter
Property
=
"HeaderTemplate"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"{x:Type telerik:RadPanelBarItem}"
>
<
ControlTemplate.Triggers
>
<
Trigger
Property
=
"IsSelected"
Value
=
"True"
>
<
Setter
Property
=
"FontSize"
Value
=
"25"
/>
</
Trigger
>
<
Trigger
Property
=
"IsExpanded"
Value
=
"True"
>
<
Setter
Property
=
"FontWeight"
Value
=
"Italic"
/>
</
Trigger
>
</
ControlTemplate.Triggers
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>