Telerik Forums
UI for WPF Forum
1 answer
124 views
Hi all,

In my application i am using the themes concept to load at runtime am able to do that,when changing from one theme to the other its taking much time i want to show some progress bar or busy indicator till the theme is loaded how can i achieve this scenario?

Thanks in Advance
Ruth
Vladi
Telerik team
 answered on 25 Nov 2013
6 answers
311 views
Hi,
By defaut CartesianPlotBandAnnotation draw the annotation from -> to plot value

I have a RadCartesianChart using a BarSeries and CategoricalAxis as HorizontalAxis. The categories represent hours (in 24 hours format) : 0 1 2 3 ... 23

If settings CartesianPlotBandAnnotation with parameters From : 6 and To : 23 the annotation starts at the middle of the 6 hour bar et 23 hour bar.

I'm searching a solution to force CartesianPlotBandAnnotation to fill 6 and 23 hours bar drawing zone.

Thanks a lot ! :)
Petar Marchev
Telerik team
 answered on 25 Nov 2013
3 answers
310 views
Hi, 

I wonder does AutocompleteBox support displaying Subscript and superscript if the autocomplete dropdown contains these values?

How to achieve that? thank you.

Vladi
Telerik team
 answered on 25 Nov 2013
0 answers
105 views
I am trying to use the grid with about 10 columns and 1000 rows.  I am bound to an Observable collection for this, though in production I'd like to move to an IQueryable binding with paging via the datapager.  Autogenerated columns are a requirement as well as the user being able to resize/move columns.  In production, we will have anywhere from 5 to 120 columns with 1000 rows and hopefully paging.  All rows are read only and the user cannot add/remove rows or edit any cells.  When clicking the scroll handle and dragging with the mouse, the scroll behavior is very very jumpy instead of being smooth.  If you scroll VERY slowly, then it's mostly smooth, but still not quite where it should be.  Even horizontal scrolling with 2 or 3 columns off the side is clunkier than it should be.  All of the demos I've seen have very smooth scrolling and that behavior is very desirable.  I have read the degraded performance articles and have put sizes on the grid row containing the radgridview so that it does not size to "infinity".  Please point me in the right direction to get smooth performance.  Below is my View, ViewModel and Model being represented.

Thank you in advance,
Mark

MainWindow.xaml
<Window
        xmlns:my="clr-namespace:TelerikGridPrototype"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="TelerikGridPrototype.MainWindow"
        Title="MainWindow" Height="720" Width="1280" WindowStartupLocation="CenterScreen"
        DataContext="{Binding MainPageViewModel, Source={StaticResource Locator}}">
    <telerik:RadBusyIndicator IsBusy="{Binding Busy}">
 
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="660"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <telerik:RadGridView Name="gridView" ShowGroupPanel="False" IsReadOnly="True" CanUserInsertRows="False" CanUserDeleteRows="False" AreRowDetailsFrozen="True"  Grid.Row="0" ItemsSource="{Binding Records}"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
        <Button HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1" Content="Load" Name="btnLoad" Width="100">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click">
                    <ei:CallMethodAction
                    TargetObject="{Binding}"
                    MethodName="LoadDataAsync"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </Button>
    </Grid>
    </telerik:RadBusyIndicator>
</Window>

MainPageViewModel.cs
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using PhoenixDAL.Models;
using SimpleMvvmToolkit;
using TelerikGridPrototype.Models;
 
namespace TelerikGridPrototype
{
    public class MainPageViewModel : ViewModelBase<MainPageViewModel>
    {
        public MainPageViewModel()
        {
            Records = new ObservableCollection<record>();
        }
 
        public ObservableCollection<record> Records { get; set; }
 
        private bool busy;
        public bool Busy
        {
            get { return busy; }
            set
            {
                busy = value;
                NotifyPropertyChanged(m => m.Busy);
            }
        }
 
        public event EventHandler<NotificationEventArgs<Exception>> ErrorNotice;
 
        public async void LoadDataAsync()
        {
            Busy = true;
            var q = await Task<List<record>>.Factory.StartNew
                (
                 
                    () => DAL.Instance.Phoenix.records.Take(1000).OrderByDescending(a => a.StartTime).ToList()
                );
 
            foreach (var v in q)
            {
                Records.Add(v);
            }
            Busy = false;
        }
 
        // Helper method to notify View of an error
        private void NotifyError(string message, Exception error)
        {
            Notify(ErrorNotice, new NotificationEventArgs<Exception>(message, error));
        }
    }
}

record.cs
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
 
namespace PhoenixDAL.Models
{
    public partial class record
    {
        [DisplayAttribute(AutoGenerateField = false)]
        public long RecordID { get; set; }
        [DisplayAttribute(Name = "Channel Name")]
        public string ChannelName { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public long StartTime { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public long StartEMCRef { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public int StartPageIndex { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public int StartBlockOffset { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public long EndTime { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public long EndEMCRef { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public int EndPageIndex { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public int EndBlockOffset { get; set; }
        [DisplayAttribute(Name = "Duration")]
        public long Duration { get; set; }
        [DisplayAttribute(Name = "Source ID")]
        public int SourceID { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public int SequenceIndex { get; set; }
        [DisplayAttribute(AutoGenerateField = false)]
        public Nullable<int> IntegrationID { get; set; }
        [DisplayAttribute(Name = "Transmission ID")]
        public string Transmission_ID { get; set; }
        [DisplayAttribute(Name = "Storage Alias")]
        public string StorageAlias { get; set; }
        [DisplayAttribute(Name = "Media Tag")]
        public Nullable<int> Media_Tag { get; set; }
        [DisplayAttribute(Name = "Media Description")]
        public string Media_Description { get; set; }
        [DisplayAttribute(Name = "Trigger Event")]
        public string Trigger_Event { get; set; }
        [DisplayAttribute(Name = "Termination Event")]
        public string Termination_Event { get; set; }
        [DisplayAttribute(Name = "Start Time")]
        public Nullable<System.DateTime> Start_Time { get; set; }
        [DisplayAttribute(Name = "End Time")]
        public Nullable<System.DateTime> End_Time { get; set; }
        [DisplayAttribute(Name = "Total Seconds")]
        public Nullable<double> Total_Seconds { get; set; }
    }
}

There is no code-behind in the xaml.cs file.
Mark
Top achievements
Rank 1
 asked on 22 Nov 2013
14 answers
324 views
Hi all,


We have a WPF application that gets deployed using click once.
This applications uses the Telerik WPF control suite. Everything runs just fine.

..except when, after installing our application, a client installs the Telerik WPF demos on his machine.
Then, for whatever reason, our application seems to load the Telerik binaries from the Telerik WPF demos,
NOT from the deployed application (license warning appears, theming is gone, ..).

Any idea why this happens?
The Telerik WPF demos do not install assemblies into the GAC, right?
(note that after uninstalling the Telerik WPF demos & re-installing our application, everything works just fine again)

Thanks for your time,
Koen
Dimitrina
Telerik team
 answered on 22 Nov 2013
2 answers
300 views
I work in an application that the user has the option to change the language of the application at any time. I need to be able to change the text of the filter menu(ex. "show rows with value that") to spanish or whatever other language we have available. We already have the power to make these translations I am just not sure how to grab the property of this text in order to change it. I know that the localization manager is how you would initially tell me how to fix this problem, however that approach is not optimal for our particular application. Is there any other way to grab that text properties and change its value other than using the localization manager? Any sort of work around? Any help would be appreciated.
Tyler
Top achievements
Rank 1
 answered on 22 Nov 2013
7 answers
279 views
Hi,

I want highlight one row on PivotGrid on mouse over.
In addtion, when user double click on that row, I want to execute some code.

Can anyone help me?
Rosen Vladimirov
Telerik team
 answered on 22 Nov 2013
2 answers
137 views
Suppose I have a the following class

public class DataRow
{
    public int X { get; set; }
    public int Y { get; set; }
 
    public bool Exclude;
}

I want to plot this on a RadChart using a seriesmapping, which I do like this.

ObservableCollection<DataRow> SeriesSource = new ObservableCollection<DataRow>();
SeriesMapping series = new SeriesMapping();
series.ItemsSource = source;
series.ItemMappings.Add(new ItemMapping("X", DataPointMember.XValue));
series.ItemMappings.Add(new ItemMapping("Y", DataPointMember.YValue));

Is there any way that I can include/exclude data points being plotted based on the value of 'Exclude'? I wish to be able to include/exclude certain points from the plotted line.

The only other solution I can think of is to scan through the collection and create a second collection just containing members which aren't excluded. This doesn't seem very efficient though.
Petar Marchev
Telerik team
 answered on 22 Nov 2013
4 answers
203 views
Hi,

I populated a treeview control dynamically with child nodes. In Win 7 this treeview has arrow marks for expand and collapse. I want to change it to traditional + and - symbols since our users are more comfortable with that. I have tried different themes but it didn't change this behavior.Please help.
Petar Mladenov
Telerik team
 answered on 22 Nov 2013
6 answers
675 views
I was working with the previous version of this control but for some reason it would not render some of our pdf files.  I upgraded to the latest version but now I am running into a new issue.  I can't seem to clear the document from the viewer.  I have attached some sample code that will reproduce the NullReferenceException errors I am getting.

WPF Code:
<Window x:Class="TelerikPDFViewerTest.MainWindow"
        Title="MainWindow" Height="550" Width="525">
    <Window.CommandBindings>
        <CommandBinding Command="Open" CanExecute="Open_CanExecute" Executed="Open_Executed" />
        <CommandBinding Command="Close" CanExecute="Close_CanExecute" Executed="Close_Executed" />
    </Window.CommandBindings>
    <Grid>
 
        <telerik:RadPdfViewer Name="pdfViewer" Margin="3,30,3,3" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
        <telerik:RadButton Name="btnOpen" Content="Open" Margin="3,3,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="72" Command="Open" />
        <telerik:RadButton Name="btnClose" Content="Close" Margin="0,3,0,3" VerticalAlignment="Top" HorizontalAlignment="Right" Width="72" Command="Close" />
    </Grid>
</Window>

C# Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
 
namespace TelerikPDFViewerTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private System.IO.FileStream fs = null;
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void Open_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute =(System.IO.File.Exists("benchbook.pdf"));
            e.Handled = true;
        }
 
        private void Open_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            fs = new System.IO.FileStream("benchbook.pdf", System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Delete);
            pdfViewer.DocumentSource = new Telerik.Windows.Documents.Fixed.PdfDocumentSource(fs);
        }
 
        private void Close_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = (this.pdfViewer.Document != null);
            e.Handled = true;
        }
 
        private void Close_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            this.fs.Close();
            //Get NullReferenceException in both cases
            //First try to set document source = null
            this.pdfViewer.DocumentSource = null;
             
            //Or try just releasing the document
            //this.pdfViewer.Document = null;
        }
    }
}

I could not attach the pdf I was using but any pdf will reproduce the problem.  Please let me know if there is some workaround for this.

Ideally it would be great if the PdfViewer had a Clear() function that would release all resources referenced and displayed.

Thanks,
Lee Keel
Stephen
Top achievements
Rank 1
Iron
 answered on 21 Nov 2013
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?