Telerik Forums
UI for WPF Forum
1 answer
99 views

Hi mates, i have a variable from database, it's the comparable flag to set a DataTemplate to my PivotGrid.

 

public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            var cellAggregate = item as CellAggregateValue;
            if (cellAggregate != null)
            {
                var description = cellAggregate.Description as PropertyAggregateDescription;
                var test = item as PlannedRouteByMonthToGridPivot;

                if (description.PropertyName == nameof(ViewModels.PlannedRouteByMonthToGridPivot.PercentExecuted))
                {
                    
                    if (System.Convert.ToDouble(cellAggregate.Value) >= 0.965d)
                    {
                        return this.GreenTemplate;
                    }
                    else
                    {
                        return this.RedTemplate;
                    }
                }
            }

            return base.SelectTemplate(item, container);
        }

 

I need replace the number 0.965d with a variable in my RadPivotGrid DataProvider, someone have any ideia how i can do it.

Polya
Telerik team
 answered on 10 Jul 2017
5 answers
149 views

When creating the drag visual in codebeind, I am not seeing the data being bound to theTileViewItem, although the styles and templates are being applied, how can I get the data to bind?

01.private void OnDragInitialize(object sender, DragInitializeEventArgs args)
02.    {
03.      var data = ((RadRadioButton)args.OriginalSource).DataContext as ITile;
04. 
05.      var payload = DragDropPayloadManager.GeneratePayload(null);
06.      payload.SetData("DragData", data);
07. 
08.      args.Data = payload;
09.      args.AllowedEffects = DragDropEffects.All;
10.      args.DragVisual = new RadTileViewItem
11.      {
12.        DataContext = data,
13.        ContentTemplate = Application.Current.FindResource("DashboardTileView_ContentTemplate") as DataTemplate,
14.        HeaderTemplate = Application.Current.FindResource("DashboardTileView_ItemTemplate") as DataTemplate,
15.        Style = Application.Current.FindResource("DashboardTileView_ItemStyle") as Style
16.      };
17.    }

 

Thank you,
Maurice

Dilyan Traykov
Telerik team
 answered on 10 Jul 2017
6 answers
162 views

Hi,

I would like to display the label inside the bubble series, I have changed in the label definition VerticalAlignment to center but  it is shown now in the bottom of the bubble. 

 

Can any one help me to fix this issue?

Thanks

Houssem
Top achievements
Rank 1
 answered on 07 Jul 2017
5 answers
306 views

Hello

I want still opening MenuItem's popup when I open new floating pane by ToolWindow.

for example, VisualStudioDocking_WPF in Docking example source code, it worked I expected.

in that sample,

1. ToolBox pane, make a floating pane.

2. Open View 's menu popup in Menu bar.

3. Repeat click to ToolBox item in popup. (check and uncheck).

then also open and close ToolBox pane(floating) and View's menu item popup still opened. (that's exactly what I want)

It is implemented by RadMenuItem in MenuBars.

 

And I implemented like VisualStudioDocking_WPF sample, but I didn't use RadMenuItem, using WPF control MenuItem and set StaysOpenOnClick="True".

Then docked panes doesn't matter. (still opened menu item's popup)

But floating panes not worked what I want.(Popup close when open or close floating pane)

- I guess MenuItem lost focus when open or close floating pane, so popup also closed.-

I want still open popup like VisualStudioDocking_WPF sample.

How can I get it without RadMenuItem?

Martin Ivanov
Telerik team
 answered on 06 Jul 2017
3 answers
141 views

I have 2 RadTileView in two different tab from a RadTabControl.

The first RadTileView can reorder its items and there is a binding with the position property to reorder the items in the second RadTabControl.

It works well until I select the second tab and show the second RadTileView where the items are ordered like the first one as I want.

But now if I return in the first tab and drag some items, I have some blank spaces that appears and my items are disappearing.

How can I fix this?

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Jul 2017
2 answers
128 views

We're dealing with a very old version (2012.2.912.40) of the map control and using the Bing Maps provider. We've just had a couple users run into an ArgumentExpcetion getting thrown when it tries to utilize the IComparer.Compare method inside Telerik.Windows.Controls.Map.FileCacheBase.GetMetadata.

We've gone 5 years without ever encountering it, and then having a couple occurrences worries us. One user repaved their machine and the issue didn't resurface. Search hasn't revealed anything similar, so we were wondering if you've experienced this before and if maybe a newer version fixes the issue so we just need to upgrade.

Appreciate any help,

Travis

 

Here is the stack trace of the exception:

Exception stack traces: (ArgumentException) Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'System.Array+FunctorComparer`1[Telerik.Windows.Controls.Map.MemoryCache+ICacheRecordMetadata]'.
   at System.Collections.Generic.IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(Object comparer)
   at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Collections.Generic.List`1.Sort(Comparison`1 comparison)
   at Telerik.Windows.Controls.Map.FileCacheBase.GetMetadata()
   at Telerik.Windows.Controls.Map.FileCacheBase.SaveFilesThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Travis
Top achievements
Rank 1
 answered on 06 Jul 2017
5 answers
383 views
Hello,
when i try to load PDFs which comes from a scanner (so the pdfs contains an image), the RadPdfViewer ist very slow.
I have a pdf which is about 1MB full color, it takes about 8 seconds to load/render.

Does anyone else have this problem?

Thank you!
Deyan
Telerik team
 answered on 06 Jul 2017
3 answers
1.3K+ views
Hi telerik

It would appear to me, that the chart is not redrawn 'without series' if I call radChart.SeriesMappings.Clear() ?

It may not makes much sense to you what I'm trying, but my users can change the data used for series. Some selections may result in (handled) exceptions where no seriesMappings are added to the radChart.SeriesMappings - and in this case the previous choice of data is still shown to some confusion for my users?

Anything I can do to reset the chart in this case? Perhaps 'manually'?

(And, yes - I know that I'm in serious violation of the MVVM in snippet below ;-) ).

Thanks,

Anders, Denmark.

 private void UpdateGraphWithViewModel(IGraphViewModel viewModel)
        {
            _loggingService.Log("Drawing graph");

            var numberOfSeries = viewModel.NumberOfSeries;

            // If this is not the first time we are called, the existing must be reset before adding below.
            radChart.SeriesMappings.Clear();
            
            foreach (var selectedVariableY in viewModel.SelectedVariablesY)
            {
                for (var i = 0; i < numberOfSeries; i++)
                {
                    try
                    {
                        var pointMarkAppearanceSettings = new PointMarkAppearanceSettings {Shape = MarkerShape.Diamond};
                        var seriesAppearanceSettings = new SeriesAppearanceSettings
                                                           {
                                                               PointMark = pointMarkAppearanceSettings
                                                           };

                        var interactivitySettings = new InteractivitySettings
                                                        {
                                                            HoverScope = InteractivityScope.Series,
                                                            SelectionScope = InteractivityScope.Series
                                                        };
                        var splineSeriesDefinition = new SplineSeriesDefinition
                                                         {
                                                             Appearance = seriesAppearanceSettings,
                                                             InteractivitySettings = interactivitySettings
                                                         };
                        var seriesMapping = new SeriesMapping
                                                {
                                                    LegendLabel = viewModel.GetLegendHeader(i),
                                                    SeriesDefinition = splineSeriesDefinition,
                                                    ItemsSource = viewModel.GetData(i, selectedVariableY.VariableName)
                                                };

                        seriesMapping.ItemMappings.Add(new ItemMapping("X", DataPointMember.XValue));
                        seriesMapping.ItemMappings.Add(new ItemMapping("Y", DataPointMember.YValue));

                        radChart.SeriesMappings.Add(seriesMapping);
                    }
                    catch (Exception ex)
                    {
                        var message = string.Format("Error trying to produce serie {0}: {1}", i, ex.Message);
                        _loggingService.Log(message);
                    }
                }
            }


            var zoomScrollSettingsX = new ZoomScrollSettings
                                          {
                                              MinZoomRange = 0.1,
                                              RangeEnd = 1,
                                              RangeStart = 0,
                                              ScrollMode = ScrollMode.ScrollAndZoom
                                          };

            var zoomScrollSettingsY = new ZoomScrollSettings
                                          {
                                              MinZoomRange = 0.1,
                                              RangeEnd = 1,
                                              RangeStart = 0,
                                              ScrollMode = ScrollMode.ScrollAndZoom
                                          };
            radChart.DefaultView.ChartArea.ZoomScrollSettingsX = zoomScrollSettingsX;
            radChart.DefaultView.ChartArea.ZoomScrollSettingsY = zoomScrollSettingsY;

            //radChart.DefaultView.ChartTitle.Content = viewModel.ChartTitle;
            radChart.DefaultView.ChartArea.AxisX.Title = viewModel.AxisTitleX;
            radChart.DefaultView.ChartArea.AxisY.Title = viewModel.AxisTitleY;
            _loggingService.Log("Databinding done. " + string.Format("{0:d/M/yyyy HH:mm:ss:ffff}", DateTime.Now));
        }
Dilyan Traykov
Telerik team
 answered on 06 Jul 2017
1 answer
129 views

Hello Team,

 

When i mouse over/focus on RadAutoCompleteBox  control and try scrolling using mouse wheel, i would not be able it..how to overcome the issue

Dilyan Traykov
Telerik team
 answered on 06 Jul 2017
1 answer
270 views

Hi 

 

I want to have a deafult combobox at the end of listbox to add new listitem based on selection of item in combobox.

It is similar to new row feature in radgridview.

Is there any option like that or I can customize listbox template to have such feature?

 

Regards,

Nagasree.

 

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Jul 2017
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
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
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?