Telerik Forums
UI for WPF Forum
3 answers
210 views
I have implemented the radial gauge and With Databinding I set the max value of the gauge and the value of the needle.
But the controls don't animate from ther orrigen to there new position they just jump.
I have set IsAnimated to true on the needle.
Andrey
Telerik team
 answered on 05 Dec 2011
3 answers
119 views
hello,
i have a class foreach tileViewItem that contains CanEnlarge property, so i'm doing binding for this property with the maximaize icon.
the problem is that if i'm doing double-click on the header i can enlarge it anyway.
what could i do about it?

thanks.
Kiril Stanoev
Telerik team
 answered on 05 Dec 2011
1 answer
158 views
I've got a window that contains a RadSplitButton control in it.  Here's a snippet of the code surrounding the RadSplitButton:

<Window x:Class="CarSystem.AlarmsDialog"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
        xmlns:c="clr-namespace:CarSystem"
        xmlns:cc="clr-namespace:CarSystem.CustomControls;assembly=CustomControls" 
        xmlns:tl="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        Background="Transparent" 
        BorderBrush="Black" 
        BorderThickness="5" 
        Closing="Window_Closing" 
        Foreground="White" 
        HorizontalAlignment="Center"
        Height="890" 
        Icon=". . .
        Loaded="Window_Loaded" 
        ResizeMode="CanMinimize" 
        Title=". . ." 
        VerticalAlignment="Center" 
        Width="890" 
        WindowStartupLocation="CenterScreen" 
        WindowStyle="None">
  
    <StackPanel Background="#FF3C4B66">
  
    . . .
  
                <StackPanel FocusManager.IsFocusScope="true" HorizontalAlignment="Right" Orientation="Horizontal" >
                    <Button Background="{DynamicResource ButtonBackground}" 
                            Click="CorrectButton_Click" 
                            Content="CORRECT" 
                            FontSize="20" 
                            FontWeight="Bold" 
                            Foreground="{DynamicResource ButtonForeground}" 
                            Height="60" 
                            HorizontalAlignment="Right" 
                            Margin="10" 
                            Name="CorrectButton" 
                            Width="156" 
                            VerticalAlignment="Center" />
                    <telerik:RadSplitButton Background="{DynamicResource ButtonBackground}" 
                                            Click="MisreadButton_Click" 
                                            CloseOnEscape="False" 
                                            Content="INCORRECT" 
                                            DropDownIndicatorVisibility="Visible" 
                                            DropDownPlacement="Top" 
                                            FontSize="20" 
                                            FontWeight="Bold" 
                                            Foreground="{DynamicResource ButtonForeground}" 
                                            Height="60" 
                                            HorizontalAlignment="Right" 
                                            Margin="10" 
                                            Name="IncorrectButton" 
                                            Style="{StaticResource RadSplitButtonStyle1}"
                                            VerticalAlignment="Center" 
                                            Width="200">
                        <telerik:RadSplitButton.DropDownContent>
                            <tl:RadContextMenu>
                                <tl:RadMenuItem Header="DEFER (8 hrs)" Click="DeferAlarm_Click" />
                                <tl:RadMenuItem Header="MISREAD" Click="MisreadAlarm_Click" />
                                <tl:RadMenuItem Header="NO PLATE" Click="NoPlate_Click" />
                                <tl:RadMenuItem Header="HL ENTRY EXPIRED" Click="ExpiredHLEntry_Click" />
                                <tl:RadMenuItem Header="WRONG STATE" Click="WrongState_Click" />
                                <tl:RadMenuItem Header="UNKNOWN" Click="Unknown_Click" />
                            </tl:RadContextMenu>
                        </telerik:RadSplitButton.DropDownContent>
                    </telerik:RadSplitButton>
  
                      
                </StackPanel>
            </StackPanel>
  
    . . .
  
    </StackPanel>
</Window>

When the program runs, everything works fine and the window displays without any errors.  But, when I view the window in the Designer panel in Visual Studio 2010, an exception is reported!

Here's the exception that appears instead of the rendering of the window:

 

System.Reflection.TargetInvocationException
  
Exception has been thrown by the target of an invocation.
  
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType 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, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
  
  
System.Windows.Markup.XamlParseException
  
Failed to create a 'Path' from the text '(my:RadSplitButton.ToggleContentRotateAngle)'.
  
at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter) at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren) at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container) at System.Windows.FrameworkElement.ApplyTemplate() at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Designer.ZoomableViewPresenter.DesignerBackground.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Microsoft.Windows.Design.Interaction.DesignerView.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Designer.Viewport.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Interop.HwndSource.SetLayoutSize() at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value) at MS.Internal.DeferredHwndSource.ProcessQueue(Object sender, EventArgs e)
  
  
  
System.Xaml.XamlParseException
  
Prefix 'my' does not map to a namespace.
  
at MS.Internal.Xaml.XamlContext.ResolveXamlType(String qName, Boolean skipVisibilityCheck) at MS.Internal.Xaml.Context.ObjectWriterContext.ServiceProvider_Resolve(String qName) at MS.Internal.Xaml.ServiceProviderContext.System.Windows.Markup.IXamlTypeResolver.Resolve(String qName) at System.Windows.PropertyPath.GetTypeFromName(String name, Object context) at System.Windows.PropertyPath.ResolvePropertyName(String name, Object item, Type ownerType, Object context, Boolean throwOnError) at System.Windows.PropertyPath.ResolvePathParts(ITypeDescriptorContext typeDescriptorContext) at System.Windows.PropertyPath.PrepareSourceValueInfo(ITypeDescriptorContext typeDescriptorContext) at System.Windows.PropertyPath..ctor(String path, ITypeDescriptorContext typeDescriptorContext) at System.Windows.PropertyPathConverter.ConvertFrom(ITypeDescriptorContext typeDescriptorContext, CultureInfo cultureInfo, Object source) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateObjectWithTypeConverter(ServiceProviderContext serviceContext, XamlValueConverter`1 ts, Object value) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateFromValue(ServiceProviderContext serviceContext, XamlValueConverter`1 ts, Object value, XamlMember property) at System.Xaml.XamlObjectWriter.Logic_CreateFromValue(ObjectWriterContext ctx, XamlValueConverter`1 typeConverter, Object value, XamlMember property, String targetName, IAddLineInfo lineInfo)

Does anyone have any explanation for what's going on?  I'm not using the "my" prefix anywhere in my code.

Tony
Petar Mladenov
Telerik team
 answered on 05 Dec 2011
0 answers
132 views
Hi,
I am using RadGridView  and RadDataPager to show some details and its working fine. But my requirement is little bit tricky.
1.When i am populating details from database i want to retrieve 10 or say n number of record at a time (But data is huge)
2. Pagination i have handled at my SP level which except some parameters in order to retrieve details.
3.I know the count in Initial.
4.Where should i write code for pagination when a page change which means my method in order to retrieve details from database.

Looking forward,

Regards,

Sanghi Krishna
Krishna
Top achievements
Rank 1
 asked on 05 Dec 2011
9 answers
557 views
Hi.
I use RadCalendar in my project for selection date.

<telerik:RadCalendar HeaderVisibility="Collapsed" Height="150"
              SelectableDateStart="{Binding SelectedDateStart}"
              SelectableDateEnd="{Binding SelectedDateEnd}"
              SelectedDate="{Binding Date, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
public class NextActionDate : INotifyPropertyChanged
{
    public DateTime SelectedDateStart { get; set; }
    public DateTime SelectedDateEnd { get; set; }
 
    private DateTime date;
    public DateTime Date
    {
        get
        {
            return date;
        }
        set
        {
            date = value;
            GenerateEvent("Date");
        }
    }
 
    public event PropertyChangedEventHandler PropertyChanged;
    private void GenerateEvent(string inName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(inName));
        }
    }
}

Usually it works correctly.

But sometimes I have exceptions:
1. System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.WeakReferenceList`1.CopyTo(T[] array, Int32 arrayIndex) at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Telerik.Windows.Controls.SelectionChanger`1.BuildSelectionChangedEventArgs() at Telerik.Windows.Controls.SelectionChanger`1.End() at Telerik.Windows.Controls.SelectionChanger`1.AddJustThis(T item) at Telerik.Windows.Controls.RadCalendar.AddToSelection(DateTime selectedDate, Boolean controlKeyDown, Boolean shiftKeyDown) at Telerik.Windows.Controls.RadCalendar.Select(DateTime selectedDate, Boolean forceSelection) at Telerik.Windows.Controls.Calendar.CalendarView.AddDate(Object sender) at Telerik.Windows.Controls.Calendar.CalendarView.HandleMouseEvents(Object sender, MouseButtonEventArgs e) at Telerik.Windows.Controls.Calendar.CalendarView.CalendarButtonMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

2. System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.WeakReferenceList`1.WeakReferenceEnumerator.get_Current() at Telerik.Windows.Controls.SelectionChanger`1.SynchronizeInternalSelection() at Telerik.Windows.Controls.SelectionChanger`1.End() at Telerik.Windows.Controls.SelectionChanger`1.AddJustThis(T item) at Telerik.Windows.Controls.RadCalendar.AddToSelection(DateTime selectedDate, Boolean controlKeyDown, Boolean shiftKeyDown) at Telerik.Windows.Controls.RadCalendar.Select(DateTime selectedDate, Boolean forceSelection) at Telerik.Windows.Controls.Calendar.CalendarView.AddDate(Object sender) at Telerik.Windows.Controls.Calendar.CalendarView.HandleMouseEvents(Object sender, MouseButtonEventArgs e) at Telerik.Windows.Controls.Calendar.CalendarView.CalendarButtonMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

3. System.NullReferenceException: Object reference not set to an instance of an object. at Telerik.Windows.WeakReferenceList`1.IndexOf(T item) at Telerik.Windows.WeakReferenceList`1.Remove(T item) at Telerik.Windows.Controls.SelectionChanger`1.Select(T item) at Telerik.Windows.Controls.SelectionChanger`1.InsertItem(Int32 index, T item) at System.Collections.ObjectModel.Collection`1.Add(T item) at Telerik.Windows.Controls.SelectionChanger`1.AddJustThis(T item) at Telerik.Windows.Controls.RadCalendar.AddToSelection(DateTime selectedDate, Boolean controlKeyDown, Boolean shiftKeyDown) at Telerik.Windows.Controls.RadCalendar.Select(DateTime selectedDate, Boolean forceSelection) at Telerik.Windows.Controls.Calendar.CalendarView.AddDate(Object sender) at Telerik.Windows.Controls.Calendar.CalendarView.HandleMouseEvents(Object sender, MouseButtonEventArgs e) at Telerik.Windows.Controls.Calendar.CalendarView.CalendarButtonMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Control in exception moment - http://sound-fresh.com/radcalendar.png

Thanks you.
Lubch
Top achievements
Rank 1
 answered on 05 Dec 2011
3 answers
77 views
I'd like to databind the LegendLabel to a field of my viewmodel.
<telerikCharting:SeriesMapping LegendLabel="{Binding ViewModelField}" >

When opening my window the Legend displays "Series 0" instead of the value from my ViewModelField. When I refresh the View by updating the ItemsSource of the RadChart control I get the LegendLabel value I want.

Any ideas of what is going wrong?
I'm using the Q1/2011 WPF chart control.
Bartholomeo Rocca
Top achievements
Rank 1
 answered on 05 Dec 2011
1 answer
93 views
Hi,
We have 2 charts on same screen, both charts have same date range data in x-axis and differnt libe series on y-axis.

Our client has requested to handle the chart zooming and scrolling in schronized way, that if we zoom or scroll on one chart then the other should be zoomed and scrolled.

Is there some way to handle this in appropriate manners

Thanks
Vladimir Milev
Telerik team
 answered on 05 Dec 2011
5 answers
212 views
I have a CellEditTemplate that contains a UserControl composed of two comboboxes.  I wish to have the first combobox selected when I tab into the cell, then have the second combobox selected with the next tab. (Keyboard focus so that arrow keys can move through the items in the combobox)

Both comboboxes have their IsTabStop properties set to True.  The control in the CellEditTemplate (DataTemplate) has its IsTabStopProperty set to true.

How can I accomplish this?

Thank you in advance,
Scott Lee
Dimitrina
Telerik team
 answered on 05 Dec 2011
4 answers
287 views

Hello,

We just updated our telerik-controls to the latest version (2011 Q1). Now I am getting an exception when trying to use the gridview grouping.

This is the xaml for my gridview :

<telerik:RadGridView AutoExpandGroups="True" ShowColumnHeaders="False" 
                 ItemsSource="{Binding SelectedCategoryDataItems}"
                 CanUserFreezeColumns="False" CanUserReorderColumns="False" 
                 CanUserResizeColumns="False" 
                 EditTriggers="None" IsReadOnly="True" 
                 AutoGenerateColumns="False"
                 ActionOnLostFocus="None" RowIndicatorVisibility="Collapsed" 
                 ShowGroupPanel="False"  
                 HorizontalAlignment="Stretch" Grid.Column="1" 
                 RowStyle="{StaticResource GridItemStyle}"/>

The SelectedCategoryDataItems property is a QueryableCollectionView. The groupdescriptor is added from the viewmodel code-behind :

DataItems.GroupDescriptors.Add(new GroupDescriptor() { Member = "Status2" });

When I set AutoExpandGroups = True, the following exception is immediately thrown (application doesn't start) :
 
bij System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bij System.ThrowHelper.ThrowArgumentOutOfRangeException()
bij System.Collections.Generic.List`1.get_Item(Int32 index)
bij System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
bij Telerik.Windows.Controls.GridView.GridViewGroupRow.OnIsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
bij System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bij System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bij System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bij System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
bij System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
bij System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
bij Telerik.Windows.Controls.GridView.GridViewDataControl.RestoreItemValue(DependencyObject container, DependencyProperty property, Object item)
bij Telerik.Windows.Controls.GridView.GridViewDataControl.RestoreGroupPropeprties(GridViewGroupRow groupRow)
bij Telerik.Windows.Controls.GridView.GridViewDataControl.PrepareContainerForGroupItemOverride(DependencyObject element, Object item)
bij Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
bij Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertNewContainer(Int32 childIndex, UIElement container)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized)
bij Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
bij System.Windows.FrameworkElement.MeasureCore(Size availableSize)
bij System.Windows.UIElement.Measure(Size availableSize)
bij System.Windows.ContextLayoutManager.UpdateLayout()
bij System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
bij System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
bij System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
bij System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
bij System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
bij System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bij System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.DispatcherOperation.InvokeImpl()
bij System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
bij System.Threading.ExecutionContext.runTryCode(Object userData)
bij System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
bij System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Windows.Threading.DispatcherOperation.Invoke()
bij System.Windows.Threading.Dispatcher.ProcessQueue()
bij System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bij MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bij MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bij System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bij System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bij System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
bij System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
bij MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bij MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bij System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bij System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bij System.Windows.Threading.Dispatcher.Run()
bij System.Windows.Application.RunDispatcher(Object ignore)
bij System.Windows.Application.RunInternal(Window window)
bij System.Windows.Application.Run(Window window)
bij System.Windows.Application.Run()
bij Artemis.App.Main() in R:\WPF\Sln_Huisartsen\Sln_Huisartsen\obj\x86\Debug\App.g.cs:regel 0
bij System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bij System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()

Setting AutoExpandGroups to False gives the following exception in the output-window when I'm trying to expand a group from the UI :

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsExpanded; DataItem='GridViewGroupRow' (Name=''); target element is 'ToggleButton' (Name='HeaderButton'); target property is 'IsChecked' (type 'Nullable`1') ArgumentOutOfRangeException:'System.ArgumentOutOfRangeException: De index valt buiten het bereik. Deze mag niet negatief zijn en moet kleiner zijn dan de grootte van de verzameling.
Parameternaam: index
   bij System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   bij System.ThrowHelper.ThrowArgumentOutOfRangeException()
   bij System.Collections.Generic.List`1.get_Item(Int32 index)
   bij System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
   bij Telerik.Windows.Controls.GridView.GridViewGroupRow.OnIsExpandedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   bij System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   bij System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   bij System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   bij System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
   bij System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
   bij System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   bij MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   bij MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   bij System.Windows.Data.BindingExpression.UpdateSource(Object value)'

Any ideas / advice on this?

Thanks in advance!
Vlad
Telerik team
 answered on 05 Dec 2011
2 answers
76 views
I have a WPF gridview in which I specify the datacolumns and load the data simply with (C#)::

gridFeeEarnerGroups.ItemsSource = Bill.FeeEarnerGroups;

"FeeEarnerGroups" is of type List<FeeEarnerGroup> and this works fine.

I need a sub table to use the data from FeeEarnerGroup.RateSets which is of type List<RateSet> , showing each (0 or more) RateSet per FeeEarnerGroup row.

I've looked at the documentation and tried a few things but I'm struggle to get this working.
Can anyone help please?





Steve
Top achievements
Rank 1
 answered on 04 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?