Telerik Forums
UI for WPF Forum
1 answer
100 views

So I seem to have a memory leak. I am using JustTrace and Memory Profiler.  What happens is in using the RadListBox on one of my views, I see InternalScope objects keep adding up everytime I open the view that has that RadListBox.  But I don't know what that class is used for or what would make that problem?  Any detailed help on how to find the root of this problem would be appreciated.  Been trying to figure it out for days and have commented out templates and styles.

 

 

Kalin
Telerik team
 answered on 26 Apr 2017
1 answer
235 views
Hello,
I'm using telerik control tools for WPF UI ver: 2015.1.0401.45
I have noticed that radlistbox has a huge memory leak. On replacing radlistbox with Microsoft listbox, memory leak does not occur.
I'm attaching the demo project (replace fileextension of file from  .jpg to .zip).
This project demonstrates the problem of memory leak. Actually the memory leak occurs on data binding
I've remarked the Microsoft listbox in xaml, so to prove my claim, just use Microsoft listbox instead  of radlistbox and see the difference in memory usage of the processes.
Do you have a patch to fix this issue ?
Thank you,
Alex
Kalin
Telerik team
 answered on 26 Apr 2017
1 answer
242 views

Hi!

I would like to suggest that page numbers and a page title be optionally added when exporting a GridView to Pdf. This should be easy to implement since RadSpreadProcessing already has a class "HeaderFooterSettings". Just expand the "GridViewPdfExportOptions" with two options: ShowPageNumbers (true/false) and PageTitle (string). Should be done in no time.

Regards
Heiko

Dilyan Traykov
Telerik team
 answered on 26 Apr 2017
1 answer
636 views

I had browsed for a similar issue & seen the below link which had the same issue of mine, its said by Telerik that issue is resolved but I could not get the fix anywhere.

http://www.telerik.com/forums/radwindow-autosize-on-runtime#e9i78SNv102TDO2DCh_z6g

I have created a RadWindow and its content is set to a wpf view which has some controls & a RadExpander. I want this RadExpander to be shown when its expanded(my RadWindow Width should be resized accordingly).
I have set ResizeMode="NoResize" and SizeToContent="True" for my RadWindow. But RadWindow doesn't seem to adjust according to its content, how can I achieve It?(I have not set any Height or Width to my RadWindow)

Is SizeToContent changed to Enum to support WidthAndHeight or what is the fix for the problem given??

Nasko
Telerik team
 answered on 26 Apr 2017
5 answers
642 views
Hello guys,

I have created a RadWindow as a User Control and It has ResizeMode="NoResize" and SizeToContent="True". Inside the content I have an Stackpanel that is collapsed and when I turn It visible on runtime, the content below is hidden because the RadWindow doesn't resize, how can I achieve It?
Nasko
Telerik team
 answered on 26 Apr 2017
8 answers
398 views
Hi,
I have a RadCombobox with following properties:

IsEditable="True"
OpenDropDownOnFocus="False"
TextSearchMode="Contains"
IsFilteringEnabled="True"
UpdateTextOnLostFocus="False"
CanAutocompleteSelectItems="False"
IsReadOnly="False"

And when user types, I open the dropdown with following code:
comboBox.IsDropDownOpen = true;

my problem is:
when a user wants to insert some words in exist text, whole text will be clear.
what I can do to solve this.

My project:
http://www.mediafire.com/file/2ru22za4ztsuas4/ComboBoxEditModeProj.rar

Thanks.
Ahmad
Top achievements
Rank 1
 answered on 26 Apr 2017
1 answer
113 views

Hi,

I'm talking about class "Slot" in Telerik.Windows.Controls.ScheduleView namespace.

Let's take a look to Slot(IOccurrence occurence) constructor, line 14 may cause NullReferenceException:

01.public Slot(IOccurrence occurence) : base(occurence)
02.        {
03.            IAppointment appointment = occurence as IAppointment;
04.            if (appointment != null)
05.            {
06.                if (appointment.RecurrenceRule != null)
07.                {
08.                    this.RecurrencePattern = appointment.RecurrenceRule.Pattern;
09.                }
10.            }
11.            else
12.            {
13.                Occurrence occurrence = occurence as Occurrence;
14.                appointment = occurrence.Appointment;
15.                if (occurrence != null)
16.                {
17.                    appointment = occurrence.Appointment;
18.                }
19.            }
20.            this.TimeZone = appointment.TimeZone;
21.            this.Resources.AddRange(appointment.Resources);
22.        }
Kalin
Telerik team
 answered on 25 Apr 2017
4 answers
730 views

Using the sample below, how would I get the "VendorName" property to display next to the values of each series in the trackball info popup, just like it would appear in the legend?

 

<telerik:RadCartesianChart x:Name="chart" Palette="Summer" Height="209">
 
           <telerik:RadCartesianChart.HorizontalAxis>
               <telerik:CategoricalAxis></telerik:CategoricalAxis>
           </telerik:RadCartesianChart.HorizontalAxis>
 
           <telerik:RadCartesianChart.VerticalAxis>
               <telerik:LinearAxis HorizontalAlignment="Right"></telerik:LinearAxis>
           </telerik:RadCartesianChart.VerticalAxis>
 
           <telerik:RadCartesianChart.Behaviors>
               <telerik:ChartTrackBallBehavior ShowTrackInfo="True"
                                          ShowIntersectionPoints="True" />
           </telerik:RadCartesianChart.Behaviors>
            
           <telerik:RadCartesianChart.SeriesProvider>
               <telerik:ChartSeriesProvider Source="{Binding ElementName=window1, Path=vendorSalesByYear}">
                   <telerik:ChartSeriesProvider.SeriesDescriptors>
 
                       <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Data" ValuePath="Sales" CategoryPath="MonthName">
                           <telerik:CategoricalSeriesDescriptor.Style>
                               <Style TargetType="telerik:LineSeries">
                                   <Setter Property="LegendSettings">
                                       <Setter.Value>
                                           <telerik:SeriesLegendSettings Title="{Binding VendorName}"/>
                                       </Setter.Value>
                                   </Setter>
                                    
                                   <Setter Property="TrackBallInfoTemplate">
                                       <Setter.Value>
                                           <DataTemplate>
 
                                               <StackPanel Background="White">
                                                   <StackPanel Orientation="Horizontal" Background="Transparent">
                                                       <TextBlock Text="{Binding  VendorName}" />
                                                       <TextBlock Text=": "/>
                                                       <TextBlock Text="{Binding Path=DataPoint.Value, StringFormat=N0}" />
                                                   </StackPanel>
 
                                               </StackPanel>
 
                                           </DataTemplate>
                                       </Setter.Value>
                                   </Setter>
                                    
                               </Style>
                           </telerik:CategoricalSeriesDescriptor.Style>
                       </telerik:CategoricalSeriesDescriptor>
 
                   </telerik:ChartSeriesProvider.SeriesDescriptors>
               </telerik:ChartSeriesProvider>
 
           </telerik:RadCartesianChart.SeriesProvider>
       </telerik:RadCartesianChart>
 
       <telerik:RadLegend Items="{Binding LegendItems, ElementName=chart}" Margin="5" >
           <telerik:RadLegend.ItemsPanel>
               <ItemsPanelTemplate>
                   <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" />
               </ItemsPanelTemplate>
           </telerik:RadLegend.ItemsPanel>
 
       </telerik:RadLegend>

 

public  partial class MainWindow : Window
    {
        public RadObservableCollection<VendorYearlyData> vendorSalesByYear { get; set; }
 
        public MainWindow()
        {
            vendorSalesByYear = GetSampleData();           
            InitializeComponent();       
        }
 
        private RadObservableCollection<VendorYearlyData> GetSampleData()
        {
            var result = new RadObservableCollection<VendorYearlyData>();
 
            result.Add(new VendorYearlyData()
            {
                VendorName = "Vendor A",
                Data = new RadObservableCollection<SalesInfo>()
            {
                new SalesInfo() { MonthName = "Jan", Sales = 5 },
                new SalesInfo() { MonthName = "Feb", Sales = 7 },
                new SalesInfo() { MonthName = "Mar", Sales = 6 },
                new SalesInfo() { MonthName = "Apr", Sales = 8 }
            }
            });
 
            result.Add(new VendorYearlyData()
            {
                VendorName = "Vendor B",
                Data = new RadObservableCollection<SalesInfo>()
            {
                new SalesInfo() { MonthName = "Jan", Sales = 15 },
                new SalesInfo() { MonthName = "Feb", Sales = 18 },
                new SalesInfo() { MonthName = "Mar", Sales = 19 },
                new SalesInfo() { MonthName = "Apr", Sales = 23 }
            }
            });
 
 
            result.Add(new VendorYearlyData()
            {
                VendorName = "Vendor C",
                Data = new RadObservableCollection<SalesInfo>()
            {
                new SalesInfo() { MonthName = "Jan", Sales = 21 },
                new SalesInfo() { MonthName = "Feb", Sales = 25 },
                new SalesInfo() { MonthName = "Mar", Sales = 26 },
                new SalesInfo() { MonthName = "Apr", Sales = 25 }
            }
            });
 
            return result;
        }
    }
 
 
    public class SalesInfo
    {
        public string MonthName { get; set; }
        public double Sales { get; set; }
    }
 
    public class VendorYearlyData
    {
        public string VendorName { get; set; }
        public RadObservableCollection<SalesInfo> Data { get; set; }
    }

 

Martin Ivanov
Telerik team
 answered on 25 Apr 2017
1 answer
183 views
I would like to change alignment of text in header items. Is it possible ?
Martin Ivanov
Telerik team
 answered on 25 Apr 2017
4 answers
646 views

I have a question about Telerik UI for WPF, i want to achieve a number of real-time monitoring curve, here is my code:

XAML:  in UserControl)

<telerik:RadCartesianChart.SeriesProvider>

                    <telerik:ChartSeriesProvider Source="{Binding CurrentProject.CurrentSubProject.LineSeriesCollection}">
                        <telerik:ChartSeriesProvider.SeriesDescriptors>
                            <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Points" ValuePath="Sales" CategoryPath="Time">
                                <telerik:CategoricalSeriesDescriptor.Style>
                                    <Style TargetType="telerik:LineSeries">
                                        <Setter Property="StrokeThickness" Value="2"/>
                                    </Style>
                                </telerik:CategoricalSeriesDescriptor.Style>
                            </telerik:CategoricalSeriesDescriptor>
                        </telerik:ChartSeriesProvider.SeriesDescriptors>
                    </telerik:ChartSeriesProvider>
                </telerik:RadCartesianChart.SeriesProvider>

 

Model:

        private ObservableCollection<Line> _lineSeriesCollection = new ObservableCollection<Line>() { };

        /// <summary>
        /// 界面中线条集合的Model
        /// </summary>
        public ObservableCollection<Line> LineSeriesCollection
        {
            get
            {
               
                if (_lineSeriesCollection.Count == 0)
                {
                    _lineSeriesCollection.Add(new Line(0, 15));
                    _lineSeriesCollection.Add(new Line(10, 25));
                    _lineSeriesCollection.Add(new Line(20, 35));
                    _lineSeriesCollection.Add(new Line(30, 50));
                }


                return _lineSeriesCollection;
            }
        }

 

///////Line Class:

    /// <summary>
    /// 界面的线条集合Model
    /// 20170417
    /// </summary>
    public class Line : INotifyPropertyChanged
    {
        #region INotifyPropertyChanged Members

        [field: NonSerialized]
        public event PropertyChangedEventHandler PropertyChanged;
        public virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyName));
        }



        #endregion
        /// <summary>
        /// 用于存储当前线条的数据信息(组件名称+组件次序+输出参数)
        /// </summary>
        public string[] SelectedComponentInfo=new string[3];
        /// <summary>
        /// 用于存储线条中点数据的单位
        /// </summary>
        public string Unit;
       
        private ObservableCollection<ShowRealTimePoint> _points = new ObservableCollection<ShowRealTimePoint>();
        /// <summary>
        ///线条集合
        /// </summary>
        public ObservableCollection<ShowRealTimePoint> Points
        {
            get
            {
                return _points;
            }

            set
            {
                if (_points != value)
                {
                    _points = value;
                    OnPropertyChanged("Points");
                }
            }
        }


        private int minRange;
        private int maxRange;
        private System.Timers.Timer timer;
        public Line(int minRange, int maxRange)
        {
            this._points = new ObservableCollection<ShowRealTimePoint>();

            this.minRange = minRange;
            this.maxRange = maxRange;

            this.timer = new System.Timers.Timer();
            this.timer.Interval = 1000;
            this.timer.Elapsed += this.Timer_Elapsed;
            this.timer.Start();
        }





      private static Random r = new Random();
        private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            System.Windows.Application.Current.Dispatcher.BeginInvoke((Action)(() =>
            {
                if (this.Points.Count > 50)
                {
                    this.Points.RemoveAt(0);
                }
                this.Points.Add(new ShowRealTimePoint { Time = DateTime.Now, ParamValue = r.Next(0,100), });
            }));
        }

    }

///////ShowRealTimePoint Class:properties:Time ,ParamValue 

Actually, I'm referring to your example,but I cannot achieve the goal(my English is not good)

I ask you to help me see what the problem is,

Thank you very much.!!

 

 

 

 

Martin Ivanov
Telerik team
 answered on 25 Apr 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
Expander
Slider
TileList
DataPager
PersistenceFramework
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?