Telerik Forums
UI for WPF Forum
3 answers
158 views
Hi,

we would like to do some tweaks in Property Grid Fields styling. Sometimes the property names are too long and overlap with the fields.

 I suppose the way to go is to edit the GridField template, but we are struggling to find it/generate it in Blend (using the Windows8 Theme).

Any ideas?
Thanks,
Stevo
Ivan Ivanov
Telerik team
 answered on 11 Oct 2013
4 answers
456 views
Hi, Telerik!

     I need to override default theme "Office_Black" and save ability for dynamically theme changing. I looked around this help (http://www.telerik.com/help/wpf/styling-apperance-themes-runtime.html). And found problem with inheritance styles. It's need using BasedOn attribute to inherite my default theme. This attribute is limited to StaticResources.
     How can I dynamically change custom style base theme? Hope for the further request!

Regards,
Anatoliy
Rosen Vladimirov
Telerik team
 answered on 11 Oct 2013
1 answer
161 views
I have been working on a user control to simplify chart generation based on our needs. We adhere strictly to MVVM. I created a content control in XAML and am creating all of the Telerik charting in the view model and binding the chart to the content control. So far it has gone fairly smooth but with a hitch. I am trying to display the grid lines declared in code but the grid lines simply aren't showing up. Is it not possible to generate the grid with appropriate grid lines in code? Note that I have been focusing on the bar series in the following code:

public void Create2DCharting(ObservableCollection<CategoricalDataItem> data, NewChartTheme chartTheme)
        {
            this.ShowCartesian3DChart = false;
            BarSeries barSeries = new BarSeries();
            if (chartTheme.ColorBrushes.Count > 0)
            {
                for (int i = 0; i < data.Count; i++ )
                {
                    data[i].Color = chartTheme.ColorBrushes[i];
                }
            }
 
            if (chartTheme.ChartTp == ChartType.PieChart || chartTheme.ChartTp == ChartType.DoughnutChart)
            {
                this.ShowPieChart = true;
                this.ShowCartesian2DChart = false;
 
                this.PieChart = new RadPieChart();
                this.PieChart.Palette = new ChartPalette();
 
                foreach (CategoricalDataItem cdi in data)
                    PieChart.Palette.GlobalEntries.Add(new PaletteEntry(cdi.Color, cdi.Color));
 
                if (chartTheme.ShowLegend)
                {
                    this.ChartLegend = new RadLegend();
                    this.ChartLegend.Items = this.PieChart.LegendItems;
                }
            }
            else
            {
                this.ShowPieChart = false;
                this.ShowCartesian2DChart = true;
                this.CartesianChart2D = new RadCartesianChart();
 
 
                if (chartTheme.BackgroundColor != null)
                    this.CartesianChart2D.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString(chartTheme.BackgroundColor));
 
                barSeries.HorizontalAxis = new CategoricalAxis();
                barSeries.VerticalAxis = new LinearAxis();
 
                if (chartTheme.ShowLegend)
                {
                    this.ChartLegend = new RadLegend();
                    barSeries.ItemsSource = data;
                    barSeries.ValueBinding = new PropertyNameDataPointBinding("YValue");
                    barSeries.CategoryBinding = new PropertyNameDataPointBinding("XValue");
 
                    LegendItemCollection lic = new LegendItemCollection();
 
                    foreach (var d in data)
                        lic.Add(new LegendItem() { MarkerFill = (Brush)d.Color, MarkerStroke = (Brush)d.Color, Title = d.XValue });
 
                    this.ChartLegend.Items = lic;
                }
                else
                {
                    barSeries.ItemsSource = data;
                    barSeries.ValueBinding = new PropertyNameDataPointBinding("YValue");
                    barSeries.CategoryBinding = new PropertyNameDataPointBinding("XValue");
                }
            }
 
            switch(chartTheme.ChartTp)
            {
                case ChartType.BarChart :
                    if(chartTheme.ColorBrushes.Count > 0)
                        barSeries.PointTemplate = GetBarColorDataTemplate();
 
                    if (chartTheme.ShowGridLines)
                        this.CartesianChart2D.Grid = new CartesianChartGrid() { MajorLinesVisibility = GridLineVisibility.Y };
 
                    this.CartesianChart2D.Series.Add(barSeries);
 
                    break;
                case ChartType.HorizontalBarChart :
                    barSeries.VerticalAxis = new CategoricalAxis();
                    barSeries.HorizontalAxis = new LinearAxis();
 
                    if(chartTheme.ColorBrushes.Count > 0)
                        barSeries.PointTemplate = GetBarColorDataTemplate();
 
                    this.CartesianChart2D.Series.Add(barSeries);
                    break;
                case ChartType.LineGraph :
                    LineSeries lineSeries = new LineSeries();
 
                    lineSeries.HorizontalAxis = new CategoricalAxis();
                    lineSeries.VerticalAxis = new LinearAxis();
 
                    lineSeries.ItemsSource = data;
                    lineSeries.ValueBinding = new PropertyNameDataPointBinding("YValue");
                    lineSeries.CategoryBinding = new PropertyNameDataPointBinding("XValue");
 
                    lineSeries.PointTemplate = GetLineDataPointDataTemplate();
 
                    this.CartesianChart2D.Series.Add(lineSeries);
                    break;
                case ChartType.PieChart :
                    PieSeries pieSeries = new PieSeries();
                    pieSeries.ItemsSource = data;
                    pieSeries.ValueBinding = new PropertyNameDataPointBinding("YValue");
                    PieChart.Series.Add(pieSeries);
                    break;
                case ChartType.DoughnutChart :
                    DoughnutSeries doughnutSeries = new DoughnutSeries();
                    doughnutSeries.ItemsSource = data;
                    doughnutSeries.ValueBinding = new PropertyNameDataPointBinding("YValue");
                    PieChart.Series.Add(doughnutSeries);
                    break;
            }
 
        }
 
private DataTemplate GetBarColorDataTemplate()
        {
            StringReader markup = new StringReader(
                @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">" +
                @"<Rectangle Fill=""{Binding DataItem.Color}""/>" +
                @"</DataTemplate>");
            XmlReader xmlReader = XmlReader.Create(markup);
            return XamlReader.Load(xmlReader) as DataTemplate;
        }
 
        private DataTemplate GetLineDataPointDataTemplate()
        {
            StringReader markup = new StringReader(
                @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">" +
                @"<Ellipse Height=""10"" Width=""10"" Fill=""{Binding DataItem.Color}""/>" +
                @"</DataTemplate>");
            XmlReader xmlReader = XmlReader.Create(markup);
            return XamlReader.Load(xmlReader) as DataTemplate;
        }
Petar Kirov
Telerik team
 answered on 11 Oct 2013
1 answer
73 views
Hi!

Is it possible, that the INotifyPropertyChanged of my business object is not raised after a value in a cell was edit?

Thank you,
Manuel
Rossen Hristov
Telerik team
 answered on 11 Oct 2013
1 answer
165 views
Hi,

I had installed the free trial of the demos for RadControls and started debugging "ExamplesCS_WPF.sln" project, getting the "Enjoying your RadContolrs for WPF trial?" message.

Is that mandatory to purchase license version??
Then only i will get access??
Dimitrina
Telerik team
 answered on 10 Oct 2013
2 answers
511 views
Hi,

We display a context menu when the user right clicks a location within the RadDiagram.  How would we get the position in the diagram where the user clicked?  
This doesn't appear to be as simple as getting the MousePosition of the menu (or combining it with PointFromScreen) as we need to take account of Pan / Zoom / Scrolling.
Gary
Top achievements
Rank 1
 answered on 10 Oct 2013
1 answer
123 views
Hi,
How can I put a link inside slots and display data on a pop up gridview when click. The info for the slot will get populated from db, including its color (Category) , Not sure how to change or assign a color from code behind. The color is coming from db as arg, The user preselect the message to display and the color category at othe window.....

The use of the link and grid inside a slot is to display data related to the message displayed.

Thanks in advance!


CB
Kalin
Telerik team
 answered on 10 Oct 2013
3 answers
121 views
I am trying to save a Word document that has merge fields, but do not want the merging done. It appears that the merging is done before the document is saved so that that when it is reopened, cannot then perform the merge. Am I doing something wrong?
Petya
Telerik team
 answered on 10 Oct 2013
7 answers
1.0K+ views
Hi Guys,
I'm using RadAutocompleteBox from RadControls for WPF Q3 2012 in an MVVM Application.
Here is sample code:
<Controls:AutoCompleteBox
                                WatermarkContent="Select a location..."
                                DisplayMemberPath="Name"
                                TextSearchPath="Name"
                                SelectedItem="{Binding ImpactedLocation, Mode=TwoWay, ValidatesOnDataErrors=True}"
                                ItemsSource="{Binding AvailableImpactedLocations}"
                                IsEnabled="{Binding IsOpened}"
                                MaxDropDownHeight="400"
                                DropDownWidth="400"
                                />
The SelectedItem is bound to an MVVM ViewModel.
My problem is when I want to clear the text displayed in the autocomplete's textbox by setting the ViewModel.ImpactedLocation = null;
 the selectedItem is cleared, but the text displayed is still here.

How can I clear it please? Something's to do with the SearchText? (try to clear it too, but still not working)
Thank's for your help.
Kind regards,
JC



Georgi
Telerik team
 answered on 10 Oct 2013
1 answer
89 views
LinearScale.CustomItems spanning range

Is it possible to have a custom item inside a linear scale span a certain range of values?
When you use the attached property ScaleObject.Value, it centers the item at the specified value. However, I would like to have the left end of the item (e.g. an rectangle or border) at one value and the right end at another.

Thank you.
Andrey
Telerik team
 answered on 10 Oct 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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?