Telerik Forums
UI for WPF Forum
2 answers
85 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
626 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
272 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
265 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
187 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
171 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
164 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
342 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
151 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
1 answer
105 views

I have a simple RadWindow modal dialog that contains nothing but a RadWizard. On the CompletionWizardPage, I have the finish button text set to a localized string.

The caller adds an event handler to the Completed event and then calls ShowDialog().

If I double-click "Finish" really fast on the dialog, my Completed handler does indeed get called twice. That is not good eats. (Granted, any sane user would not double-click a button, but my tester's sanity is in question.)

I'm using UI for WPF 2017.3.1018.45 on 64 bit Win 10 and VS 2015.

Seems that a debounce is in order for that button.

-reilly.

 

Yoan
Telerik team
 answered on 23 Mar 2018
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?