Telerik Forums
UI for WPF Forum
20 answers
620 views
Hi there, 

Currently I plan to use TreeListView in our application. We have resource directory to control the look and feel of our application. How can we apply this look and feel to your TreeListView?

Example of the theme that we want to apply is to set the background color of the selected row as well as the TreeListView table header.

Regards, 

Arinto

David
Top achievements
Rank 1
 answered on 11 Dec 2013
2 answers
113 views
Statistics Netherlands has a pretty cool graphic for comparing consumer price changes in different countries. See http://www.cbs.nl/en-GB/menu/themas/prijzen/cijfers/extra/inflatie-internationaal.htm

Can ChartView do these things? 

Mouse-over selected series in series list changes contrast of selected series via data binding so that selected series is clearly visible and other series are faintly visible


Mouse-over chart coordinates shows tooltip(s); if multiple series are involved, tooltips arrange themselves in a smart way










Mark
Top achievements
Rank 1
 answered on 11 Dec 2013
3 answers
542 views
Hi Telerik
In a usercontrol, I have this property in the code behind:

 

public string MyText
        {
            get {return "My text";}
            set {}
        }

 

In xaml, the usercontrol have the name: x:Name="This"

Could you somehow, please help me to get MyText into the header in the menuItem?- the following example, is not working for me: 

 

<telerik:RadToggleButton Tag="{Binding ElementName=This}" Content="Click me" IsChecked="{Binding IsOpen, ElementName=radContextMenu, Mode=TwoWay}">
 
            <telerik:RadContextMenu.ContextMenu >
                <telerik:RadContextMenu x:Name="radContextMenu" Placement="Bottom" IconColumnWidth="0" DataContext="{Binding RelativeSource={RelativeSource Self}, Path=PlacementTarget.Tag}">
                    <telerik:RadMenuItem Header="{Binding Path=MyText}" />
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>
 
        </telerik:RadToggleButton>

Thanks from Kenneth :o)

 

 

 

Kenneth
Top achievements
Rank 2
 answered on 11 Dec 2013
1 answer
227 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
110 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
111 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
155 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
74 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
120 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
99 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?