Telerik Forums
UI for WPF Forum
3 answers
169 views
Hi there

I've downloaded the WPF trial and I'm currently testing the latest version of RadDocking, but I've encountered a little problem.
When I relocate the two most right radpanes to the left and reload the window, the other two panes (not dockable) don't stretch to fill the whole window. You can find two images (before save and after save) below this post. 
Also my XAML-code:
<t:RadDocking x:Name="radDocking" HasDocumentHost="False" DragDropMode="Deferred">
        <t:RadDocking.CompassStyle>
            <Style TargetType="t:Compass">
                <Setter Property="IsCenterIndicatorVisible" Value="false" />
                <Setter Property="IsLeftIndicatorVisible" Value="false" />
                <Setter Property="IsRightIndicatorVisible" Value="false" />
            </Style>
        </t:RadDocking.CompassStyle>
        <t:RadDocking.RootCompassStyle>
            <Style TargetType="t:RootCompass">
                <Setter Property="IsTopIndicatorVisible" Value="false" />
                <Setter Property="IsBottomIndicatorVisible" Value="false" />
            </Style>
        </t:RadDocking.RootCompassStyle>
 
        <t:RadSplitContainer>
            <!--Left-->
            <t:RadSplitContainer InitialPosition="DockedLeft" Orientation="Vertical"
                                 t:ProportionalStackPanel.RelativeSize="200,200">
                <t:RadPaneGroup AllowDrop="False"
                                t:ProportionalStackPanel.RelativeSize="200,100">
                    <t:RadPane PaneHeaderVisibility="Collapsed" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False"
                                CanUserPin="False" ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Customer"/>
                </t:RadPaneGroup>
 
                <t:RadPaneGroup AllowDrop="False"
                                t:ProportionalStackPanel.RelativeSize="200,300">
                    <t:RadPane PaneHeaderVisibility="Collapsed" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False"
                                CanUserPin="False" ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Ticket" />
                </t:RadPaneGroup>
            </t:RadSplitContainer>
 
            <!--Right-->
                <t:RadSplitContainer InitialPosition="DockedRight" Orientation="Vertical"
                                t:ProportionalStackPanel.RelativeSize="50,200">
                    <t:RadPaneGroup>
                        <t:RadPane Header="Boven" CanUserClose="False" CanUserPin="False" CanFloat="False"
                        ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Number">
                        </t:RadPane>
                    </t:RadPaneGroup>
 
                    <t:RadPaneGroup>
                        <t:RadPane Header="Onder" CanUserClose="False" CanUserPin="False" CanFloat="False"
                            t:RadDocking.SerializationTag="Other" ContextMenuTemplate="{StaticResource PaneContextMenuTemplate}" />
                    </t:RadPaneGroup>
                </t:RadSplitContainer>
 
        </t:RadSplitContainer>
 
        <!--Bottom-->
        <t:RadSplitContainer InitialPosition="DockedBottom">
            <t:RadPaneGroup Height="100">
                <t:RadPane PaneHeaderVisibility="Collapsed" Header="Output" IsPinned="False" CanFloat="False" CanUserClose="False" CanUserPin="False"
                    ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Bottom"  />
            </t:RadPaneGroup>
        </t:RadSplitContainer>
 
    </t:RadDocking>


Another question:
Can I move two dockable panes as one with one dockable pane and leave the possibility to change the position of the two inner dockable panes inside the 'root' dockable pane?
I've attached an image (TwoInOne.png) about my question. Here also some explainnig XAML-code:
<t:RadPaneGroup>
                <t:RadPane>
                    <t:RadSplitContainer InitialPosition="DockedRight" Orientation="Vertical"
                                t:ProportionalStackPanel.RelativeSize="50,200">
                        <t:RadPaneGroup>
                            <t:RadPane Header="Boven" CanUserClose="False" CanUserPin="False" CanFloat="False"
                        ContextMenuTemplate="{x:Null}" t:RadDocking.SerializationTag="Number">
                            </t:RadPane>
                        </t:RadPaneGroup>
 
                        <t:RadPaneGroup>
                            <t:RadPane Header="Onder" CanUserClose="False" CanUserPin="False" CanFloat="False"
                            t:RadDocking.SerializationTag="Other" ContextMenuTemplate="{StaticResource PaneContextMenuTemplate}" />
                        </t:RadPaneGroup>
                    </t:RadSplitContainer>
                </t:RadPane>
            </t:RadPaneGroup>

When I try this with the above code, I receive a NullReferenceException.
System.NullReferenceException was unhandled by user code
  HResult=-2147467261
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.Docking
  StackTrace:
       bij Telerik.Windows.Controls.RadPaneGroup.IsSourceDockingCurrentDock(IDataObject draggedPayload) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:regel 1656
       bij Telerik.Windows.Controls.RadPaneGroup.OnDragOver(Object sender, DragEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadPaneGroup.cs:regel 1564
       bij Telerik.Windows.DragDrop.DragEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragEventArgs.cs:regel 202
       bij System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bij System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bij System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bij System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bij System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       bij Telerik.Windows.DragDrop.IInputElementExtensions.RaiseEvent(DependencyObject d, RoutedEventArgs routedEventArgs) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DependencyObjectExtensions.cs:regel 82
       bij Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnDragEventHandler(Object sender, DragEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragDropManager.cs:regel 1737
       bij Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnOver(Object sender, DragEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragDropManager.cs:regel 1812
       bij System.Windows.DragEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       bij System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       bij System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       bij System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       bij System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       bij System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       bij System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
       bij System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDragOver(Int32 dragDropKeyStates, Int64 point, Int32& effects)
  InnerException:

Thanks in advance
Lowie
Vladi
Telerik team
 answered on 24 Apr 2013
1 answer
263 views
Hi,

I have a context menu used to add and remove rows. I also have the InsertRow present.

I would like to know if its possible to disable the context menu when the user has used the InsertRow and has focused on the new row

Thanks

Arthur
Yoan
Telerik team
 answered on 24 Apr 2013
1 answer
178 views

Hello
We are using RadMap with ILayers as source in one of our InformationLayers. WMS requests (Web Map Services) returns an image witch is binded to the informationlayers source.
Between version 2012.2 and 2012.3 there is a difference. I can see a new event related to Multiscale image, MultiScaleImage.RaiseMotionFinishedEvent.AnonymousMethod. I don’t know what courses my problems, but if I uses version 2012.2 my program works, and there is no such event.
 
The error occurs while using MapZoomBar + and – navigation buttons.
I start with zoomlevel 18 viewing both MapProvider and the WMS image. Then I push + button in the MapZoomBar. This leads to an http request with an image result. My Image is loading perfectly in zoomlevel 19. When I push – button my MapProvider loads in zoomlevel 18, but there is no WMS image. When I again push + button in the MapZoomBar my image is not loaded anymore in zoomlevel 19. Map center, width and height are not changing.
 
If I use the mouse wheel and do the same thing as described, zoom in and out, everything works fine. 

Is this fixed/changed in Q1 2013 ?

Andrey
Telerik team
 answered on 24 Apr 2013
3 answers
81 views
Version: 2013 Q1 with SP1

In a RadChart with zoom enabled, trying to zoom-in causes automatic removal of the underlying DataSeries object from the ChartArea.DataSeries collection. I have attached some sample code that reproduces the issue. Note that this behavior is reproduced both programatically, and through UI interaction (by resizing the zoom bar).

XAML code:

<Window
    x:Class="MainWindow"
    Title="MainWindow" Height="350" Width="525"
    Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <telerik:RadChart
        Name="chart" telerik:StyleManager.Theme="Summer" MaxWidth="5000" MaxHeight="5000"
        FontFamily="Segoe UI" FontSize="10" Background="Transparent" PaletteBrushesRepeat="False">
            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView>
                    <telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartLegend
                        Name="chLegend" Background="Transparent" UseAutoGeneratedItems="True"
                        FontSize="9" IsHitTestVisible="False"/>
                    </telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea EnableAnimations="True" LegendName="chLegend">
                            <telerik:ChartArea.AxisX>
                                <telerik:AxisX/>
                            </telerik:ChartArea.AxisX>
                            <telerik:ChartArea.AxisY>
                                <telerik:AxisY/>
                            </telerik:ChartArea.AxisY>
                            <telerik:ChartArea.AnimationSettings>
                                <telerik:AnimationSettings TotalSeriesAnimationDuration="00:00:00.600" />
                            </telerik:ChartArea.AnimationSettings>
                            <telerik:ChartArea.DataSeries>
                                <telerik:DataSeries LegendLabel="Product Sales">
                                    <telerik:DataSeries.Definition>
                                        <telerik:BarSeriesDefinition/>
                                    </telerik:DataSeries.Definition>
                                </telerik:DataSeries>
                            </telerik:ChartArea.DataSeries>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>
                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>
        </telerik:RadChart>
 
        <Button x:Name="btnSetZoom" Grid.Row="1" Padding="3" Content="Click to set zoom" HorizontalAlignment="Right" Click="btnSetZoom_Click"/>
    </Grid>
</Window>

VB code behind:

Imports Telerik.Windows.Controls.Charting
 
Class MainWindow
 
    Private Sub btnSetZoom_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
        Me.SetZoom()
    End Sub
 
    Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs)
        Me.InitChart()
        Me.GenerateData()
    End Sub
 
    Private Sub InitChart()
        With Me.chart.DefaultView.ChartArea.AxisX
            .AutoRange = True
            .IsZeroBased = True
        End With
        With Me.chart.DefaultView.ChartArea.AxisX
            .AutoRange = True
            .IsZeroBased = True
        End With
 
        Dim zoomX As ZoomScrollSettings = chart.DefaultView.ChartArea.ZoomScrollSettingsX
        zoomX.ScrollMode = ScrollMode.ScrollAndZoom
        zoomX.RangeStart = 0
        zoomX.RangeEnd = 1
        Dim zoomY As ZoomScrollSettings = chart.DefaultView.ChartArea.ZoomScrollSettingsY
        zoomY.ScrollMode = ScrollMode.ScrollAndZoom
        zoomY.RangeStart = 0
        zoomY.RangeEnd = 1
    End Sub
 
    Private Sub GenerateData()
        Dim data As New List(Of DataPoint)()
 
        For Each i In Enumerable.Range(0, 20)
            Dim p = New DataPoint(i, i + 1.0)
            data.Add(p)
        Next
 
        Me.chart.DefaultView.ChartArea.DataSeries(0).AddRange(data)
    End Sub
 
    Private Sub SetZoom()
        Dim zoomX As ZoomScrollSettings = chart.DefaultView.ChartArea.ZoomScrollSettingsX
        zoomX.RangeStart = 0.2
        zoomX.RangeEnd = 0.7
    End Sub
 
End Class
Peshito
Telerik team
 answered on 24 Apr 2013
2 answers
160 views
I really messed up to populate data in WPF Telerik RadRichtextbox, I'm getting dataset from WCF service named as "LetterServiceClient" and now want to populate data in "Mailing"-->"Insert merge field" dropdown, but failed to do so. For your reference i also attached a screen shot to give you a clear look. 
MainWindow.xaml

<telerik:RadRibbonDropDownButton 
         x:Name="ddinsert" 
         Content="" 
         CollapseToMedium="WhenGroupIsMedium" 
         LargeImage="pack://application:,,,/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertMergeField.png"            
         telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertMergeFieldEmptyCommand}" 
         Size="Large" 
         Text="Insert Merge Field" 
         telerik:ScreenTip.Title="Insert Merge Field" 
         />
MainWindow.cs

 private void bindData()
    {
        ServiceReference1.LetterServiceClient letterservice = new ServiceReference1.LetterServiceClient();
        DataSet ds = letterservice.ExecuteTagSchema("SearchPatient");
        List<string> listTemp = new List<string>();
        int i = 0;
        foreach (DataColumn item in ds.Tables[0].Columns)
        {
            listTemp.Add(item.ColumnName);
        }

        this.ddinsert.DataContext = listTemp.ToArray();

        //this.radRichTextBox.Document.MailMergeDataSource.ItemsSource = listTemp.ToArray();
        //this.radRichTextBox.Document.MailMergeDataSource.ItemsSource= listTemp.ToArray();
    }
Vitall
Top achievements
Rank 1
 answered on 24 Apr 2013
5 answers
291 views
My WPF application runs on computers installed in police cars.  As such, it needs to have a "night mode" that has more subdued colors that don't hurt the officer's eyes in the dark.

My application has a search screen which contains a couple of RadDateTimePicker controls.  I've made a copy of the default template for the RadCalendar control that is contained in the RadDateTimePicker control's drop down area and I've been changing the XAML so it uses dynamic resource brushes defined in merged dictionaries.  The switch to night mode and back to day mode is used by changing the merged dictionary to one that has other brushes with the same names but different colors.

My problem is in the CalendarButton controls that make up the calendar.  They contain a Telerik ButtonChrome control which does not have any color properties.  When I open my application and use Snoop to look at the drop down after opening it, I can see that the ButtonChrome control contains a grid that contains a number of Border controls in it.  Those Border controls are not in the XAML; they must be created by the ButtonChrome.

The problem is that the colors used by the ButtonChrome don't work with my color scheme.  I have to use a dark background with lighter colors in the foreground for night mode.  The colors in that ButtonChrome are just the opposite.  There's no obvious way using XAML that I can change the colors used by the ButtonChrome.

Is there any way I can change the colors used without having to write my own ButtonChrome class?

I am using RadControls for WPF version 2013.1.220.45.
Tony
Top achievements
Rank 1
 answered on 23 Apr 2013
1 answer
187 views
Hello Telerik Team,
I have the following code:

<Window x:Class="RadMenu0.Testing.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="24*" />
            <RowDefinition Height="287*" />
        </Grid.RowDefinitions>
        <telerik:RadMenu VerticalAlignment="Top">
            <telerik:RadMenuItem Header="Item 1">
                <telerik:RadMenuItem Header="Sub Item 1" />               
            </telerik:RadMenuItem>
            <telerik:RadMenuItem Header="Item 2">
                <telerik:RadMenuItem Header="Sub Item 1" />               
            </telerik:RadMenuItem>
        </telerik:RadMenu>
        <telerik:RadDocking HasDocumentHost="True" Grid.Row="1">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup  HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <telerik:RadPane Header="Pane 1">
                            <TextBlock>Hello</TextBlock>
                        </telerik:RadPane>
                        <telerik:RadPane Header="Pane 2" />
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
        </telerik:RadDocking>
    </Grid>
</Window>


When I run and maximize the window, the RadMenu gets proportionaly bigger (naturally, as a star notation is used).
Now I could use a fixed height for the first grid row - but I am not sure that it is a good practice - I am just learning wpf and most of the starting materials discourage from using fixed sizes in wpf.

Could you please tell me what would be a good/standard way of making the RadMenu occupy just enough space to draw its contents and keep same height even when resizing? In other words, I am trying to add a menu just like in other standard windows desktop applications.

However, if a fixed size must be used, what would be the minimum height for the RadMenu?

Thank you in advance for you reply.

Best Regards,
Karol
Karol
Top achievements
Rank 1
 answered on 23 Apr 2013
2 answers
319 views
Hi!

What would be best way to allow only one TreeViewItem to be checked at a time per Node? Or even better only one item checked in whole TreeView at a time. When new item is checked the previous would be unchecked first. I know it's possible to make it in code-behind but I'm trying to find the best solution for implementing it.

Something like first unchecking whole treeview in PreviewChecked event and then checking the new item (or would it be enough to just uncheck everything)? 

Thanks!

Br,

Kalle
Kalle
Top achievements
Rank 1
 answered on 23 Apr 2013
4 answers
306 views
Hello!

After SP1 I see a strange bug: the construction "new PdfFormatProvider(...).Import()" throws null reference exception when it used separately from the pdf viewer( inside console app, for example). But when I create a instance of RadPdfViewer class before this, the import completes successfully. I think there is some initialization inside RadPdfViewer that is required for PdfFormatProvider.
Kammen
Telerik team
 answered on 23 Apr 2013
4 answers
858 views
Hello.
Im developing application using .net 4, telerik (2012.3.1129.40) and mvvm light, nhibernate in WPF using visual studio 2012.

This application is running fine on all computers (about 5-6) except one. Its small laptop with touch screen.
What I'm facing is during load of some forms application crushes. Its mostly when i move mouse into DataFormComboBoxField
which is binded to collection.

Example:
     <telerik:DataFormComboBoxField ItemsSource="{Binding ErrandDocTemplates}" DisplayMemberPath="Name"
             DataMemberBinding="{Binding SelectedErrandDocTemplate, Mode=TwoWay}" Label="Szablon" Width="430" HorizontalAlignment="Left"/>

This project is wpf controls library hosted in WinForms application.

Ive read couple of articles about similiar issue but i couldnt find any solution to this. 
I tried even cleaning font cashes and update graphic drivers as its said in KB937135 but still with no success.

Here is the stuck trace of firtst exception im getting (there is no inner exception)

mscorlib
   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.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at GalaSoft.MvvmLight.Helpers.WeakAction.Execute()
   at GalaSoft.MvvmLight.Command.RelayCommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at Telerik.Windows.Controls.RadButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(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.OnMouseUpThunk(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)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at SDEWinForm.Program.Main() in d:\SDEControlsLibrary\SDEControlsLibrary\SDEWinForm\Program.cs:line 20
System.Object _InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType)
Exception has been thrown by the target of an invocation.

Value cannot be null.
Parameter name: source

If i handle this im getting next one:  

System.Core
   w System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   w System.Windows.Automation.Peers.FrameworkElementAutomationPeer.GetNameCore()
   w System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   w System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   w System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   w System.Windows.ContextLayoutManager.fireAutomationEvents()
   w System.Windows.ContextLayoutManager.UpdateLayout()
   w System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   w System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   w System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   w System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   w MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   w System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   w System.Windows.Threading.DispatcherOperation.InvokeImpl()
   w System.Threading.ExecutionContext.runTryCode(Object userData)
   w System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   w System.Windows.Threading.DispatcherOperation.Invoke()
   w System.Windows.Threading.Dispatcher.ProcessQueue()
   w System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   w MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   w System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   w System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   w MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   w System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   w System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   w System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   w System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   w SDEWinForm.Program.Main() w d:\SDEControlsLibrary\SDEControlsLibrary\SDEWinForm\Program.cs:wiersz 20

TSource First[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Boolean])

System.Collections.ListDictionaryInternal

System.ArgumentNullException

I removed all Linq expressions in act od desperation but it still the same. I even turned off colums and rows virtualization on gridviews cause i've read that could be the problem.

I obtained those errors during remote debugging with all possible exceptions checked and there is really nothing else going on.
I'm aware of that you will probably not be able to reproduce this behavior b
ut Ill be gratefull for any help and ideas.

Regards
Maciek

Maciek
Top achievements
Rank 1
 answered on 23 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?