Telerik Forums
UI for WPF Forum
9 answers
198 views
Having a very frustrating problem. My sample project works perfectly, but my real application does not. I implemented IMapItemsVirtualizationSource and everything shows up fine. When I change the zoom, MapItemsRequest is called. I verified that only the items for the corresponding zoomlevel are added to CompleteItemsRequest. However, the items from the previous zoom level are still shown on the map. If I pan the map so that the items are out of view and then pan back to the original location, the old items are gone. It appears that changing the zoom level is not causing the old items to be removed. Any ideas what could cause this? Version 2014.3.1202.45. This is the first time I've tried using virtualization.
Petar Mladenov
Telerik team
 answered on 28 Mar 2018
2 answers
84 views
I need to fill the area between my data line and vertical axis, but all areaseries are drawn between stroke and horizontal axis by default. Is there a way to fill area between stroke and vertical axis? Using something like scartterAreaSeriesDescriptor ?
Dilyan Traykov
Telerik team
 answered on 28 Mar 2018
5 answers
602 views

Hello,

I have a problem using radmenu in RadWindow.HeaderTemplate.

The radmenu items are displayed but the sub items aren't and nothing happens when i click on item.

Here is my code :

<telerik:RadWindow x:Class="MainWindow"
        Header="Test" Height="900" Width="1400"
        WindowStartupLocation="CenterScreen"
        FontFamily="Segoe UI Bold"
        FontSize="18">
    <telerik:RadWindow.HeaderTemplate>       
        <DataTemplate >
            <telerik:RadMenu Background="Transparent"  HorizontalAlignment="Right" ClickToOpen="false" >
                <telerik:RadMenuItem Header="Item1"  />
                <telerik:RadMenuItem Header="Item2" >
                    <telerik:RadMenuGroupItem>
                        <telerik:RadMenuItem Header="SubItem1"/>
                    </telerik:RadMenuGroupItem>
                </telerik:RadMenuItem>
            </telerik:RadMenu>
        </DataTemplate>
    </telerik:RadWindow.HeaderTemplate>
    <Grid>
 
    </Grid>
</telerik:RadWindow>

 

Thanks in advance.

Regards.

OD
Top achievements
Rank 1
 answered on 27 Mar 2018
3 answers
260 views

I have Prism application and the shell window is a RadRibbonWindow with a RadRibbonView.  The close button is shifted left.  I cannot figure out why.  If I replace the RadRibbonWindow with a Window, then the close button renders in the correct location.  Attached is an image of the RadRibbonWindow with close box shifted left.  Thanks.

 

 

Sia
Telerik team
 answered on 26 Mar 2018
2 answers
240 views

Hi Telerik,

 

I would like to ask, if it default behavior for the dialog, that if the folder input is empty, the Open Folder button is enabled?

And if it is true, then where can I find the folder name, cause the Filename property is null?

I saw on the following pictures, that if the folder input is empty, the button is disabled.

https://docs.telerik.com/devtools/wpf/controls/radfiledialogs/overview

 

It would be nice if you could help me here.

with kind regards

 

 

Iwo
Top achievements
Rank 1
 answered on 26 Mar 2018
6 answers
178 views

There are a few question relating to customizing appointments :

1.  Is there any way to change the shape of an appointment?  i.e. have an ellipsed shaped appointment instead of a rectangle one?

2.  Is there any way to remove the resizing grips from an appointment that appear when you mouse over?

3.  Is there any way to have two appointments that overlap to just overlap each other and not shrink to half the row size?

 

Many Thanks.

Kalin
Telerik team
 answered on 26 Mar 2018
1 answer
163 views

Hello i just want to ask if is it possible to set the maximize item in radtileview control manually from code behind.

Like i want to set the starting maximize tile view item by index 1 or 2.

below is my xaml markup.

 <telerik:RadTileView MaximizeMode="One"
                      MinimizedColumnWidth="135"
                      MinimizedItemsPosition="Left"
                      MinimizedRowHeight="52"
                      PreservePositionWhenMaximized="True"
                      IsSelectionEnabled="True"
                      SelectionChanged="RadTileView_SelectionChanged"
                      SelectionMode="Single"
                      TileStateChangeTrigger="SingleClick">
            <telerik:RadTileViewItem Header="Item 1">
               
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item 2">
             
            </telerik:RadTileViewItem>
            <telerik:RadTileViewItem Header="Item 3">
             
            </telerik:RadTileViewItem>
 </telerik:RadTileView>

 

Thanks,

 

Martin Ivanov
Telerik team
 answered on 26 Mar 2018
0 answers
158 views

A project I'm working on for a client, that uses Telerik WPF controls gives errors in VS 2015 XAML Designer.

The project builds though, but the designer is not able to render the XAML, and this is important at this particular occasion.

For this XAML code produces the error: Assembly 'Telerik.Windows.Themes.Green' is not referenced by this project

<Application 
    x:Class="nspace.App" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
xmlns:Custom="http://schemas.microsoft.com/wpf/2008/toolkit"
>
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/System.Windows.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/Telerik.Windows.Controls.Chart.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/Telerik.Windows.Controls.Input.xaml" />
                <ResourceDictionary Source="/Telerik.Windows.Themes.Green;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <BooleanToVisibilityConverter x:Key="BoolToVis" />

        </ResourceDictionary>
    </Application.Resources>
</Application>

 

And everywhere through the project where some control is used, for example : "<telerik:Label" produces " "The name "Label" does not exist in the namespace"http://schemas.telerik.com/2008/xaml/presentation". 

 

Also looks like this is an issue only under VisualStudio 2015. I have tried cleaning the solution, rebuilding, changing to debug/release, adding attribute and manually deleting the shadow cache of visual studio but to no avail.

 

I will greatly appreciate your help. Thank you.

Виктор
Top achievements
Rank 1
 asked on 24 Mar 2018
3 answers
333 views

So, I have a RadListBox that I have set up to reorder items when the user drags one list box item in between two others. Its xaml looks a little something like this:

<tk:RadListBox Width="150"
    MaxHeight="700"
    VerticalAlignment="Top"
    VerticalContentAlignment="Top"
    tk:DragDropManager.AllowCapturedDrag="True"
    tk:DragDropManager.AllowDrag="True"
    AllowDrop="True"
    Background="Transparent"
    ItemContainerStyle="{StaticResource AttachmentDragItemStyle}"
    ItemTemplateSelector="{StaticResource ThumbnailTemplateSelector}"
    ItemsSource="{Binding Attachments}"
    ScrollViewer.CanContentScroll="False"
    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
    ScrollViewer.VerticalScrollBarVisibility="Auto"
    SelectedItem="{Binding SelectedAttachment, Mode=TwoWay}">
     <tk:RadListBox.ItemsPanel>
           <ItemsPanelTemplate>
                  <VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling" />
            </ItemsPanelTemplate>
     </tk:RadListBox.ItemsPanel>
      <tk:RadListBox.DragDropBehavior>
             <behaviors:ListBoxDragDropBehaviorEx />
      </tk:RadListBox.DragDropBehavior>
      <tk:RadListBox.DragVisualProvider>
             <tk:ScreenshotDragVisualProvider />
      </tk:RadListBox.DragVisualProvider>
       <tk:RadListBox.DropVisualProvider>
              <tk:LinearDropVisualProvider />
       </tk:RadListBox.DropVisualProvider>
</tk:RadListBox>

 

with the extended drag drop behavior being:

public class ListBoxDragDropBehaviorEx : ListBoxDragDropBehavior
{
    public override void DragDropCanceled(DragDropState state)
    {
        //base.DragDropCanceled(state);
    }
 
    protected override IEnumerable<object> CopyDraggedItems(DragDropState state)
    {
        //return base.CopyDraggedItems(state);
        return new List<object>();
    }
 
    public override void Drop(DragDropState state)
    {//implement some custom logic here
        //Do not call -> base.Drop(state);
        try
        {
            if (state.IsSameControl)
            {
                if (state.InsertIndex < 0)
                    return;
 
                if (state.DraggedItems != null)
                {
                    foreach (var item in state.DraggedItems)
                    {
                        BaseEntity obj = item as BaseEntity;
                        if (obj == null)
                            continue;
                        var index = state.SourceItemsSource.IndexOf(obj);
                        if (index >= 0)
                        {
                            state.SourceItemsSource.Remove(obj);
                            state.SourceItemsSource.Insert(state.InsertIndex, obj);
                        }
                    }
                }
            }
        }
        catch (Exception e)
        {
            MessageBoxUtil.ShowMessageBox("Drag & Drop error occurred", "Unable to reorder");
        }           
    }
 
    public override void DragDropCompleted(DragDropState state)
    {
        try
        {
            base.DragDropCompleted(state);
        }
        catch (Exception e)
        {
            MessageBoxUtil.ShowMessageBox("Drag & Drop error occurred", "Unable to reorder");
        }
    }
}

 

Now, this works beautifully... when it doesn't crash. But occasionally, if the user decides to perform a crazy mouse seizure and too many drag and drops are issued too quickly, a nullreference exception will be thrown with this stack trace:

 

   at Telerik.Windows.Controls.RadListBoxDragDropHelper.Drop(FrameworkElement dropTarget, FrameworkElement dropItemsControl, Object data, Type itemType)
   at Telerik.Windows.DragDrop.Behaviors.DragDropHelper`2.Drop(Object sender, DragEventArgs e)
   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 Telerik.Windows.DragDrop.DragDropManager.DelegateHelper.OnDragEventHandler(Object sender, DragEventArgs e)
   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.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
   at System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDrop(Object data, Int32 dragDropKeyStates, Int64 point, Int32& effects)
   at MS.Win32.UnsafeNativeMethods.DoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   at System.Windows.OleServicesContext.OleDoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
   at System.Windows.DragDrop.OleDoDragDrop(DependencyObject dragSource, DataObject dataObject, DragDropEffects allowedEffects)
   at System.Windows.DragDrop.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects)
   at Telerik.Windows.DragDrop.DragDropManager.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects, DragDropKeyStates initialKeyState, Object dragVisual, Point relativeStartPoint, Point dragVisualOffset)
   at Telerik.Windows.DragDrop.DragInitializer.StartDrag()
   at Telerik.Windows.DragDrop.DragInitializer.StartDragPrivate(UIElement sender)
   at Telerik.Windows.DragDrop.DragInitializer.DragSourceOnMouseMove(Object sender, MouseEventArgs e)
   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.MouseDevice.Synchronize()
   at System.Windows.Input.MouseDevice.ChangeMouseCapture(IInputElement mouseCapture, IMouseInputProvider providerCapture, CaptureMode captureMode, Int32 timestamp)
   at System.Windows.Input.MouseDevice.Capture(IInputElement element, CaptureMode captureMode)
   at Telerik.Windows.DragDrop.DragInitializer.DragSourceMouseLeave(Object sender, MouseEventArgs e)
   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.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState, Action`2 originChangedAction)
   at System.Windows.ReverseInheritProperty.OnOriginValueChanged(DependencyObject oldOrigin, DependencyObject newOrigin, IList`1 otherOrigins, DeferredElementTreeState& oldTreeState, Action`2 originChangedAction)
   at System.Windows.Input.MouseDevice.ChangeMouseOver(IInputElement mouseOver, Int32 timestamp)
   at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
   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)
   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.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.ShowDialog()

^ This is the point where the window opens, so obviously there is no code between here and the crash that I have control of. I am wondering why this happens sometimes and what can be done to fix this? I see no way to prevent this crash as it all seems to be happening inside telerik code. Please advise. 

Andrey
Top achievements
Rank 1
 answered on 23 Mar 2018
3 answers
148 views

Hi,

The requirement is converting HTML string into RadDocument xaml string, so I take the docs from

https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/formats-and-conversion/html/htmlformatprovider#export

and wrote the code as follow:

            HtmlFormatProvider provider = new HtmlFormatProvider();
            XamlFormatProvider provider2 = new XamlFormatProvider();
            RadDocument document = provider.Import(html);
            string xaml = provider2.Export(document);
            return xaml;

the error pops in line 3:

"The type initializer for 'Telerik.Windows.Documents.UI.TextDecorations.DecorationProviders.UnderlineTypes' threw an exception."

How to solve this?

Thanks,

Rain

 

Tanya
Telerik team
 answered on 23 Mar 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?