Telerik Forums
UI for WPF Forum
4 answers
362 views

Hi, 

I am trying to customize the RadAutoCompleteBox visual to fit our application. I went thru the process of doing "Edit a Copy" of the Style. Without making any modification to the copied style, I've encountered an Error which causes the popup no longer shows up correctly.

System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=WatermarkTextBox'. BindingExpression:Path=ActualWidth; DataItem=null; target element is 'AutoCompleteBoxesWrapPanel' (Name=''); target property is 'Width' (type 'Double')

Elon
Top achievements
Rank 1
 answered on 27 Apr 2016
2 answers
166 views

Hi,

In my GridView, i used a filter. In this filter, there is a lot of values, but not all of them :

We can see on screen '1' that the maximum value is '1.334', but on my graphic, the top of my curve is superior to 5.

BUT

When i choosed "superior to 5" in this same filter (screen '2'), I can see my values on my grid.

 

I want to know how I can see all of values in the values list ?

 

Thank you very much.

 

Valentin.

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 27 Apr 2016
5 answers
742 views

 <telerik:GridViewDataColumn Header="Valore" DataMemberBinding="{Binding Value,Converter={StaticResource DynamicsParameterConverter}}" />

Actually I have this column, my entity has other property called "Type", this one show me how to use a converter class.

I would change this column in this vesion

<telerik:GridViewDataColumn Header="Valore" DataMemberBinding="{Binding Value,Converter={StaticResource DynamicsParameterConverter}, ConverterParameter={Binding Type}}" Width="*" />

 

But I can't do this because ConverterParameter is not compatible with DependencyProperty, is there a workaround or feature of column for this?

Martin
Telerik team
 answered on 27 Apr 2016
2 answers
144 views

Hi,

We have a existing WPF-MVVM project in which if I add any telerik controls, it is reflecting in the screen when I run the application.

But with the same telerik dlls, if I am trying to create a new sample project on one of the controls(ex:RadWindow) I am not able see any controls when I run the application. It just appears blank.

I am not sure what I am missing. Is it mandatory to add Theme resources to the project? or is it something else? Please help me on the same.

 

Thanks,

Santhosh

santhosh
Top achievements
Rank 1
 answered on 27 Apr 2016
3 answers
171 views
Hi,

I'm adding Docking to my app with the following structure (all unnecessary properties removed):

    <telerik:RadDocking >
        <telerik:RadDocking.DocumentHost>
            <Grid/>
        </telerik:RadDocking.DocumentHost>
           
        <telerik:RadSplitContainer Orientation="Horizontal" InitialPosition="DockedBottom">
            <telerik:RadPaneGroup>
                <telerik:RadPane>  
                    <Grid/>
                </telerik:RadPane>
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking>

When I'm creating styles for RadPane and RadPaneGroup, I'm constantly getting exceptions in Design view of Expression Blend and Visual studio that looks like:
"InvalidOperationException: Can only base on a Style with target type that is base type 'RadPaneGroup'." 

As a result, I can't see my control in Design View and can't edit control's property in Properties pane visually. The style is looking like this:

            <Style TargetType="telerik:RadPaneGroup" BasedOn="{StaticResource RadPaneGroupStyle}">
...
            </Style>

What's wrong?
Thank you!
tom
Top achievements
Rank 1
 answered on 27 Apr 2016
7 answers
534 views

Hi,

How to change the background color of readonly rows of RadGridView?

Dilyan Traykov
Telerik team
 answered on 27 Apr 2016
1 answer
133 views

Hello Telerik,

 

I am having an issue when trying to change my document's page when clicking on a ListView item. The page won't change at all.

Here's the code of the sample project I have created specially for this issue:

I also tried the approach in this ticket

http://www.telerik.com/forums/gotopage-issue

but it still won't work in my scenario.

<Window x:Class="TelerikPdf.MainWindow"
        xmlns:local="clr-namespace:TelerikPdf"
        mc:Ignorable="d"
        Title="MainWindow" d:DesignHeight="675" d:DesignWidth="950"
        xmlns:fixed="clr-namespace:Telerik.Windows.Documents.Fixed;assembly=Telerik.Windows.Controls.FixedDocumentViewers"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" >
    <Grid>
        <Grid.Resources>
            <fixed:PdfDocumentSourceValueConverter x:Key="PdfDocumentSourceValueConverter" />
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="13*"/>
        </Grid.RowDefinitions>
 
        <TextBlock Name="LabelDomain" Text="Tutorial " HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontSize="18"
                   Grid.Row="0" Grid.Column="0"/>
 
        <Grid Grid.Row="1" Grid.Column="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="7*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition />
            </Grid.RowDefinitions>
 
            <ListView Grid.Row="0" Grid.Column="0" Name="TutorialItems" SelectionChanged="TutorialItems_SelectionChanged">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <WrapPanel>
                            <TextBlock Text="{Binding}" FontWeight="Bold" />
                        </WrapPanel>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
 
            <Border  Grid.Row="0" Grid.Column="1" BorderBrush="White" BorderThickness="0" Margin="5,0,5,0">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition Height="0.2*"/>
                    </Grid.RowDefinitions>
                    <Border BorderBrush="LightGray" BorderThickness="1" Visibility="Visible" Margin="10,0,10,0">
                        <ScrollViewer Grid.Row="0">
                            <telerik:RadPdfViewer Name="RadPdfViewer" Grid.Row="1" ScaleMode="Normal" />
                        </ScrollViewer>
                    </Border>
                </Grid>
            </Border>
        </Grid>
    </Grid>
</Window>

code behind:

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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;
using Telerik.Windows.Documents.Fixed.FormatProviders;
using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf;
using Telerik.Windows.Documents.Fixed.Model;
 
namespace TelerikPdf
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            List<string> items = new List<string>();
            items.Add("Introduction");
            items.Add("How to use");
            items.Add("Understanding the customer CSV file");
            items.Add("Understanding the Domain CSV file");
            TutorialItems.ItemsSource = items;
 
            MemoryStream stream = new MemoryStream();
            using (Stream input = File.OpenRead("qwe.pdf"))
            {
                input.CopyTo(stream);
            }
 
            FormatProviderSettings settings = new FormatProviderSettings(ReadingMode.OnDemand);
            PdfFormatProvider provider = new PdfFormatProvider(stream, settings);
            RadFixedDocument doc = provider.Import();
            RadPdfViewer.Document = doc;
        }
 
        private void TutorialItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
 
            switch (TutorialItems.SelectedItem.ToString())
            {
                case "Introduction":
                    RadPdfViewer.GoToPage(1);
                    break;
                case "How to use":
                    RadPdfViewer.GoToPage(2);
                    break;
                case "Understanding the customer CSV file":
                    RadPdfViewer.GoToPage(3);
                    break;
 
            }
 
        }
    }
}

 

Best regards!

Tanya
Telerik team
 answered on 27 Apr 2016
6 answers
203 views

Hi,

I would export by datagrid and I populated it by VirtualQueryableCollectionView collection.

Example:

I have a lot of row (ex. 1000)

I used a pagesize 10

I try to export and I see the lines already loaded only.

How can I load (in this case) all rows?

Note: User can filter any columns.

Dario Concilio
Top achievements
Rank 2
 answered on 27 Apr 2016
2 answers
84 views

Hi Team,

I would like to know how to manage the list of items per page by page like the Mobile phone screen movements?

 

Shameel
Top achievements
Rank 1
 answered on 27 Apr 2016
1 answer
157 views

Do not display the changes within the time period in candlestick chart!
How to solve this problem?
"Line" series works well. Displays parameter changes "ClosePrice"
The data source is the same for both series of data (CandleStick and Line)!

Link to source:  https://www.dropbox.com/s/ue1n4h2rsxo2mi6/CandleStickSeriesNotWork.VS2015.zip?dl=0

 

<Window x:Class="CandleStickSeriesNotWork.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="70"/>
        </Grid.RowDefinitions>
         
            <telerik:RadCartesianChart x:Name="radCartesianChart" Grid.Column="0" >
 
                <telerik:RadCartesianChart.Grid>
                    <telerik:CartesianChartGrid MajorLinesVisibility="Y"/>
                </telerik:RadCartesianChart.Grid>
 
                <telerik:RadCartesianChart.Behaviors>
                    <telerik:ChartCrosshairBehavior/>
                    <telerik:ChartPanAndZoomBehavior DragToZoomThreshold="0" MouseWheelMode="Zoom" DragMode="Pan" ZoomMode="Both" PanMode="Both"/>
                </telerik:RadCartesianChart.Behaviors>
 
                <telerik:RadCartesianChart.HorizontalAxis>
                    <telerik:DateTimeContinuousAxis x:Name="AxisX" IsStepRecalculationOnZoomEnabled="True" LabelOffset="0" LastLabelVisibility="Visible" LineThickness="1" MaximumTicks="31" MajorTickOffset="0" MajorTickLength="5" PlotMode="BetweenTicks" SmartLabelsMode="None" TickThickness="1" ZIndex="0"/>
                </telerik:RadCartesianChart.HorizontalAxis>
 
                <telerik:RadCartesianChart.VerticalAxis>
                    <telerik:LinearAxis x:Name="AxisY" MajorStep="1" LineThickness="1" SmartLabelsMode="SmartStepAndRange" />
                </telerik:RadCartesianChart.VerticalAxis>
 
 
 
                <telerik:CandlestickSeries x:Name="CandleSeries"
                                       CategoryBinding="OpenTime" 
                                       CloseBinding="ClosePrice"
                                       HighBinding="HighPrice"
                                       LowBinding="LowPrice"
                                       OpenBinding="OpenPrice" 
                                       ItemsSource="{Binding CandlesSeries}"  />
 
                 
                <telerik:LineSeries ItemsSource="{Binding CandlesSeries}" CategoryBinding="OpenTime" ValueBinding="ClosePrice" />
            </telerik:RadCartesianChart>
         
        <TextBlock Grid.Row="1">
            <Span FontWeight="Bold" Foreground="Red">
                Do not display the changes within the time period in candlestick chart! <LineBreak/>
                How to solve this problem? <LineBreak/>
                "Line" series works well. Displays parameter changes "ClosePrice" <LineBreak/>
                The data source is the same for both series of data (CandleStick and Line)!
            </Span>
 
        </TextBlock>
    </Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
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;
using System.Windows.Threading;
using CandleStickSeriesNotWork.Data;
using Telerik.Windows.Controls.ChartView;
using Telerik.Windows.Data;
 
namespace CandleStickSeriesNotWork
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
 
     
    public partial class MainWindow : Window
    {
        private DispatcherTimer timer;
        private Random r;
        private ViewModel dc;
        public MainWindow()
        {
            InitializeComponent();
            dc = new ViewModel();
            this.DataContext = dc;
 
            timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromMilliseconds(100);
            timer.Tick += (sender, args) =>
            {
 
                DateTime date = DateTime.Now.AddSeconds(-DateTime.Now.Second);
                Random k = new Random();
 
                decimal price = dc.CandlesSeries.Last().ClosePrice;
                price = k.Next() % 2 == 0 ? price += 5 : price -= 5;
 
                if (dc.CandlesSeries.Last().OpenTime.AddMinutes(1) < date)
                {
                    dc.CandlesSeries.Add(new Candle(date, price, price, price, price));
                }
                else
                {
                    var candle = dc.CandlesSeries.Last();
                    candle.ClosePrice = price;
                    if (price > candle.HighPrice) candle.HighPrice = price;
                    if (price < candle.LowPrice) candle.LowPrice = price;
                }
            };
 
            DateTime date1 = DateTime.Now.AddSeconds(-DateTime.Now.Second).AddMinutes(-1);
             
            r = new Random();
            decimal price1 = r.Next(200);
            dc.CandlesSeries.Add(new Candle(date1, price1, price1+100, price1-100, price1+50));
 
            timer.Start();
 
        }
 
 
    }
}

 

using System.Collections.ObjectModel;
using CandleStickSeriesNotWork.Data;
using Telerik.Windows.Data;
 
namespace CandleStickSeriesNotWork
{
    public class ViewModel
    {
        public ObservableCollection<Candle> CandlesSeries { get; set; }
 
        public ViewModel ()
        {
           CandlesSeries = new ObservableCollection<Candle>();
        }
    }
}

using System;
using System.ComponentModel;
 
namespace CandleStickSeriesNotWork.Data
{
    public class Candle  : INotifyPropertyChanged
    {
        DateTime _openTime;
        decimal _highPrice;
        decimal _lowPrice;
        decimal _openPrice;
        decimal _closePrice;
        private int? _numberCandle;
 
 
        public Candle(DateTime opentime,  decimal open, decimal high, decimal low, decimal close)
        {
            _openTime = opentime;
            _openPrice =  open;
            _highPrice =  high;
            _lowPrice =  low;
            _closePrice =  close;
        }
 
        public Candle() { }
 
 
        public DateTime OpenTime
        {
            get { return _openTime; }
            set
            {
                if (!Equals(_openTime, value))
                {
                    _openTime = value;
                    OnPropertyChanged("OpenTime");
                }
            }
        }
 
        public decimal HighPrice
        {
            get { return _highPrice; }
            set
            {
                if (!Equals(_highPrice, value))
                {
                    _highPrice = value;
                    OnPropertyChanged("HighPrice");
                }
            }
        }
 
        public decimal LowPrice
        {
            get { return _lowPrice; }
            set
            {
                if (!Equals(_lowPrice, value))
                {
                    _lowPrice = value;
                    OnPropertyChanged("LowPrice");
                }
            }
        }
 
        public decimal OpenPrice
        {
            get { return _openPrice; }
            set
            {
                if (!Equals(_openPrice, value))
                {
                    _openPrice = value;
                    OnPropertyChanged("OpenPrice");
                }
            }
        }
 
        public decimal ClosePrice
        {
            get { return _closePrice; }
            set
            {
                if (!Equals(_closePrice, value))
                {
                    _closePrice = value;
                    OnPropertyChanged("ClosePrice");
                }
            }
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
 
        
         
    }
 
     
     
}
Martin Ivanov
Telerik team
 answered on 27 Apr 2016
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?