Telerik Forums
UI for WPF Forum
2 answers
102 views
I have some charts which require multiple groupings. Unfortunately, this tends to create a new chart legend item for each possible combination. For example, my first grouping (by Foos) may contain A, B, and C. The second grouping (say Bars) may contain 1, 2, and 3. Currently what happens is that RadCharts generate a new item for all combinations leading to A1, A2, A3, B1, B2, etc. This is overkill as the chart legend quickly becomes over populated and the number of unique colors required would be extreme (more than Telerik has).

Rather than this behavior, I would like for the data to be grouped by both Foos and Bars, but rely on tooltips to display the additional data. So the bars would be located in the same position as with multiple groupings, but rather than going A1 A2 A3 B1 B2 B3 it read 1 2 3 1 2 3 and be colored as such.
Adam Petaccia
Top achievements
Rank 1
 answered on 17 Sep 2010
1 answer
50 views
Is there any resolution to the issue when displaying a drilldown chart using the drilldown sample code that when it displays off screen it just flashes over and over?

The issue was discussed in this thread... 

Thanks,
Mike
Giuseppe
Telerik team
 answered on 17 Sep 2010
3 answers
210 views
Hello

There is an unresolved problem considering the theme which should be applied to RadDocking control in run-time mode.
Here a little code snippet:
 public MainWindow() 
        { 
            StyleManager.ApplicationTheme = new Office_BlueTheme(); 
            InitializeComponent();   
        } 
 
private void RadButton_Click(object sender, RoutedEventArgs e) 
        { 
            StyleManager.ApplicationTheme = new Office_SilverTheme(); 
            StyleManager.SetTheme(myRadDocking, StyleManager.ApplicationTheme); 
        }      

This code can be applied to any sample project (where Docking control is used) available on your forum. The problem is that when this code is executed:
StyleManager.ApplicationTheme = new Office_SilverTheme(); 
StyleManager.SetTheme(myRadDocking, StyleManager.ApplicationTheme); 

the layout of Docking windows will be destroyed. It stops working correctly. Please take a look on this and advise what can I do to resolve this problem. Note: this is not the Windows7Theme issue, this considers all themes.

Thanks
Konstantina
Telerik team
 answered on 17 Sep 2010
1 answer
98 views
Hi,

Lately, I made a custom map provider class to use ArcGis tile web service. 
The map runs fine but the the information/dynamic layers are missing/not showing. 
Also the navigation control is missing while it is set on visible. 
Did I forgot anything specific or do you know a way to fix this?

Kind Regards,

Martijn
Andrey
Telerik team
 answered on 17 Sep 2010
7 answers
1.1K+ views

We are trying to set the conditional style of a RadGridView cell programatically using the CellStyleSelector however, while no errors occurs the styling is not being reflected in the grid.  Our columns in the RadGridView are populated by binding to an ObservableCollection and are not defined explicitly in XAML.

We're not sure what we are doing wrong and wanted to see if you could give us some pointers on what we're missing.

If the value in a cell is negative we would like the cell to be colored red and if the value is positive we'd like the cell to be the normal color.

//We are trying to set the style of a cell to red if it is negative and it is not working.  Value converter is working fine though.
private void GridView_AutoGenerateColumn(object sender, Telerik.Windows.Controls.GridViewAutoGeneratingColumnEventArgs e)
        {
            if (e.Column.UniqueName == "Something")
            {
                //Styles
                // Negative Style
                Style negativeStyle = new Style();
                negativeStyle.TargetType = typeof(GridViewCell);
  
                Setter backGroundSetter = new Setter();
                backGroundSetter.Property = GridViewCell.BackgroundProperty;
                backGroundSetter.Value = Brushes.Red;
                negativeStyle.Setters.Add(backGroundSetter);
  
                // Positive Style
                Style normalStyle = new Style();
                normalStyle.TargetType = typeof(GridViewCell);
  
                //Selector and Rules
                ConditionalStyleSelector selector = new ConditionalStyleSelector();
                ConditionalStyleRule negativeRule = new ConditionalStyleRule();
                negativeRule.Style = negativeStyle;
                negativeRule.Value = false;
                ConditionalStyleRule normalRule = new ConditionalStyleRule();
                negativeRule.Style = normalStyle;
                negativeRule.Value = true;
  
  
                selector.Rules.Add(negativeRule);
                selector.Rules.Add(normalRule);
                NegativeValueConverter converter = new NegativeValueConverter();
                selector.ConditionConverter = converter;
                e.Column.CellStyleSelector = selector;
            }
        }
  
  
public class NegativeValueConverter : IValueConverter
    {
        #region IValueConverter Members
  
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            SupplyAdjustmentModel converterValue = (SupplyAdjustmentModel)value;
  
            if (converterValue != null)
            {
                return converterValue.Value > 0 ? true : false;
            }
  
            return null;
        }
  
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
  
        #endregion
    }
  
/// <summary>
    /// Conditional style selector
    /// Example Usage: To conditionally style the cell in a grid based on a set of rules (e.g. negative number = red cell)
    /// </summary>
    public class ConditionalStyleSelector : StyleSelector
    {
        public override System.Windows.Style SelectStyle(object item, System.Windows.DependencyObject container)
        {
            object conditionValue = this.ConditionConverter.Convert(item, null, null, null);
            foreach (ConditionalStyleRule rule in this.Rules)
            {
                if (Equals(rule.Value, conditionValue))
                {
                    return rule.Style;
                }
            }
  
  
            return base.SelectStyle(item, container);
        }
  
        List<ConditionalStyleRule> _Rules;
        public List<ConditionalStyleRule> Rules
        {
            get
            {
                if (this._Rules == null)
                {
                    this._Rules = new List<ConditionalStyleRule>();
                }
  
                return this._Rules;
            }
        }
  
        IValueConverter _ConditionConverter;
        public IValueConverter ConditionConverter
        {
            get
            {
                return this._ConditionConverter;
            }
            set
            {
                this._ConditionConverter = value;
            }
        }
    }
  
    public class ConditionalStyleRule
    {
        object _Value;
        public object Value
        {
            get
            {
                return this._Value;
            }
            set
            {
                this._Value = value;
            }
        }
  
        Style _Style;
        public Style Style
        {
            get
            {
                return this._Style;
            }
            set
            {
                this._Style = value;
            }
        }
    }
Maya
Telerik team
 answered on 17 Sep 2010
1 answer
121 views

Hi,

Can i group columns in Radgridview, which will shows one of the following data :
 

  - RowCount.

  - Average of a column.

  - Maximum of a column.

  - Minimum of a column.

  - Sum of a column.

Thanks,
-Narendra

 

Veselin Vasilev
Telerik team
 answered on 17 Sep 2010
3 answers
325 views
I'd like to create a UserControl with a border that looks like the RadWindows's border (without close/minimize/maximize buttons). Is there something like a 'RadBorder' control that would change its background color etc. according to the current theme?
Pana
Telerik team
 answered on 17 Sep 2010
1 answer
228 views
The grid I'm working with is used for time reporting.

I have two ComboBox columns.  Column A is the project, column B is the project step.  So until they select a project in column A's drop down, there should be no values in column B's drop down.  Once they selet a project in column A's drop down, the drop down in column B should be populated with the steps related to that project.

What's the best way to achieve this?  For column B I can bind to a DomainDataSource (I'm using RIA services) and apply a filter to it and call a load, but how do I capture the event of a selection in column A, and get to the selected value?
Vlad
Telerik team
 answered on 17 Sep 2010
2 answers
2.4K+ views
I have a WPF Application, WpfApplication1, and I'm referencing a WPF User Control library, WpfControlLibrary1.  In the WpfControlLibrary1, I'm referencing Telerik.Windows.Controls.  When I build and run (F5) the WPF Application, I get a XamlParseException - Could not load file or assembly...

I'm using a RadButton in a UserControl in the WpfControlLibrary1.

Checking the Debug\bin folder of the WpfApplication1, I can see the WpfControlLibrary1 was copied into the folder, but the Telerik.Windows.Controls.dll dependency from WpfControlLibrary1 as not copied.

If I add the reference to the WpfApplication1, it works but I shouldn't have to do that should I?  Shouldn't it figure out the dependencies and copy them from the child projects as necessary.

I've checked to make sure Copy Local = true.
Rick Glos
Top achievements
Rank 1
 answered on 16 Sep 2010
6 answers
134 views
Hello,

Please I want to:
 1.add pointers in run time , more than two pointers in a slider
  2. attach a label for each pointer in the slider

Many Thanks
Ruben Hakopian
Top achievements
Rank 1
 answered on 16 Sep 2010
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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?