Telerik Forums
UI for WPF Forum
0 answers
86 views
Hi,

is there any example for a dynamic mvvm Model based on a sql-database?

thanks
regards
ww
ITA
Top achievements
Rank 1
 asked on 17 Feb 2012
3 answers
202 views
Hi,

How I can improve the radChart performance when I do a (Window) resizing or zooming ?

I need to show several lineseries with several thousand of points. I'm okay of loading the data to series (it takes around 2-3sec) but after that if I wan't to do windows resizing or zooming, it's lock the UI and takes more than 10sec (if I have 5 series or more loaded to screen) to refresh the screen !!??

I really need to show the actual data so I cannot use the SamplingThreshold - feature

Can I disable redraw or something during the zooming/resizing?

Here's the full code of my demo project.
public partial class MainWindow : Window
{
    private DataTable dt = null;
    public MainWindow()
    {
        InitializeComponent();
        radChart1.DefaultView.ChartArea.EnableAnimations = false;
        radChart1.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Collapsed;
        //radChart1.SamplingSettings.SamplingFunction = ChartSamplingFunction.Average;
        radChart1.SamplingSettings.SamplingThreshold = 0;
        radChart1.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "HH:mm:ss";
        radChart1.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;
        radChart1.DefaultView.ChartArea.AxisX.AutoRange = false;
        radChart1.DefaultView.ChartArea.AxisX.IsDateTime = true;
        radChart1.DefaultView.ChartArea.AxisX.MinValue = DateTime.Now.ToOADate();
        radChart1.DefaultView.ChartArea.AxisX.MaxValue = DateTime.Now.AddMinutes(5000).ToOADate();
    }
    private void button2_Click(object sender, RoutedEventArgs e)
    {
        dt = CreateDataTable("SERIES_" + radChart1.SeriesMappings.Count.ToString());
        MessageBox.Show("Data generated for series: " + "SERIES_" + radChart1.SeriesMappings.Count.ToString());
        AddNewSeries("SERIES_" + radChart1.SeriesMappings.Count.ToString());
    }
    private void AddNewSeries(String tag)
    {
        AxisY axisY = new AxisY();
        axisY.AxisName = tag;
        axisY.Title = tag;
        axisY.DefaultLabelFormat = "#VAL{#,##0.00}";
        axisY.AutoRange = false;
        axisY.MinValue = 0;
        axisY.MaxValue = 200;
        axisY.Step = 10;
        Style customAxisYStyle = this.Resources["CustomAxis"] as Style;
        axisY.AxisStyles.AxisLineStyle = customAxisYStyle;
        axisY.AxisStyles.TickLineStyle = this.Resources["AxisYTickStyle"] as Style;
        axisY.AxisStyles.MinorTickLineStyle = this.Resources["AxisYMinorTickStyle"] as Style;
        axisY.AxisStyles.ItemLabelStyle = this.Resources["ItemLabelStyle"] as Style;
        axisY.AxisStyles.TitleStyle = this.Resources["AxisTitleStyle"] as Style;
        if (radChart1.DefaultView.ChartArea.AxisY.AxisName == "")
        {
            radChart1.DefaultView.ChartArea.AxisY = axisY;
        }
        else
        {
            radChart1.DefaultView.ChartArea.AdditionalYAxes.Add(axisY);
            axisY.Visibility = System.Windows.Visibility.Collapsed;
        }
        LineSeriesDefinition seriesDef = new LineSeriesDefinition();
        seriesDef.ShowItemLabels = false;
        seriesDef.ShowPointMarks = false;
        seriesDef.ShowItemToolTips = false;
        seriesDef.SeriesName = tag;
        SeriesMapping m1 = new SeriesMapping();
        m1.ItemMappings.Add(new ItemMapping() { DataPointMember = DataPointMember.YValue, FieldName = tag, FieldType = typeof(double) });
        m1.ItemMappings.Add(new ItemMapping() { DataPointMember = DataPointMember.XValue, FieldName = tag + "_TS", FieldType = typeof(DateTime) });
        m1.SeriesDefinition = seriesDef;
        m1.LegendLabel = tag;
        m1.SeriesDefinition.AxisName = axisY.AxisName;
        m1.ItemsSource = dt;
        radChart1.SeriesMappings.Add(m1);
    }
    DataTable CreateDataTable(String tagName)
    {
        DataTable dt = new DataTable();
        dt.Columns.Add(new DataColumn(tagName, typeof(Double)));
        dt.Columns.Add(new DataColumn(tagName + "_TS", typeof(DateTime)));
        Random r = new Random(Environment.TickCount);
        for (int i = 0; i < 5000; i++)
        {
            DataRow dr = dt.NewRow();
            if (radChart1.DefaultView.ChartArea.HasItems)
                dr[tagName] = r.Next(1, 100);
            else
                dr[tagName] = r.Next(1, 100);
            dr[tagName + "_TS"] = DateTime.Now.AddMinutes(i);
            dt.Rows.Add(dr);
        }
        return dt;
    }
}


Giuseppe
Telerik team
 answered on 17 Feb 2012
2 answers
74 views
Hi!

To show / hide a pane, I set the IsHidden property to either true or false, this has always worked.

But with the latest release, I get some strange behaviour. If the pane is starting out as hidden (IsHidden = true) when I start the application and the user later changes this through a command (IsHidden = false), the pane is expanded, but without any content (ie the grid inside is not shown).

Am I doing something wrong?
Lennart Bauer
Top achievements
Rank 1
 answered on 17 Feb 2012
2 answers
114 views
Hi,

new empty row is shown after I click on "Click here to add new item" on my RadGridView. When I press Escape twice, exception is thrown:

RowNotInTableException was unhandled by user code:
This row has been removed from a table and does not have any data.  BeginEdit() will allow creation of new data in this row.


My RadGridView is filling by DataContext from DataSet and contains my definitions for EventHandlers: BeginningEdit, CellValidating, RowValidating, RowEditEnded and Deleting.


How can I exit and close this new row without saving and validating all cells?


Thanks,
Maros
Vývoj GAMO
Top achievements
Rank 2
 answered on 17 Feb 2012
2 answers
313 views
Is it possible to set the Filter to COntains standard instead of IsEqualTo.

I tried the following 
<telerikData:FilterDescriptor Member="Country"
                             
Operator="Contains" />

But when I then open the filter menu it is back in IsEqualTo
smith
Top achievements
Rank 1
 answered on 17 Feb 2012
6 answers
419 views
Hello all,

Can someone point me out to the correct direction of putting a custom label on to a Marker ? For example, I have three locations on the map and I want to associate each of these locations (marker) with some custom information.

Thanks
Andrey
Telerik team
 answered on 17 Feb 2012
1 answer
84 views
I'm looking at the GridView RowReorder demo, and I noticed something.

When I drag a row, I see a two-line tooltip-like box.  The first line provides info about the item being dragged and the second line info about the item it would be inserted before or after, if it was dropped at that moment.

I've figured out how to configure what is displayed in the second line of the tooltip, using the DragCueActionContentTemplate and DragCueTooltipContentTemplate properties of the RowReorderBehavior class.

But I've not been able to figure out how to configure what is displayed in the first line of the tooltip, the info about the item being dragged. It seems to be the result of Item.ToString(), which is usually not appropriate.

Is there a way of providing a template for the dragged item?
Dimitrina
Telerik team
 answered on 17 Feb 2012
1 answer
322 views
Before I do a bunch of work, I thought I'd verify a statement I've heard in other (older) posts.

I need to be able to open and print Xps files from a WPF application.  Does the RTB fully support this?  Also, these are the only functions we want available.  So, is there a way to hide the RTB tool bar except these functions?
Iva Toteva
Telerik team
 answered on 17 Feb 2012
3 answers
93 views
Hi All,

I am trying to apply linear scale to the left and right side of the Linear Bar.. In my linear gauge I want scale to appear like this:

Scale LinearBar Scale  But when I am taking two scales it is not showing any error as well as no output.. :(

Can anyone help?? Its urgent.. Please guys try this one..

Regards,
Swati
Swati
Top achievements
Rank 1
 answered on 17 Feb 2012
0 answers
154 views
Does anyone know if there is a WPF control or a way to template an existing control to have similar behavior to a LongListSelector? 
AdaDog
Top achievements
Rank 1
 asked on 16 Feb 2012
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
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
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?