Telerik Forums
UI for WPF Forum
0 answers
3 views

I tried to upgrade from 2021 R2 SP1 to 2022 R2 SP1

But it breaks RadSpreadsheet with the error message "TaskPanefehlt!" (probably in english it is "TaskPanemissing!")(yes there is no space after the word "Pane") at dev/design time.

And it throws a NullReferenceException at runtime when i try to assign a workbook to the elements workbook property. 

 

My own error log file:

"

(2022_08_09__08_04_31) Es ist ein unerwarteter Fehler aufgetreten!

Fehlermeldung:
TaskPanefehlt!

Innere Fehlermeldung:


Fehlerlokalisationscode: [[here is my internal error location code, i removed it for reporting here online]]
(Wenn Sie den Fehler melden möchten geben sie bitte den Fehlercode und Fehlerlokalisationsocde an oder fertigen Sie ein Screenshot dieser Fehlermeldung an.)

Stacktrace:
   bei Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetSheetSelector.SheetTabItem_StateChanged(Object sender, EventArgs e)
   bei Telerik.Windows.Controls.Spreadsheet.Controls.SheetSelectorTabItem.OnStateChanged()
   bei Telerik.Windows.Controls.Spreadsheet.Controls.SheetSelectorTabItem.CurrentStateChanged()
   bei Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetSheetSelector.BuildTabItems()
   bei Telerik.Windows.Controls.Spreadsheet.Controls.RadSpreadsheetSheetSelector.RadSpreadsheetSheetSelector_Loaded(Object sender, RoutedEventArgs e)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   bei System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   bei System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   bei MS.Internal.LoadedOrUnloadedOperation.DoWork()
   bei System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   bei System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   bei System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   bei System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Inner-Stacktrace:

"

 

env info: Win10/VS2019/C#/WPF/.Net Framework 4.7.2

Kay
Top achievements
Rank 1
 asked on 09 Aug 2022
0 answers
2 views

Hello, 

I need to create a scale, showing the Major tick at the beginning/at the end of the scale.

In order to do this, I've set ShowLastLabel to false. The data on the scale changes every 200 m/s.  The last label sometimes blinks, even though the property ShowLastLabel is set to false.

If I change EndTickOffset, instead of changing ShowLastLabel, then I do not see the Major tick at the end of the scale.

See the attached example.

 <telerik:RadVerticalLinearGauge 
             FontSize="16"
             Background="Green"
             HorizontalAlignment="Left"
             Width="3"
             Margin="30,94,0,95"
            >
            <telerik:VerticalLinearScale
                    Max="{Binding Max,FallbackValue=20}"
                    Min="{Binding Min,FallbackValue=0}"
                    Background="Green"
                    LabelLocation="Inside"
                    FontSize="16"
                    StartTickOffset="{Binding TickOffset,FallbackValue=0}"
                    EndTickOffset="{Binding TickOffset,FallbackValue=0}"
                 ShowFirstLabel="False"
                    ShowLastLabel="False"
                    MajorTickStep="10"
                    IsInteractive="True"
                    MinorTickBackground="Red"
                    MiddleTicks="2"
                    MiddleTickBackground="Green"
                    MiddleTickLocation="Outside"
                    LabelOffset="16"
                    MiddleTickRelativeWidth="5"
                    MiddleTickRelativeHeight="0.015*"
                    MajorTickRelativeWidth="20"
                    MajorTickRelativeHeight="0.015"
                    EndWidth="0.03"
                    StartWidth="0.03"
                    MinorTicks="1"
                    >
            </telerik:VerticalLinearScale>
        </telerik:RadVerticalLinearGauge>

 

Timer timer= new Timer(200);
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            timer.Elapsed += Timer_Elapsed;
            timer.Start();
        }

 

 private void Method(double value)
        {
            Val = value.ToString();
            Min = value - 10;
            Max = value + 10;
            double startValue = Math.Round(Min / 10) * 10;
            TickOffset = startValue - Min;


        }
Dmitry
Top achievements
Rank 1
 updated question on 09 Aug 2022
1 answer
6 views

Hi,

I use RadGridView.ExportToWorkbook on a grid with over 600 000 rows: the operation take much than 5' to end. Can I speed up it?

Thank you

Luigi

Martin Ivanov
Telerik team
 answered on 05 Aug 2022
0 answers
10 views

I am using Telerik.Windows.Controls for Wpf version 2021.1.233, and have reports from a customer that our application is crashing with the following error included below. As you can see the call stack is not terribly helpful, so I am hoping that either someone else has run into this, or someone from Telerik can offer some insight as to what might be null in the MapSourceInitializeCompleted handler so I can look into preventing this error.

Briefly, my application opens a window with a RadMap, draws a pushpin or two on the map, and the user can close the window at any point. After a period of time the window can also be closed by the application without any user interaction if certain criteria are met. I am fairly sure that the window with the map opens and displays correctly. I think the crash may be related to either an update to the map (drawing the pushpin), or closing the window containing the map, but that is a best guess at this point.

.NET Core Version: 3.1.27
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.Map.TilePresenter.MapSourceInitializeCompleted(Object sender, EventArgs e)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
Heather Kyle
Top achievements
Rank 2
 asked on 04 Aug 2022
1 answer
7 views

Hi,

in wpf, in telerik:RadGridView I can not change width of the RowIndicator column (the very first one where the arrow points at the selected row.). There is only visibility property, but nothing else.

Is there a way to change it?

thank you,

J.

Stenly
Telerik team
 answered on 04 Aug 2022
1 answer
16 views

Hello Team,

I have faced one issue in combbox item template text is not binding after selected item from the combobox.

NOTE; IsEditable field is set to true then the value is not binding.

if its false then its working fine.

I have attached the screenshot for your reference.

Kindly help me to resolve this.

Thanks,

Raja.

Stenly
Telerik team
 answered on 04 Aug 2022
0 answers
10 views

Hi

I am having an issue binding the IsSelected property of a RadListboxItem. Specifically I am attempting to follow the pattern provided in this blog post Accessing WPF ListBox SelectedItems using MVVM (markwithall.com)

The key part toward the bottom of the post is this which binds the IsSelected property of a ListBoxItem. I have tested it and it works just fine.

<ListBox ItemsSource="{Binding Items}" SelectionMode="Extended">
    <ListBox.ItemContainerStyle>
        <Style TargetType="ListBoxItem">
            <Setter Property="IsSelected" Value="{Binding IsSelected}" />
        </Style>
    </ListBox.ItemContainerStyle>
</ListBox>

However when I try to use a RadListbox and setup the ItemContainerStyle like this

<telerik:RadListBox.ItemContainerStyle>
	<Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
		<Setter Property="IsSelected" Value="{Binding IsSelected}" />
	</Style>
</telerik:RadListBox.ItemContainerStyle>
The bound value does not update, is this by design or a bug?
Ross
Top achievements
Rank 2
 updated question on 03 Aug 2022
1 answer
3 views

I have lots of windows within my app that use the radgridview. I'm getting random errors such as the attached. Your help would be appreciated. I'm using the latest version: 2022.2.621.60.

Many thanks

Rob

- Stacktrace Frames: ------------------------------------------------------------------------------
* Frame (76): TryCatchWhen | System.Windows.Threading.ExceptionWrapper
* Frame (75): InternalRealCall | System.Windows.Threading.ExceptionWrapper
* Frame (74): DispatcherCallbackOperation | MS.Win32.HwndSubclass
* Frame (73): WndProc | MS.Win32.HwndWrapper
* Frame (72): InputFilterMessage | System.Windows.Interop.HwndSource
* Frame (71): FilterMessage | System.Windows.Interop.HwndMouseInputProvider
* Frame (70): ReportInput | System.Windows.Interop.HwndMouseInputProvider
* Frame (69): ReportInput | System.Windows.Input.InputProviderSite
* Frame (68): ProcessInput | System.Windows.Input.InputManager
* Frame (67): ProcessStagingArea | System.Windows.Input.InputManager
* Frame (66): RaiseTrustedEvent | System.Windows.UIElement
* Frame (65): RaiseEventImpl | System.Windows.UIElement
* Frame (64): InvokeHandlersImpl | System.Windows.EventRoute
* Frame (63): InvokeHandler | System.Windows.RoutedEventHandlerInfo
* Frame (62): InvokeHandler | System.Windows.RoutedEventArgs
* Frame (61): InvokeEventHandler | System.Windows.Input.MouseButtonEventArgs
* Frame (60): OnMouseUpThunk | System.Windows.UIElement
* Frame (59): ReRaiseEventAs | System.Windows.UIElement
* Frame (58): InvokeHandlersImpl | System.Windows.EventRoute
* Frame (57): InvokeHandler | System.Windows.RoutedEventHandlerInfo
* Frame (56): InvokeHandler | System.Windows.RoutedEventArgs
* Frame (55): InvokeEventHandler | System.Windows.Input.MouseButtonEventArgs
* Frame (54): OnMouseLeftButtonUpThunk | System.Windows.UIElement
* Frame (53): OnMouseLeftButtonUp | System.Windows.Controls.Primitives.ButtonBase
* Frame (52): OnClick | System.Windows.Controls.Button
* Frame (51): OnClick | System.Windows.Controls.Primitives.ButtonBase
* Frame (50): RaiseEvent | System.Windows.UIElement
* Frame (49): RaiseEventImpl | System.Windows.UIElement
* Frame (48): InvokeHandlersImpl | System.Windows.EventRoute
* Frame (47): InvokeHandler | System.Windows.RoutedEventHandlerInfo
* Frame (46): SetValue | System.Windows.DependencyObject
* Frame (45): SetValueCommon | System.Windows.DependencyObject
* Frame (44): UpdateEffectiveValue | System.Windows.DependencyObject
* Frame (43): NotifyPropertyChange | System.Windows.DependencyObject
* Frame (42): OnPropertyChanged | System.Windows.FrameworkElement
* Frame (41): OnPropertyChanged | System.Windows.DependencyObject
* Frame (40): SetValue | System.Windows.DependencyObject
* Frame (39): SetValueCommon | System.Windows.DependencyObject
* Frame (38): UpdateEffectiveValue | System.Windows.DependencyObject
* Frame (37): NotifyPropertyChange | System.Windows.DependencyObject
* Frame (36): OnPropertyChanged | System.Windows.FrameworkElement
* Frame (35): OnPropertyChanged | System.Windows.DependencyObject
* Frame (34): OnIsOpenChanged | System.Windows.Controls.Primitives.Popup
* Frame (33): CreateWindow | System.Windows.Controls.Primitives.Popup
* Frame (32): SetRootVisualToPopupRoot | System.Windows.Controls.Primitives.Popup
* Frame (31): set_RootVisual | System.Windows.Interop.HwndSource
* Frame (30): set_RootVisualInternal | System.Windows.Interop.HwndSource
* Frame (29): SetLayoutSize | System.Windows.Interop.HwndSource
* Frame (28): Measure | System.Windows.UIElement
* Frame (27): MeasureCore | System.Windows.FrameworkElement
* Frame (26): MeasureOverride | System.Windows.Controls.Primitives.PopupRoot
* Frame (25): Measure | System.Windows.UIElement
* Frame (24): MeasureCore | System.Windows.FrameworkElement
* Frame (23): MeasureOverride | System.Windows.Controls.Decorator
* Frame (22): Measure | System.Windows.UIElement
* Frame (21): MeasureCore | System.Windows.FrameworkElement
* Frame (20): MeasureOverride | System.Windows.Documents.AdornerDecorator
* Frame (19): MeasureOverride | System.Windows.Controls.Decorator
* Frame (18): Measure | System.Windows.UIElement
* Frame (17): MeasureCore | System.Windows.FrameworkElement
* Frame (16): MeasureOverride | System.Windows.Controls.Control
* Frame (15): Measure | System.Windows.UIElement
* Frame (14): MeasureCore | System.Windows.FrameworkElement
* Frame (13): MeasureOverride | System.Windows.Controls.ContentPresenter
* Frame (12): MeasureElementWithSingleChild | MS.Internal.Helper
* Frame (11): Measure | System.Windows.UIElement
* Frame (10): MeasureCore | System.Windows.FrameworkElement
* Frame (9): MeasureOverride | System.Windows.Controls.Border
* Frame (8): Measure | System.Windows.UIElement
* Frame (7): MeasureCore | System.Windows.FrameworkElement
* Frame (6): MeasureOverride | System.Windows.Controls.ContentPresenter
* Frame (5): MeasureElementWithSingleChild | MS.Internal.Helper
* Frame (4): Measure | System.Windows.UIElement
* Frame (3): MeasureCore | System.Windows.FrameworkElement
* Frame (2): ApplyTemplate | System.Windows.FrameworkElement
* Frame (1): OnApplyTemplate | Telerik.Windows.Controls.GridView.FilteringControl
* Frame (0): InitializeDistinctValuesFilterClearButton | Telerik.Windows.Controls.GridView.FilteringControl
- Stacktrace Frames -------------------------------------------------------------------------------
- Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.GridView.FilteringControl.InitializeDistinctValuesFilterClearButton()
   at Telerik.Windows.Controls.GridView.FilteringControl.OnApplyTemplate()
   at System.Windows.FrameworkElement.ApplyTemplate()
   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.Border.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.Controls.Decorator.MeasureOverride(Size constraint)
   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.Decorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Primitives.PopupRoot.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 System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at System.Windows.Controls.Primitives.Popup.SetRootVisualToPopupRoot()
   at System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall)
   at System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   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.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.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.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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
- Exception Inner:

 

Dilyan Traykov
Telerik team
 answered on 02 Aug 2022
1 answer
5 views

I try to save the map to the image like this:

    private MemoryStream LocationsToImage(ICollection<LocationType> locationCollection, Size size)
    {
        var map = new RadMap
        {
            Language = XmlLanguage.GetLanguage(CultureInfo.DefaultThreadCurrentCulture.Name),
            Width = size.Width,
            Height = size.Height
        };
        var layer = new InformationLayer();
        map.Items.Add(layer);
        MapHelper.DrawLocations(map, layer, locationCollection);

        //print 
        map.Arrange(new Rect(size));
        map.Measure(size);
        map.Provider = MapProviderFactory.Create();
        using var ms = new MemoryStream();
        map.ExportToImage(@"C:\New Test.png", true);
        return ms;
    }

 

And the result I get:

 

But if I use for a map that is displayed in the UI it will be printed properly

 

But also regarding a map that is not displayed in the UI and was created here (as in the code above) I can use PrintVisual and print it properly.

 

    private void LocationsToImage(ICollection<LocationType> locationCollection, Size size)
    {
        var map = new RadMap
        {
            Language = XmlLanguage.GetLanguage(CultureInfo.DefaultThreadCurrentCulture.Name),
            Width = size.Width,
            Height = size.Height
        };
        var layer = new InformationLayer();
        map.Items.Add(layer);
        MapHelper.DrawLocations(map, layer, locationCollection);

        //print 
        map.Arrange(new Rect(size));
        map.Measure(size);
        map.Provider = MapProviderFactory.Create();
        var pd = new PrintDialog();
        if (pd.ShowDialog().GetValueOrDefault())
        {
            pd.PrintVisual(map, string.Empty);
        }
    }

 

 

So how can I use ExportToImage for a map that I create in code and not in view?

Martin Ivanov
Telerik team
 answered on 02 Aug 2022
1 answer
10 views

Hello,

Until today, I was using Telerik libraries with the Visual Studio built-in extension. In other words, all the Telerik dlls were placed in a "Lib" folder and the various projects referenced them. Everything was working perfectly.

I would like to use Telerik via NuGet packages.

So I removed all references in my projects, deleted the "Lib" folder, and added the necessary NuGet packages as replacements in each projects.

The application compiles and launches perfectly.

Unfortunately, all texts (on a GridView for example) now appear in English (before, it was in French).

Looking at the "bin/Debug/fr" folder, I see that the Telerik.Windows.Controls.resources.dll file is missing. The file doesn't seem to generate when compiling. If I manually copy the file into this folder, the texts appear in French.

How do I make this happen automatically? I have the impression that the NuGet packages do not contain the resources of the different localization.

Am I doing something wrong or is it a problem with Telerik's NuGet packages?

Thanks in advance.

Martin Ivanov
Telerik team
 answered on 01 Aug 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Toby
Top achievements
Rank 3
Iron
Iron
Benjamin
Top achievements
Rank 2
Iron
Veteran
Bernd
Top achievements
Rank 4
Bronze
Iron
Iron
minh
Top achievements
Rank 2
Iron
Iron
Iron
Sebastien
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Toby
Top achievements
Rank 3
Iron
Iron
Benjamin
Top achievements
Rank 2
Iron
Veteran
Bernd
Top achievements
Rank 4
Bronze
Iron
Iron
minh
Top achievements
Rank 2
Iron
Iron
Iron
Sebastien
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?