Telerik Forums
UI for WPF Forum
1 answer
238 views
Hello,
using a RadRichTextBox I am facing the following:
Document is not in readonly mode -> Cursor is visible, can be moved via mouse and keyboard = > okay!
Document is in readonly mode -> Cursor is not visible, but can be moved via mouse and keyboard and shows up on a not expected postion when the document comes back to an editable state again. What can I do against this behaviour?

Another question I have: Is it possible to keep an selection made while in an editable state, but do not permit selection while in "readonly" (setting "isSelectionEnabled" to false)?

Thanks in advance

Jo
Petya
Telerik team
 answered on 11 Dec 2013
1 answer
118 views
Hi guys,

I am struggling mightily with the new ChartView controls. The documentation is severely lacking. I'm trying to use the new RadPieChart and the examples show only the bare minimum. I've looked at the demos - again, simplistic. Where does one add something simple like a chart title? How do you create a legend outside the chart area? The demos show hardcoded values and hardcoded mappings, but in practice this is never the case.

The old RadChart control is well documented, so perhaps it just reflects the newness of the new DLL.

is there an updated CHM? More realistic examples? The online docs are still almost completely silent on RadPieChart and google searches ALL relate to the old RadChart control.

Steve
Tina Stancheva
Telerik team
 answered on 11 Dec 2013
1 answer
114 views
Hi in my wpf application i want to plot two line chart..

and my requirement is i want to show each point in line pointmarker in different color.

i achived this for single line chart, when i try for two lines, both taking the same point mark fill color..

how to resolve this problem.. i am using item series mapping... 
Peshito
Telerik team
 answered on 11 Dec 2013
1 answer
162 views
Hello In my wpf application my requirement is to plot a two line graph with different color of point markers..
 i achived colours for point marker foor single line graph. but if try that method for two line graph am not getting result. am getting single line only,, 

Am getting double line if i use dataseries . but i need to do that by item series,,,

My values are from single tabel, two different columns....

here is my code...


        public void chartmain()
        {
            


            try
            {
        
                var qry = (from s in SvarkWindow.BPList
                           where (s.User_id.Equals(1))
                           orderby s.Test_date ascending
                           select new { s.BP_Score, s.BP_Score_Dia, s.Test_date }).ToList();

                if (qry.Count == 0)
                {
                    SvarkMessageBox.MessageBox.ShowInformation("No Records Found...");
                    radChart.Visibility = System.Windows.Visibility.Hidden;
                   //listStackPanel.Visibility = System.Windows.Visibility.Hidden;

                }
                else
                {

                    radChart.Visibility = System.Windows.Visibility.Visible;

                    List<BPChartHelper> HelperData = new List<BPChartHelper>();
                    List<BPChartHelper> HelperData1 = new List<BPChartHelper>();

                

                    foreach (var item in qry)
                    {
                        SvarkMessageBox.MessageBox.ShowInformation(item.ToString());
                        //lineSeries1.Add(new DataPoint() { YValue = Convert.ToDouble(item.BP_Score), XValue = item.Test_date.ToOADate() });
                        //lineSeries2.Add(new DataPoint() { YValue = Convert.ToDouble(item.BP_Score_Dia), XValue = item.Test_date.ToOADate() });

                        //valueList.Add(new KeyValuePair<DateTime, decimal>(item.Test_date.Date, item.HB_score));
                        HelperData.Add(new BPChartHelper(item.Test_date, item.BP_Score));
                        HelperData1.Add(new BPChartHelper(item.Test_date, item.BP_Score_Dia));


                    }


                
                  


                    SeriesMapping mapping = new SeriesMapping();
                    mapping.ItemMappings.Add(new ItemMapping("YValue", DataPointMember.YValue));
                    mapping.ItemMappings.Add(new ItemMapping("Date", DataPointMember.XCategory));
                 radChart.ItemsSource = HelperData;
                    radChart.SeriesMappings.Add(mapping);
                    radChart.DefaultView.ChartArea.AxisX.IsDateTime = true;
                    radChart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Auto;
                    radChart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45;
                    radChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "dd-MMM";
                    LineSeriesDefinition line = new LineSeriesDefinition();
                    radChart.DefaultSeriesDefinition = line;
                    line.ShowPointMarks = true;
                    line.ShowItemLabels = true;
                    line.Appearance.Stroke = new SolidColorBrush(Colors.DarkGreen);
                    line.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Black);
                    radChart.DefaultSeriesDefinition.PointMarkItemStyle = this.Resources["MyPointMark_Style"] as Style;
                    radChart.DefaultSeriesDefinition.SeriesItemLabelStyle = this.Resources["MySeriesItemLabel_Style"] as Style;
                    //**********************

                    SeriesMapping mapping1 = new SeriesMapping();
                    mapping1.ItemMappings.Add(new ItemMapping("YValue", DataPointMember.YValue));
                    mapping1.ItemMappings.Add(new ItemMapping("Date", DataPointMember.XCategory));
                    radChart.ItemsSource = HelperData1;
                    radChart.SeriesMappings.Add(mapping1);
                    radChart.DefaultView.ChartArea.AxisX.IsDateTime = true;
                    radChart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Auto;
                    radChart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 45;
                    radChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "dd-MMM";
                    LineSeriesDefinition line1 = new LineSeriesDefinition();
                    radChart.DefaultSeriesDefinition = line1;
                    line1.ShowPointMarks = true;
                    line1.ShowItemLabels = true;
                    line1.Appearance.Stroke = new SolidColorBrush(Colors.DarkBlue);
                    line1.Appearance.PointMark.Stroke = new SolidColorBrush(Colors.Red);
                    radChart.DefaultSeriesDefinition.PointMarkItemStyle = this.Resources["MyPointMark_Style"] as Style;
                    radChart.DefaultSeriesDefinition.SeriesItemLabelStyle = this.Resources["MySeriesItemLabel_Style"] as Style;




                  

                    this.radChart.DefaultView.ChartLegend.Visibility = System.Windows.Visibility.Visible;
                    //**************
                    radChart.DefaultView.ChartLegend.UseAutoGeneratedItems = false;

                    ChartLegendItem item1 = new ChartLegendItem();
                    item1.Label = "BP SYS";
                    item1.MarkerFill = new SolidColorBrush(Colors.DarkGreen);
                    radChart.DefaultView.ChartLegend.Items.Add(item1);
                    ChartLegendItem item2 = new ChartLegendItem();
                    item2.Label = "BP DIA";
                    item2.MarkerFill = new SolidColorBrush(Colors.SkyBlue);
                    radChart.DefaultView.ChartLegend.Items.Add(item2);
                    radChart.DefaultView.ChartLegend.Header = "BP Results";
                    this.radChart.DefaultView.ChartLegend.LegendItemMarkerShape = MarkerShape.StarFiveRay;

                    //**************

                   // this.BPGridView.ItemsSource = qry;

                    //  this.radChart.DefaultView.ChartArea.DataSeries.Add(lineSeries1);
                    // this.radChart.DefaultView.ChartArea.DataSeries.Add(lineSeries2);




                }
            }
        


And My Helper Class.....

class BPChartHelper : INotifyPropertyChanged
    {
        private DateTime _date;
        private SolidColorBrush _pointMarkFill;
        private decimal _yvalue;
        public BPChartHelper(DateTime date, decimal yvalue)
        {
            this._date = date;
            this._yvalue = yvalue;
            this.UpdatePointMarkVisibility();
        }
        public event PropertyChangedEventHandler PropertyChanged;
        public DateTime Date
        {
            get
            {
                return _date;
            }
            set
            {
                if (this._date == value)
                    return;
                this._date = value;
                this.OnPropertyChanged("Date");
            }
        }
        public decimal YValue
        {
            get
            {
                return _yvalue;
            }
            set
            {
                if (this._yvalue == value)
                    return;
                this._yvalue = value;
                this.OnPropertyChanged("YValue");
            }
        }

        
        

        public SolidColorBrush PointMarkFill
        {
            get
            {
                return _pointMarkFill;
            }
            private set
            {
                if (object.Equals(this._pointMarkFill, value))
                    return;
                this._pointMarkFill = value;
                this.OnPropertyChanged("PointMarkVisibility");
            }
        }
        protected virtual void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
        private void UpdatePointMarkVisibility()
        {
            if (this.YValue <=100)
                this.PointMarkFill = new SolidColorBrush(Colors.DarkGreen);
            else if(this.YValue<=105 && this.YValue>=100)
                this.PointMarkFill = new SolidColorBrush(Colors.DarkBlue);
            else if(this.YValue>=105 &&this.YValue<=120)
                this.PointMarkFill = new SolidColorBrush(Colors.Pink);
            else if (this.YValue >= 120 && this.YValue <= 125)
                this.PointMarkFill = new SolidColorBrush(Colors.Orange);
            else if (this.YValue >= 125 && this.YValue <= 130)
                this.PointMarkFill = new SolidColorBrush(Colors.Red);
        }



    }
}



Petar Marchev
Telerik team
 answered on 11 Dec 2013
3 answers
81 views
Hello,

i use RadExpander with theme Expression_Dark. It looks like that, the style of header has been set to standard style. So the header text is black. It will not be seen easily. Have you resolved this problem? Or that is just so specified ;)

Thanks.

Ivan
Stefan
Telerik team
 answered on 11 Dec 2013
1 answer
127 views
Hi everyone,
I can export the whole map image file now using the code below.
using (Stream stream = dialog.OpenFile())
{
    FrameworkElement element = this.m_Radmap.FindChildByType<ItemsPresenter>();
    Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(
        element, stream, new PngBitmapEncoder());
}

But the problem is that I have added a few marks on radmap information layer.
How to export these marks together with the map image?
Andrey
Telerik team
 answered on 11 Dec 2013
3 answers
103 views
I have a gauge that has a smaller Min and Max than the allowed values for my needle binding. For instance I have my Min set to 20 and my Max set to 80. The valid range is actually 0-100. 

The needle therefore goes outside of the gauge. Other than putting a valueconverter on the needle value to stop this behaviour is there any built in way I've missed to limit the needle?

Note: The bound property is used elsewhere, where the actual upper and lower limits are valid, so I can't limit it in the class. The only other way I could think of is to create a separate property that does the limiting in the class and then bind to that instead, which I guess would be better performing than a converter.

Thanks...
Andrey
Telerik team
 answered on 11 Dec 2013
1 answer
61 views
Hi,



I tried to use the InformationLayer.GetBestView(items), but it requires to be called several times to have correct result.

(If it is called with MapPinPoint)



Here is the template of the MapPinPoint :



<DataTemplate x:Key="ObstructionPointItemTemplate"><br>
            <telerik:MapPinPoint <br>
                BorderBrush="{StaticResource ObstructionPointColor}"<br>
                Template="{StaticResource PointControlTemplate}" <br>
                telerik:MapLayer.Location="{Binding }"><br>
                <telerik:MapLayer.HotSpot><br>
                    <telerik:HotSpot X="0.5" Y="0.5" /><br>
                </telerik:MapLayer.HotSpot><br>
            </telerik:MapPinPoint><br>
</DataTemplate>






In order to eliminate any side effects with the databinding or the map provider latency, the call to 'GetBestView' is made by an event handler attached to a user interaction (MouseRightButtonDown).



I have a lightweight VS2012 solution were I reproduced the issue, if needed





Can you please help me ?





Thanks in advance
Andrey
Telerik team
 answered on 10 Dec 2013
1 answer
407 views
Hello, I'm using the RichTextBox and cannot get the alignment to work. Here's my code:
radRichTextBox.Insert("Sample Text");
radRichTextBox.ChangeTextAlignment(Telerik.Windows.Documents.Layout.RadTextAlignment.Center);

I would like "Sample Text" to be center aligned but it doesn't work. When adding the control I select the "Text Box or Rich Text Box" option and all the defaults after that. If I select "Word Processor", the alignment code works. Does alignment only work when selecting "Word Processor"? Maybe there's a property I need to add to get the alignment to work when selecting "Text Box or Rich Text Box".

Thanks,
Scott
Svetoslav
Telerik team
 answered on 10 Dec 2013
3 answers
108 views

I have a WPF application that uses the RadGridView control to display search results:


<telerik:RadGridView AutoExpandGroups="True"
                                         AutoGenerateColumns="False"
                                         CanUserDeleteRows="False"
                                         CanUserFreezeColumns="False"
                                         CanUserInsertRows="False"
                                         CanUserResizeColumns="True"
                                         CanUserSortColumns="True"
                                         EnableColumnVirtualization="True"
                                         EnableRowVirtualization="True"
                                         FontSize="{x:Static res:Car.Common_DataEntryFontSize}"
                                         FontWeight="Bold"
                                         IsBusy="{Binding Path=IsLoadingReads, RelativeSource={RelativeSource AncestorType={x:Type cs:Searcher}}}"
                                         IsReadOnly="True"
                                         MouseDoubleClick="ReadsGrid_MouseDoubleClick"
                                         Name="ReadsGrid"
                                         RowIndicatorVisibility="Collapsed"
                                         RowStyleSelector="{StaticResource StyleSelector}"
                                         SelectionChanged="ReadsGrid_SelectionChanged"
                                         SelectionUnit="FullRow"
                                         ScrollViewer.CanContentScroll="True"
                                         ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                                         ShowGroupFooters="True"
                                         ToolTip="{x:Static res:Car.Searcher_ReadsGrid_ToolTip}">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Plate,     Mode=OneWay}"
                                                        Header="{x:Static res:Car.Common_Plate}"
                                                        Width="*" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding State,     Mode=OneWay}"
                                                        Header="{x:Static res:Car.Common_State}"
                                                        Width="75" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding TimeStamp,  Mode=OneWay, Converter={StaticResource DateConverter}}"
                                                        Header="{x:Static res:Car.Common_DateNTime}"
                                                        Width="Auto" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding GPSInformation.Position.Latitude, Mode=OneWay, Converter={StaticResource CoordConverter}, ConverterParameter={x:Static res:Car.GpsStatus_NS}}"
                                                        Header="{x:Static res:Car.Searcher_Latitude}"
                                                        Width="Auto" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding GPSInformation.Position.Longitude, Mode=OneWay, Converter={StaticResource CoordConverter}, ConverterParameter={x:Static res:Car.GpsStatus_EW}}"
                                                        Header="{x:Static res:Car.Searcher_Longitude}"
                                                        Width="Auto" />
                            <telerik:GridViewImageColumn DataMemberBinding="{Binding GpsQuality, Mode=OneWay, Converter={StaticResource DeviceStatuses}}"
                                                         Header="{x:Static res:Car.Searcher_GpsQuality}"
                                                         ImageStretch="None"
                                                         Width="125" />
                        </telerik:RadGridView.Columns>
                        <telerik:RadGridView.CommandBindings>
                                    <CommandBinding CanExecute="DisplayEditRecordDetails_CanExecute" Command="cs:CarSystemCommands.DisplayEditRecordDetails" Executed="DisplayEditRecordDetails_Executed" />
                        </telerik:RadGridView.CommandBindings>
                    </telerik:RadGridView>


This works well when the machine culture is set to en-US.  However, when the machine culture is set to es-CL (Chile), the Group By Panel is still in English.  How do I get the Group By panel to display in Spanish?

Dimitrina
Telerik team
 answered on 10 Dec 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
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
VirtualKeyboard
HighlightTextBlock
Security
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?