Telerik Forums
UI for WPF Forum
1 answer
135 views

How can I expand a row that has hierarchical data by doublecliking on the row (row with "+" sign)

How do I remove the "+" sign (if possible to expand with doubleclick)?

How do I replace the "+" sign with my own icon?

/Ken
Ваня
Top achievements
Rank 1
 answered on 15 Jul 2010
13 answers
354 views

From what I can tell, the RadCarousel control is the desired control to use for using DataBinding. However, my particular need requires theuse of RadCarousel. Do you have any suggestions to do DataBinding with theRadCarouselPanel?

Thanks,

Ryan

Milan
Telerik team
 answered on 15 Jul 2010
1 answer
51 views
Hello,

I'd like to use the telerik treeview with checkbox ability.

but I want only the checkbox functionnality not the selection one.

The issue is to have a treeview and will be able to check an element with "enterkey" press,
no selection, and no expand/collapse. only check/uncheck.

And I also want to check/uncheck throw click on an item.

Thanks for your help

Aurore
Kiril Stanoev
Telerik team
 answered on 15 Jul 2010
3 answers
152 views
Hi I have a canvas with diffient images in and a list box full of people. When i drag a person from the list over the images, the person is automatically dropped into the first image i come too,even before i release the left mouse button. Is there anyway of getting around this?
Simon Allport
Top achievements
Rank 2
 answered on 15 Jul 2010
2 answers
131 views
Hello,
Is there a way to style the ScrollViewer without redefining the whole gridview's controlTemplate ?
If yes, how to force all rad controls to take this redefined style unstead of the telerik default style.

Thanks in advance,
Abdelkader
belkadi
Top achievements
Rank 1
 answered on 15 Jul 2010
12 answers
220 views
Hi,

I have encountered a performance issue when adding gridView inside RadTileItem.
CPU starts spinning and process starts to consume lots of memory, until it reaches 2GBs and eventually crashes.

Attached is a snippet from a demo application which presents a standalone gridview performance (which works fine), and the same gridview inside RadTileItem.

XAML:
        <telerik:RadTileView Grid.Row="1">  
            <telerik:RadTileViewItem Header="ABC">  
                  
                <telerik:RadFluidContentControl>                      
                    <telerik:RadFluidContentControl.Content> 
                        <TextBlock Text="Maximize this tile." /> 
                    </telerik:RadFluidContentControl.Content> 
                      
                    <telerik:RadFluidContentControl.SmallContent> 
                        <TextBlock Text="Maximize this tile." /> 
                    </telerik:RadFluidContentControl.SmallContent> 
                      
                    <telerik:RadFluidContentControl.LargeContent> 
 
 
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="Auto" /> 
            <RowDefinition /> 
        </Grid.RowDefinitions> 
 
        <Button Height="20" Content="Generate" Click="Button_Click" /> 
 
        <telerik:RadGridView Name="telerikGrid" Grid.Row="1" 
                             ItemsSource="{Binding Persons, Mode=OneWay}" 
                             IsReadOnly="True" 
                             AutoGenerateColumns="False">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=ID, Mode=OneWay}" Header="ID" IsGroupable="False" IsFilterable="False"  /> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Name, Mode=OneWay}" Header="Name" IsGroupable="False" IsFilterable="False"  /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
                    </telerik:RadFluidContentControl.LargeContent>                      
                </telerik:RadFluidContentControl> 
                  
            </telerik:RadTileViewItem> 
        </telerik:RadTileView> 

Code Behind:

    public partial class GridControl : UserControl  
    {  
        public GridControl()  
        {  
            InitializeComponent();  
            this.DataContext = new ViewModel();  
        }  
 
        private void Button_Click(object sender, RoutedEventArgs e)  
        {  
            var list = new List<Person>();  
            for (int i = 0; i < 10000; i++)  
            {  
                list.Add(new Person(i, "abc"));  
            }  
            (this.DataContext as ViewModel).Persons = list;  
        }  
    }  
 
    public class ViewModel : INotifyPropertyChanged  
    {  
        private List<Person> _persons = null;  
 
        public List<Person> Persons  
        {  
            get { return _persons; }  
            set { _persons = value; OnPropertyChanged("Persons"); }  
        }
        #region INotifyPropertyChanged Members  
 
        public event PropertyChangedEventHandler PropertyChanged;  
        private void OnPropertyChanged(string propertyName)  
        {  
            if (PropertyChanged != null)  
                PropertyChanged(thisnew PropertyChangedEventArgs(propertyName));  
        }
        #endregion  
    }  
 
    public class Person  
    {  
        private int _id;  
        private string _name;  
 
        public Person(int id, string name)  
        {  
            _id = id;  
            _name = name;  
        }  
 
        public int ID  
        {  
            get { return _id; }  
        }  
 
        public string Name  
        {  
            get { return _name; }  
        }  
 
    } 



Thank you very much,

Ruben.
Kiril Stanoev
Telerik team
 answered on 15 Jul 2010
3 answers
176 views

Original post: http://www.telerik.com/community/forums/wpf/chart/radchart-memory-usage-grows-after-regularly-using-radchart-rebind.aspx
Unable to read: I think chrome sent in some odd formatting

I have a solution that consists of a windows form application with an instance of a custom WPF control (within System.Windows.Forms.Integration.ElementHost).

The WPF control contains an instance of the WPF RadChart; its purpose is to host the RadChart and provide helper methods for interpreting a supplied configuration, defining data series, color paletts etc and initialize databinding to a custom data type.
The MVVM technique is used to give each pointmark a particular fill color based on the YValue (implementing INotifyPropertyChanged and so on).

<ControlTemplate TargetType="telerikCharting:PointMark">
...
Fill="{Binding Path=DataItem.PointMarkColor}"
...

The intent is for uses to run the application normally (interacting with various data-handing forms) and for the application to be deployed on a monitoring workstation, displaying data updates on a flatscreen.
The problem is that there appears to be a memory leak of some kind. I've hunted this down to the point where the new data is updated to the chart. 

Firstly, althrough databound, updates to the XValue and YValue of MyData is not made visible to the ViewModel or the Chart via INotifyPropertyChanged. Only a change to 'MyData.ValueStatus' property triggers PropertyChanged (which in turn updates the MyDataViewModel.PointMarkColor).
This was done by design; a specific data result amounts to about 1300 datapoints which are updated at the *same time* and we've found response is faster if we simply update the data soure and rebind the RadChart as opposed to having the chart update each of its 1300 databound points through INotifyPropertyChanged.

I know viewing memory usage within task manager isnt really accurate but the eventual result is clear enough:
The application starts at 110MB and very slowly climbs in resources; a 12-hour run came to 900MB and still climbing.
Running the application (binding the initial data upon load) and omiting any re-binding statement (the in-memory data source is still updated): the application hovers around 100MB to 110=112MB.

Strange thing: minimizing the window drops the usage to 30MB (not actually released, just paged memory i know) but opening the window again from a minimized state puts the Mem usage to about 50MB, and it slowly starts climbing again from there (minimizing and re-opening restarts this process).

I suspect there's not an actual data mem leak as such but there's some form of WPF presenation cache that's being added to when Rebinding to the RadChart; maybe a RePaint/Draw or something.
Is there a way to clear this or avoid it? At this stage, keeping the windows form open (with elementHost containing custom WPF control with RadChart) will eventually consume a monitoring workstation and slowly sip at a user's resources.

Below is a code example from the WPFControl of how i'm initializing and binding data to the chart:

public void DefineDataSeries(List<MySeriesConfiguration> series, bool zoomEnabled)
{
    if (zoomEnabled)
    {
        RadChartMain.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;
    }
    else
    {
        RadChartMain.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.None;
    }
  
        RadChartMain.PaletteBrushes.Clear();
        RadChartMain.SeriesMappings.Clear();
      
        for (int i = 0; i < series.Count; i++)
        {
            //Add color to pallet
            RadChartMain.PaletteBrushes.Add(new SolidColorBrush(series[i].Definition.TrendSeriesColor));
  
            //Note: HelperClass.GetSeriesMapping uses the i for the seriesMapping.CollectionIndex
            SeriesMapping seriesmapping = HelperClass.GetSeriesMapping(series[i], i);
  
            //Create mapping and add to radChart
            RadChartMain.SeriesMappings.Add(seriesmapping);                                
        }
        RadChartMain.PaletteBrushesRepeat = true;
                  
}
  
  
//This method gets called from the WinForms application after the data is updated.
public void Rebind(ObservableCollection<ObservableCollection<MyDataViewModel>> chartData)
{       
    RadChartMain.ItemsSource = this.ChartData;
    RadChartMain.Rebind();
}


Ves
Telerik team
 answered on 15 Jul 2010
11 answers
1.4K+ views
Hi,

I need to be able to select items on right click so that the context menu functions can look at SelectedItem and get the right result. I looked at using the ContextMenuOpening event but this doesnt show which item the mouse was over when triggering the event.

Any suggestions will be greatly appreciated thanks.

p.s. When is dragging items between multiple treeviews likely to be available?

Thanks,
Martin
Kiril Stanoev
Telerik team
 answered on 15 Jul 2010
3 answers
105 views
I noticed that certain events like ToolTipOpening and PreviewMouseDown are not being fired from objects (like MapPolygon and Ellipse) in the information layer. Is there a specific reason for this? Is it possible to handle these events in some way?
Andrey
Telerik team
 answered on 14 Jul 2010
4 answers
131 views
I have a simple collection with: name, title, category, position. I want all with category=1 Aggregated, but in the order then come in the collection always sorted on "position". And I want no Aggregation on Category=0.  I also ned in the custom header for "Category=1", how many items there are in that segment

Or should I do this by Hierarchy?  This is a n Example wo the grid should look like. 

"Name", "Title", "Cat", "Pos"  (>--  is the aggregated rows)

Name 1, Title 1, 0, 0
Name 2, Title 2, 0, 1
Name 3, Title 3, 0, 2
>-- Name 4, Title 4, 1, 3
>-- Name 5, Title 5, 1, 4
>-- Name 6, Title 6, 1, 5
Name 7, Title 7, 0, 6
Name 8, Title 8, 0, 7
Name 9, Title 9, 0, 8
>-- Name 10, Title 10, 1, 9
>-- Name 11, Title 11, 1, 10
Name 12, Title 12, 0, 11


/Ken
Kennet
Top achievements
Rank 2
 answered on 14 Jul 2010
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
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
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?