Hi dear Telerik Team,
On right clicking I want to open a radial menu. But the standard context menu appears.
How can I disable the context menu and replace by the radial menu?
Thank you.
Our application has to display various different map background layers. We use both MercatorProjection and EPSG900913Projection depending on which map we are displaying. Furthermore we use EPSG900913Projection to display data from an image file, using a custom provider derived from UriImageProvider. For this scenario we need to be able to set a maximum zoom level of 30. When switching between different map backgrounds we try to reset the state of the map control. These are the steps we take to try and do this:
//Workaround for modern client crash when disposing telerik control (switching between maps)
if (RadMap?.Items?.Count > 0)
{
foreach (var radMapItem in RadMap.Items)
{
var visualizationLayer = radMapItem as VisualizationLayer;
visualizationLayer?.Items?.Clear();
}
}
DetachRadMapHandlers();
DetachViewModelHandlers(_viewModel);
DisposeMapLayers();
// Reset state of RadMap
RadMap.ItemsSource = null;
foreach (var provider in RadMap.Providers)
{
provider.Dispose();
}
RadMap.Provider = null;
RadMap.Providers.RemoveAll();;
// if we're re-using this control we must change the min/max zoom before changing spatial reference
RadMap.MinZoomLevel = MapConstants.DefaultMapMinZoomLevel;
RadMap.MaxZoomLevel = MapConstants.DefaultMapMaxZoomLevel;
_defaultMinZoomLevel = MapConstants.DefaultMapMinZoomLevel;
_defaultMaxZoomLevel = MapConstants.DefaultMapMaxZoomLevel;
// we need to set the zoom level to a value in the allowable zoom range
// before assigning another background
RadMap.ZoomLevel = MapConstants.DefaultMapMinZoomLevel;
RadMap.SpatialReference = new MercatorProjection();
MiniMap.SpatialReference = new MercatorProjection();
RadMap.GeoBounds = new LocationRect();
RadMap.Center = new Location();
RadMap.GeoBoundsNW = Location.Empty;
RadMap.GeoBoundsSE = Location.Empty;
Unfortunately this doesn't always seem to work. In particular I notice that this does not set the GeographicalBounds back the the initial state (I don't know if this is significant). It won't be easy to create a sample app to try and isolate this problem but if you have any suggestions on how better to restore the map control to it's initial state I'd appreciate it.
Thanks
Pete
Hi,
I am using RadScheduleView in a WPF application. I have a requirement where if an appointment is scheduled from 10.00-11.00 , the next time when I click on scheduler control to schedule an appointment, the calendar corresponding to start time and end time should have the 10.00 and 11.00 in disabled state.
How can I achieve that?
Thanks,
Divya
I would like to know how to get my CustomMapping to run the Apply method. I have a list of animals and the speed of the animals should control the colour of the treemapitem. However when the animals speed changes then the treemap tiles don't change colour but on startup the colours visible. They just never change. When the animals size changes the tiles do reflect the changes. How do I run the Apply method?
<telerik:RadTreeMap x:Name=
"treeMap"
ItemsSource=
"{Binding TreeMapList}"
LayoutStrategy=
"Squarified"
>
<telerik:RadTreeMap.TypeDefinitions>
<telerik:TypeDefinition TargetTypeName=
"TreeMapItem"
ValuePath=
"AnimalSize"
LabelPath=
"Animal"
ToolTipPath=
"ToolTip"
>
<telerik:TypeDefinition.Mappings>
<local:ValueColourMapping MinValue=
"{Binding MinCurrentSpeed}"
MaxValue=
"{Binding MaxCurrentSpeed}"
Field=
"CurrentSpeed"
/>
</telerik:TypeDefinition.Mappings>
</telerik:TypeDefinition>
</telerik:RadTreeMap.TypeDefinitions>
</telerik:RadTreeMap>
Hi All,
I am using radwindow as a child window in my application. Programatically I am trying to set child window behind main window.Window state 'Minimized' minimizes window so doesn't help.
How to set child window behind main window and vice versa without changing window state?
Any help would be appreciated.
Regards,
Prashant
Hi, I have a radRichTextBox, and when I click on an image the ImageMiniToolBar appears but it has nondescript tooltips like System.Windows.Controls.TextBlock. Is there a way to specify each button tooltip?
Hi,
DragDropManager.AddDropHandler not working for ItemsControl,
Here is my code. I also attached a sample project.
VIEW
<Window x:Class="DragDropExample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
Title="MainWindow"
Height="500"
Width="800">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical"
Margin="10">
<TextBlock Text="SOURCE"
FontWeight="Bold" />
<ItemsControl Name="Source"
VerticalAlignment="Stretch"
Height="400"
BorderBrush="Red"
BorderThickness="1">
<Button Content="DRAG ME"
Margin="10"
Width="100"
telerik:DragDropManager.AllowCapturedDrag="True" />
<Button Content="DRAG ME 1"
Margin="10"
Width="100"
telerik:DragDropManager.AllowCapturedDrag="True" />
</ItemsControl>
</StackPanel>
<StackPanel Grid.Column="1"
Margin="10"
Orientation="Vertical">
<TextBlock Text="This is ItemsControl. NOT WORKING"
FontWeight="Bold" />
<ItemsControl Name="TargetItemsControl"
AllowDrop="True"
Height="400"
BorderBrush="Blue"
BorderThickness="1"
VerticalAlignment="Stretch" />
</StackPanel>
<StackPanel Grid.Column="2"
Margin="10"
Orientation="Vertical">
<TextBlock Text="This is LlistBox. WORKING"
FontWeight="Bold" />
<ListBox Name="TargetListBox"
AllowDrop="True"
Height="400"
VerticalAlignment="Stretch"
BorderBrush="Blue"
BorderThickness="1"
Grid.Column="2" />
</StackPanel>
</Grid>
</Window>
CODE
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Telerik.Windows.DragDrop;
namespace DragDropExample
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DragDropManager.AddDragInitializeHandler(Source, OnDragInitialize);
DragDropManager.AddGiveFeedbackHandler(Source, OnGiveFeedback);
DragDropManager.AddDropHandler(TargetItemsControl, OnDrop);
DragDropManager.AddDropHandler(TargetListBox, OnDrop);
}
private void OnDragInitialize(object sender, DragInitializeEventArgs args)
{
FrameworkElement source = sender as FrameworkElement;
args.AllowedEffects = DragDropEffects.All;
var payload = DragDropPayloadManager.GeneratePayload(null);
var data = ((Button)args.OriginalSource).Content;
payload.SetData("DragData", data);
args.Data = payload;
args.DragVisual = new ContentControl { Content = data };
}
private void OnGiveFeedback(object sender, Telerik.Windows.DragDrop.GiveFeedbackEventArgs args)
{
args.SetCursor(Cursors.Arrow);
args.Handled = true;
}
private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
var data = ((DataObject)e.Data).GetData("DragData") as string;
if (sender.GetType() == typeof(ListBox))
{
TargetListBox.Items.Add(data);
}
else if (sender.GetType() == typeof(ItemsControl))
{
TargetItemsControl.Items.Add(data);
}
}
}
}
According to your article:
https://docs.telerik.com/devtools/wpf/controls/radgridview/features/search-as-you-type#modifying-the-searching-criteria
E.g. I want to search for RIO + CED but the "+" operator is not working. Please see attached pic (plus.jpg)!
Or how can I check that the system is set up well?
I tried already to change the culture code from the UIThread because we use it to change localization, no change.
By the way the quotes operator is working.(quotes.jpg)
Use telerik 2018.2.515.45
Thanks for your help!!
PR Gert
Hello,
I have a WPF project where I am using RadDocking with 3 RadPaneGroups. I get an Index out of range error when I pin and then try to unpin a pane or if I try to pin a second item. I am able to set the pane to floatable/dockable and manipulate them that way, but when I try to unpin I get the error. I'd like to note we are targeting framework .Net Core 3.1.
Error Message:
System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')'
This exception was originally thrown at this call stack:
System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
Telerik.Windows.Controls.RadTabControl.RaiseIsSelectedChangedAutomationEvent(System.Windows.DependencyObject, bool)
Telerik.Windows.Controls.RadTabItem.OnIsSelectedChanged(bool, bool)
Telerik.Windows.Controls.RadTabItem.OnIsSelectedPropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs)
System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, ref System.Windows.EffectiveValueEntry, bool, bool, System.Windows.OperationType)
System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, object, System.Windows.PropertyMetadata, bool, bool, System.Windows.OperationType, bool)
...
[Call Stack Truncated]
Here is my XAML:
01.
<
telerik:RadDocking
Grid.Row
=
"3"
BorderThickness
=
"0"
HasDocumentHost
=
"False"
RetainPaneSizeMode
=
"DockingAndFloating"
CanAutoHideAreaExceedScreen
=
"True"
>
02.
<
telerik:RadSplitContainer
Orientation
=
"Horizontal"
>
03.
<!--My Queries-->
04.
<
telerik:RadPaneGroup
>
05.
<
telerik:RadPane
Header
=
"My Queries"
CanUserClose
=
"True"
>
06.
<
StackPanel
>
07.
<
Border
>
08.
<
StackPanel
>
09.
<
TextBlock
Text
=
"Query Results"
/>
10.
</
StackPanel
>
11.
</
Border
>
12.
</
StackPanel
>
13.
</
telerik:RadPane
>
14.
</
telerik:RadPaneGroup
>
15.
16.
<!--Summary-->
17.
<
telerik:RadPaneGroup
>
18.
<
telerik:RadPane
Header
=
"Summary"
CanUserClose
=
"True"
>
19.
<
StackPanel
Margin
=
"3"
>
20.
<
TextBlock
Text
=
"View Summary"
/>
21.
</
StackPanel
>
22.
</
telerik:RadPane
>
23.
</
telerik:RadPaneGroup
>
24.
25.
<!--Torge Charts-->
26.
<
telerik:RadPaneGroup
>
27.
<
telerik:RadPane
Header
=
"Torque Charts"
CanUserClose
=
"True"
>
28.
<
StackPanel
Margin
=
"3"
>
29.
<
TextBlock
Text
=
"View Torque Charts"
/>
30.
</
StackPanel
>
31.
</
telerik:RadPane
>
32.
</
telerik:RadPaneGroup
>
33.
34.
</
telerik:RadSplitContainer
>
35.
</
telerik:RadDocking
>
Hi all!
I have an event which triggers an async loading task in which I change data which is bound to the RadCalendar.
In my development environment I never had any issues but users on RDS-Server have. This is the stack-trace from there log:
ERROR2020-01-20 11:25:28 – Fatal Error - StackTrace: ModuleContainerManager - HandleUnhandledException
WeakReferenceList`1 - IndexOf
WeakReferenceList`1 - Remove
SelectionChanger`1 - Select
SelectionChanger`1 - InsertItem
Collection`1 - Add
SelectionChanger`1 - AddJustThis
RadCalendar - AddToSelection
RadCalendar - OnSelectedDateChanged
RadCalendar - OnSelectedDateChanged
DependencyObject - OnPropertyChanged
FrameworkElement - OnPropertyChanged
DependencyObject - NotifyPropertyChange
DependencyObject - UpdateEffectiveValue
DependencyObject - InvalidateProperty
BindingExpressionBase - Invalidate
BindingExpression - TransferValue
BindingExpression - ScheduleTransfer
ClrBindingWorker - NewValueAvailable
PropertyPathWorker - UpdateSourceValueState
PropertyPathWorker - OnDependencyPropertyChanged
ClrBindingWorker - OnSourceInvalidation
BindingExpression - HandlePropertyInvalidation
BindingExpressionBase - OnPropertyInvalidation
BindingExpression - OnPropertyInvalidation
DependentList - InvalidateDependents
DependencyObject - NotifyPropertyChange
DependencyObject - UpdateEffectiveValue
DependencyObject - SetValueCommon
DependencyObject - SetCurrentValue
RadDateTimePicker - OnSelectedValueChanged
RadDateTimePicker - OnSelectedValueChanged
DependencyObject - OnPropertyChanged
FrameworkElement - OnPropertyChanged
DependencyObject - NotifyPropertyChange
DependencyObject - UpdateEffectiveValue
DependencyObject - InvalidateProperty
BindingExpressionBase - Invalidate
BindingExpression - TransferValue
BindingExpression - ScheduleTransfer
ClrBindingWorker - NewValueAvailable
PropertyPathWorker - UpdateSourceValueState
PropertyPathWorker - RefreshValue
ClrBindingWorker - ScheduleTransferOperation
DataBindOperation - Invoke
DataBindEngine - ProcessCrossThreadRequests
ExceptionWrapper - InternalRealCall
ExceptionWrapper - TryCatchWhen
DispatcherOperation - InvokeImpl
DispatcherOperation - InvokeInSecurityContext
CulturePreservingExecutionContext - CallbackWrapper
ExecutionContext - RunInternal
ExecutionContext - Run
ExecutionContext - Run
CulturePreservingExecutionContext - Run
DispatcherOperation - Invoke
Dispatcher - ProcessQueue
Dispatcher - WndProcHook
HwndWrapper - WndProc
HwndSubclass - DispatcherCallbackOperation
ExceptionWrapper - InternalRealCall
ExceptionWrapper - TryCatchWhen
Dispatcher - LegacyInvokeImpl
HwndSubclass - SubclassWndProc
nsafeNativeMethods - DispatchMessage
Dispatcher - PushFrameImpl
Dispatcher - PushFrame
Application - RunDispatcher
Application - RunInternal
Application - Run
Application - Run
App - Main
Do I have to take care some how of the binding or how can I catch this to prevent app crash?
Thanks for help!!!!!!
BR Gert