Telerik Forums
UI for WPF Forum
4 answers
859 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
1 answer
136 views
Hi,

When zooming into a chart and selecting a point, the selection seems to move along with the scroll bars. I noticed this while adding an annotation feature in my project, and used the selection example from your documentation to test it.
 
  <telerik:RadCartesianChart.Behaviors>
      <telerik:ChartSelectionBehavior DataPointSelectionMode="Single" SelectionChanged="ChartSelectionBehavior_SelectionChanged_1" />
      <telerik:ChartPanAndZoomBehavior ZoomMode="Both" PanMode="Both"/>
  </telerik:RadCartesianChart.Behaviors>
private void ChartSelectionBehavior_SelectionChanged_1(object sender, ChartSelectionChangedEventArgs e)
        {
            //Handle selection of the current point
            if (e.AddedPoints.Count > 0)
            {
                var addedPoint = e.AddedPoints[0];
                var series = addedPoint.Presenter as LineSeries;
 
                //Get the Content Presenter of the series
                var pointPresenter = series.ChildrenOfType<ContentPresenter>().
                    Where(cp => cp.Tag == addedPoint).FirstOrDefault();
                var ellipseElement = pointPresenter.
                    ChildrenOfType<Ellipse>().FirstOrDefault();
 
                //Do whatever you want with it :)
                ellipseElement.Fill = new SolidColorBrush(Colors.Red);
            }
 
            //Handle de-selection of the current point
            if (e.RemovedPoints.Count > 0)
            {
                var removedPoint = e.RemovedPoints[0];
                var series = removedPoint.Presenter as LineSeries;
                var pointPresenter = series.
                    ChildrenOfType<ContentPresenter>().
                    Where(cp => cp.Tag == removedPoint).FirstOrDefault();
                var ellipseElement = pointPresenter.
                    ChildrenOfType<Ellipse>().FirstOrDefault();
 
                //Do whatever you want with it :)
                ellipseElement.Fill = new SolidColorBrush(Colors.Yellow);
            }
 
        }

I've attached a couple of screenshots to make it clearer. The selected point shouldn't move - do you know why this is happening?

Thanks! 


Petar Marchev
Telerik team
 answered on 23 Apr 2013
2 answers
140 views
Hi There,
I want to remove the vertical lines at gridviewfooter, wanted to display footer without any separators.
can you please help me how i can do this?

Attached a screenshot please check once.


Thanks in advance.
Srinivas.
Ravi
Top achievements
Rank 1
 answered on 23 Apr 2013
2 answers
301 views
I'd like to to remove all of the outside margin/padding around the gauge and then make the width of the bar indicator wider.

I've attached images to demonstrate my current (default) look and my desired look.

Thank you
Andrey
Telerik team
 answered on 23 Apr 2013
3 answers
1.3K+ views
I have an docking control and adding panes dynamically. But "Loaded" events of the controls called twice. Am I doing something wrong ?
Here's the XAML:

<Telerik:RadDocking Grid.Row="1" Name="xamDockManager1">  
            <Telerik:RadSplitContainer InitialPosition="DockedBottom">  
                <Telerik:RadPaneGroup> 
                    <Telerik:RadDocumentPane Header="Mesajlar" CanUserPin="True" CanFloat="False" CanUserClose="False" IsPinned="False" > 
                        <TextBox Style="{StaticResource StyleTextBoxMessages}" AutoWordSelection="True" Name="TextBoxMessages" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch"  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0" IsReadOnly="True">  
                            <TextBox.ContextMenu> 
                                <ContextMenu Name="MenuItemMessages">  
                                    <MenuItem Name="MenuItemMessagesClear" Click="MenuItemMessagesClear_Click" Header="Temizle"></MenuItem> 
                                    <MenuItem Name="MenuItemMessagesSave" Click="MenuItemMessagesSave_Click"  Header="Kaydet"></MenuItem> 
                                </ContextMenu> 
                            </TextBox.ContextMenu> 
                        </TextBox> 
                    </Telerik:RadDocumentPane> 
                </Telerik:RadPaneGroup> 
            </Telerik:RadSplitContainer> 
              
            <Telerik:RadDocking.DocumentHost> 
                <Telerik:RadSplitContainer> 
                    <Telerik:RadPaneGroup Name="documentPaneGroup" SelectionChanged="documentPaneGroup_SelectionChanged">  
                    </Telerik:RadPaneGroup> 
                </Telerik:RadSplitContainer> 
            </Telerik:RadDocking.DocumentHost> 
        </Telerik:RadDocking> 

Here's the code to add a pane:
public RadPane AddPane(UserControl control, bool canBeClosed = true)  
        {  
            RadPane contentPane = new RadPane();  
            contentPane.Content = control;  
            //contentPane.Header = control.Title;  
            contentPane.IsSelected = true;  
            contentPane.CanFloat = false;  
            contentPane.CanUserPin = false;  
 
            documentPaneGroup.AddItem(contentPane, Telerik.Windows.Controls.Docking.DockPosition.Center);  
 
            return contentPane;  
        } 

Does this mean a control embedded in a RadPane loaded twice ?
Miroslav Nedyalkov
Telerik team
 answered on 23 Apr 2013
1 answer
109 views
Hi 

I have a MaskedTextInput with the following settings

<telerik:RadMaskedTextInput Style="{StaticResource SingleLineTextInputWithNoMask}" Value="{Binding Value}" />

and its style

<Style x:Key="SingleLineTextInputWithNoMask" TargetType="{x:Type telerik:RadMaskedTextInput}" >
    <Setter Property="IsClearButtonVisible" Value="False" />
    <Setter Property="InputBehavior" Value="Insert" />
    <Setter Property="Mask" Value="" />
    <Setter Property="AcceptsReturn" Value="False" />
</Style>

When a user mark the text content and hit CTRL-X a mask like _________ is shown and then it is impossible to paste again text to that MaskedTextInput, which I think is a bug

I am using RadControls for WPF controls with version 2013.1.403.40

Cheers
Laurent Kempé
Pavel R. Pavlov
Telerik team
 answered on 23 Apr 2013
1 answer
166 views
Hi!

Working with radchart I face with the problem that after I refresh the page (on which is my chart)  it's Y axis is strange.

My XAML:
<telerik:RadChart x:Name="durationChart" ItemsSource="{Binding DurationChart, Mode=TwoWay}">
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping LegendLabel="Devices">
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:BarSeriesDefinition></telerik:BarSeriesDefinition>
            </telerik:SeriesMapping.SeriesDefinition>
            <telerik:SeriesMapping.ItemMappings>
                <telerik:ItemMapping DataPointMember="Label" FieldName="Value"></telerik:ItemMapping>
                <telerik:ItemMapping DataPointMember="YValue" FieldName="Value"></telerik:ItemMapping>
                <telerik:ItemMapping DataPointMember="XCategory" FieldName="Label"/>
            </telerik:SeriesMapping.ItemMappings>
        </telerik:SeriesMapping>
    </telerik:RadChart.SeriesMappings>
</telerik:RadChart>

Code-behind (declared in the constructor):
#region Duration Chart
 // Hide legend
 durationChart.DefaultView.ChartLegend.Visibility = Visibility.Collapsed;
 
 // Axis titles
 durationChart.DefaultView.ChartArea.AxisX.Title = MOD_COM_HLP.LocalizationHelper.LocalizeString(ResourceKeys.DLYPlantDelaysDurationXAxisResourceKey);
 durationChart.DefaultView.ChartArea.AxisY.Title = MOD_COM_HLP.LocalizationHelper.LocalizeString(ResourceKeys.DLYPlantDelaysDurationYAxisResourceKey);
 
 // X axis
 durationChart.DefaultView.ChartArea.AxisX.AxisLabelsVisibility = Visibility.Visible;
 durationChart.DefaultView.ChartArea.AxisX.PlotAreaAxisLabelsVisibility = Visibility.Visible;
 
 // Y axis
 durationChart.DefaultView.ChartArea.AxisY.AxisLabelsVisibility = Visibility.Visible;
 durationChart.DefaultView.ChartArea.AxisY.MajorTicksVisibility = Visibility.Visible;
 durationChart.DefaultView.ChartArea.AxisY.MinorTicksVisibility = Visibility.Hidden;
 #endregion

My binded OC for feeding the chart:
ObservableCollection<DLYChartPoint> durationChart = new ObservableCollection<DLYChartPoint>();

My refresh function does nothing more than clear the OC and rewrite the data for feed my chart:
private void FillDurationChart()
        {
            // Aux values
            List<LPD_COM_ENT.AUXValue> dlyDurationChartPeriods = lPDModulesLibraryProxy.ReadAUXValues(new LPDModulesLibrary.Common.Entities.ReadFilter() { VariableName = "DLY_DURATION_CHART_PERIOD"});
 
            if (Items == null) return;
 
            // Clear the chart
            DurationChart.Clear();
 
            // Add the columns
            foreach (LPD_COM_ENT.AUXValue variable in dlyDurationChartPeriods) {
                DLYChartPoint point = new DLYChartPoint() {Label = variable.CharValue, Value=0, UniqueId=variable.ValueSeq };
                DurationChart.Add(point);
            }
 
            // Fill chart
            foreach (DLYDelay stoppage in Items)
            {
                double duration = (stoppage.EndDelay - stoppage.StartDelay).TotalSeconds;
 
                foreach (LPD_COM_ENT.AUXValue variable in dlyDurationChartPeriods) {
                    if (duration >= variable.IntegerValue && duration < variable.FloatValue) {
                        DurationChart[(int)variable.ValueSeq].Value++;
                    }
                }
            }
        }

Thanks for all your replies.

Luka
Missing User
 answered on 23 Apr 2013
1 answer
210 views
I was trying to switch over to the DragDropManager today as the builds are now showing the previous manager is obsolete. (Moving to 2013 Q1 SP1).

It all looks straight forward as I use DragInitialize to setup for the drag and then watch GiveFeedback to see what DragDropEffects are being passed back by a valid drop target below what I am dragging (cursor).

Put simply, I can drag all over my app's window and see DragDropEffects.Copy always being returned. Except for a few limited cases, e.g., dragging over a standard WPF text box or the app title bar, or a window outside my app. In the latter cases, I get DragDropEffects.None - as expected!

I must be missing something. I have a custom class as the payload being dragged. I even set it so automatic conversions are not allowed. How are the window's in my app returning the DragDropEffects.Copy effect when they should have absolutely no idea as to how to interpret the payload?

Is it because I have mixed old and new drag/drop methodologies? Is this an error on my part, or the new implementation?

I really want the app to show the cursor associated wth DragDropEffects.None until it is over a target that recognizes the payload type.

Any suggestions appreciated.
Rosen Vladimirov
Telerik team
 answered on 23 Apr 2013
8 answers
214 views
Hello, I am using Telerik WPF RadControls for generating the PDF417 barcode image. I need to specify the number of barcode image columns and rows. The code I am using is following:

<telerik:RadBarcodePDF417 Name="barcode1" Width="480" Height="152" HorizontalAlignment="Left"  >
</telerik:RadBarcodePDF417>

Some other solutions I tested have properties like "NumberOfRows" and "NumberOfColumns". I would like to know whether it is possible to adjust that with RadControls.

 Please help. Thank you.
Yavor
Telerik team
 answered on 23 Apr 2013
6 answers
207 views
I can set the theme for the whole app, but can I for a usercontrol?
danparker276
Top achievements
Rank 2
 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?