Current filter:
                                You should refresh the page.
                                  • Hello,

                                    I have created Gird and set one if its column settings to FieldPercent.EditSettings = new ProgressBarEditSettings()
                                    this lets me to see a progressbar instead of text (I have attached VS solution).

                                    Everything works fine and looks good, but now I would like to change color based on the value e.g. if column value is > than 50% I would
                                    like to make a bar red. How could I achieve that?

                                    Just before you start redirecting me to similar questions I would like to emphasize, that I have already spent two days searching and investigating similar devexpress tickets like these:
                                    http://www.devexpress.com/Support/Center/Question/Details/Q435183http://www.devexpress.com/Support/Center/Question/Details/Q353853

                                    but just did not managed to make it work - the main difference is that I am creating progressbar via EditSettings and I need override color of the progressbar value bar, and not the background color of the progress bar.

                                    Thank you in advance for the reply,
                                    Edgaras

                                • Edgaras Augus 05.26.2013

                                  This is how it should look like (see in attachment)

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Edgaras,
                                A simple way to achieve this goal is to re-define the x:Key="{dxet:ProgressBarEditThemeKey ResourceKey=PanelLeftSideHorizontalTemplate}" ControlTemplate in the following manner :

                                [XAML]
                                <ControlTemplate x:Key="{dxet:ProgressBarEditThemeKey ResourceKey=PanelLeftSideHorizontalTemplate}" TargetType="{x:Type ContentControl}"> <Border Margin="1" CornerRadius="2" Background="{Binding Value, Converter={local:PercentsToBrushConverter}}"> </Border> </ControlTemplate>

                                PercentsToBrushConverter.cs :

                                [C#]
                                class PercentsToBrushConverter : MarkupExtension, IValueConverter { public override object ProvideValue(IServiceProvider serviceProvider) { return this; } public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value is int) if ((int)value <= 50) { return Brushes.Green; } else { return Brushes.Red; } return Brushes.Transparent; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value; } }

                                I have modified the project you sent to us to demonstrate this approach in action. Feel free to contact us if you need any additional assistance.

                                • Edgaras Augus 05.27.2013

                                  Thank you,
                                  I have already tried this, in demo proj it works fine, but it doesn't work on my project (as always), at least I know, that it is the right solution.
                                  Thank you once again

                                • Michael Ch (DevExpress Support) 05.27.2013

                                  This behavior is very strange. If you can't locate the problem, would you please provide the original application for us to research?

                                • Edgaras Augus 05.27.2013

                                  I have just found the issue, the thing is that we are setting the theme: ThemeManager.ApplicationThemeName = "Office2007Blue";
                                  If you want to make it work IsThemeIndependent=True must be set, re-definition should look like this:
                                  x:Key="{dxet:ProgressBarEditThemeKey ResourceKey=PanelLeftSideHorizontalTemplate, IsThemeIndependent=True}"

                                • Michael Ch (DevExpress Support) 05.27.2013

                                  Thank you for informing us that the issue has been resolved. Please do not hesitate to contact us in case of any difficulty. We will be happy to help you!