Telerik Forums
UI for WPF Forum
2 answers
163 views

Hey,

 

I have a Chart with multiple stacked BarSeries. My Top series has to Labels, one to display its own value, one for the sum of the stacked ones combines.

The problem is, that this:

                        <telerik:ChartSeriesLabelDefinition HorizontalAlignment="Center" VerticalAlignment="Top" >
                            <telerik:ChartSeriesLabelDefinition.Template>
                                <DataTemplate>
                                    <TextBlock Text="{Binding DataItem.ReklasGesamt}" FontWeight="Bold" />
                                </DataTemplate>
                            </telerik:ChartSeriesLabelDefinition.Template>
                        </telerik:ChartSeriesLabelDefinition>
Won't resize if the value changes. So if the value was two digits and gets three it will cut off.

If I don't spezify a template it will resize, but will obviously not display the value I want.

Is there any way to get the label to resize? Ordo I have to add a invisble Pointseries?

 

Greetings

Benedikt

Benedikt
Top achievements
Rank 4
Iron
Iron
Iron
 answered on 30 Jan 2020
1 answer
153 views

Hello,

We'd like to make a Multi-Level Swimlanes project such as the attached image.

The lanes should support drag and drop (reordering), resizing, collapsing and etc like in the real demo of the WPF Swimlane Example.
Let me know if you can provide me an example project.

 

Regards,

Martin Ivanov
Telerik team
 answered on 30 Jan 2020
1 answer
1.0K+ views

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.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Jan 2020
1 answer
236 views

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

 

 

Petar Mladenov
Telerik team
 answered on 29 Jan 2020
1 answer
392 views

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

Lance | Senior Manager Technical Support
Telerik team
 answered on 28 Jan 2020
1 answer
112 views

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>

 

Vladimir Stoyanov
Telerik team
 answered on 27 Jan 2020
1 answer
420 views

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

 

 

 

Vladimir Stoyanov
Telerik team
 answered on 24 Jan 2020
3 answers
337 views

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?   

Tanya
Telerik team
 answered on 24 Jan 2020
0 answers
227 views

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);
            }
        }
    }
}



Yesim
Top achievements
Rank 1
 asked on 24 Jan 2020
3 answers
167 views

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

 

Gert
Top achievements
Rank 1
 answered on 24 Jan 2020
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
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?