Telerik Forums
UI for WPF Forum
1 answer
83 views

I have placed a RadialGauge with RadialScale inside a ViewBox.  To get the RadialGauge to display correctly, I have bound the height and width of the RadialGauge to the actual height and width of the the Grid that holds the RadialGauge.  The RadialGauge sizes correctly to the ViewBox although the labels actually get smaller as the Viewbox stretches to fill the window it is in. How do I get the  Indicator label size to change when the size of the ViewBox is changed?

<Window x:Class="GaugeTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:local="clr-namespace:GaugeTest"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800" x:Name="TheWindow"
        >
    <Grid Margin="0" x:Name="MainV" >
        <Viewbox x:Name="VBox" 
                HorizontalAlignment="Center" VerticalAlignment="Center"                    
                Stretch="Uniform">

            <telerik:RadRadialGauge Height="{Binding ElementName=MainV, Path=ActualHeight}" Width="{Binding ElementName=MainV, Path=ActualWidth}">
                <telerik:RadialScale   Radius="1"  
                    Min="0" 
                    Max="30"
                    MajorTickStep="5"
                    Foreground="Black"
                             Stroke="Black"
                             StrokeThickness="1"
                             Fill="White"                 
                             >
                    <telerik:RadialScale.Indicators >
                        <telerik:Needle Name="needle" Foreground="Black" Value="15" />
                        <telerik:Pinpoint Foreground="Black"/>
                    </telerik:RadialScale.Indicators>

                </telerik:RadialScale>
            </telerik:RadRadialGauge>
        </Viewbox>
    </Grid>
</Window>
 
Martin Ivanov
Telerik team
 answered on 26 Jun 2025
1 answer
156 views

Hello,

I'm building a gauge specifying custom ticks. The gauge is pretty narrow in range, and the ticks fall on double values, like 2.3421 and 4.5214.

It looks like the ticks are getting rounded to int, but I want them to maybe apply a string format to them to display 2 decimal values, how can I do this?

Oscar
Top achievements
Rank 1
Iron
 answered on 19 Jul 2023
1 answer
152 views

I am using a RadHorizontalLinearGauge and a RadVerticalLinearGauge in a WPF UserControl. Each of these controls has 7 properties that are bound, Min, Max, MajorTickStep, MiddleTicks, StartTickOffset, EndTickOffset, and LabelFormat to DependencyProperties. As I drag an image back and forth in the UI (pan), the gauge control properties get updated accordingly. Please refer to the attached image.  The performance can be pretty sluggish because I think the controls update after every property update instead of all at once.  What I need is the old WinForms BeginUpdate/EndUpdate functions, but I don't think the equivalent functionality exists in WPF. Do you have any suggestions on how I can improve the performance?

 

Vladimir Stoyanov
Telerik team
 answered on 23 May 2023
1 answer
176 views

Hi. I have some question.

An exception occurred while debugging the ExecutiveDashboard demo source code.

exception text : 
System.InvalidOperationException: 'An error occurred while processing this request.'
DataServiceTransportException: The request was aborted: Could not create SSL/TLS secure channel.
WebException: The request was aborted: Could not create SSL/TLS secure channel.



An error occurred while downloading and installing the ExecutiveDashboard demo app(setup.exe).

install.log : 
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [NTProductType] = 1 {int}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 10.0.0 {version}
Running checks for package '.NET Desktop Runtime 6.0.1 (x64)', phase BuildList
Checking conditions before installer checks for command 'net6desktopruntime_x64\windowsdesktop-runtime-6.0.1-win-x64.exe'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'AMD64': false
Result of checking conditions before installer checks for command 'net6desktopruntime_x64\windowsdesktop-runtime-6.0.1-win-x64.exe' is: No action
Running external check with command 'C:\Users\jmkim\AppData\Local\Temp\VSD29A9.tmp\net6desktopruntime_x64\NetCoreCheck.exe' and parameters 'Microsoft.WindowsDesktop.App 6.0.1'
Process exited with code 0
Setting value '0 {int}' for property 'NetCoreCheck'
The following properties have been set for package '.NET Desktop Runtime 6.0.1 (x64)':
Property: [NetCoreCheck] = 0 {int}
Running checks for command 'net6desktopruntime_x64\windowsdesktop-runtime-6.0.1-win-x64.exe'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'AMD64': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '6.1.0': false
Result of running operator 'ValueEqualTo' on property 'NetCoreCheck' and value '0': true
Result of checks for command 'net6desktopruntime_x64\windowsdesktop-runtime-6.0.1-win-x64.exe' is 'Bypass'
'.NET Desktop Runtime 6.0.1 (x64)' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697208'
Error: An error occurred trying to download 'http://demos.telerik.com/wpf/executivedashboard/ExecutiveDashboard.application'.

 

The same problem occurred with the SalesDashboard demo source code and app.

What caused the problem?


Martin Ivanov
Telerik team
 answered on 05 May 2023
0 answers
155 views
We are using RadSemicircleNorthGauge and RadProgressBar, and we would like to update the look and feel, but I don't really know what changes have been made since 2017.   Perhaps there are new controls we should use or updated properties on the existing ones.  Can you point me to the right place to get this information?
Brett
Top achievements
Rank 1
 asked on 29 Mar 2023
1 answer
138 views

Hello, 

I need to create a scale, showing the Major tick at the beginning/at the end of the scale.

In order to do this, I've set ShowLastLabel to false. The data on the scale changes every 200 m/s.  The last label sometimes blinks, even though the property ShowLastLabel is set to false.

If I change EndTickOffset, instead of changing ShowLastLabel, then I do not see the Major tick at the end of the scale.

See the attached example.

 <telerik:RadVerticalLinearGauge 
             FontSize="16"
             Background="Green"
             HorizontalAlignment="Left"
             Width="3"
             Margin="30,94,0,95"
            >
            <telerik:VerticalLinearScale
                    Max="{Binding Max,FallbackValue=20}"
                    Min="{Binding Min,FallbackValue=0}"
                    Background="Green"
                    LabelLocation="Inside"
                    FontSize="16"
                    StartTickOffset="{Binding TickOffset,FallbackValue=0}"
                    EndTickOffset="{Binding TickOffset,FallbackValue=0}"
                 ShowFirstLabel="False"
                    ShowLastLabel="False"
                    MajorTickStep="10"
                    IsInteractive="True"
                    MinorTickBackground="Red"
                    MiddleTicks="2"
                    MiddleTickBackground="Green"
                    MiddleTickLocation="Outside"
                    LabelOffset="16"
                    MiddleTickRelativeWidth="5"
                    MiddleTickRelativeHeight="0.015*"
                    MajorTickRelativeWidth="20"
                    MajorTickRelativeHeight="0.015"
                    EndWidth="0.03"
                    StartWidth="0.03"
                    MinorTicks="1"
                    >
            </telerik:VerticalLinearScale>
        </telerik:RadVerticalLinearGauge>

 

Timer timer= new Timer(200);
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            timer.Elapsed += Timer_Elapsed;
            timer.Start();
        }

 

 private void Method(double value)
        {
            Val = value.ToString();
            Min = value - 10;
            Max = value + 10;
            double startValue = Math.Round(Min / 10) * 10;
            TickOffset = startValue - Min;


        }
Stenly
Telerik team
 answered on 11 Aug 2022
1 answer
183 views

I've been working with the yWorks for WPF technology for a few years now and have a chance to compare it to the Telerik WPF Diagramming framework and API sets; in my mind, these are complex and advanced UI frameworks. However, getting started is a long learning curve in many areas of geometry, some trigonometric calculations, systems programming, and some advanced animations work.  We are working to create the following technologies using the Diagramming frameworks:

  • OWL 2 DSL Logic and Visualization facilities
  • DSL Composition Editor and Visualization facilities
  • Microsoft Graph Engine TSL Editor
  • Real-time Workflow CMN and DMN Materializer and Interactive Visualization Facilities

I've been using yWorks - a fantastic technology and product, but expensive; it would be great if there was a better set of samples and tutorials around the dynamic use of the Diagramming APIs set for runtime capabilities. I think I've seen what guidance Telerik has made available to date; are there some additional resources available and what type of "professional services" might be available.

Tavi

1 answer
169 views

Hi Team,

We have an application in which we are using gauge control to show some values. This application is currently supporting many themes and themes are applied as per the selected theme. But in few of the themes the RadSemicircleNorthGauge display the white background which is make design look bad. We have tried to remove it but did not find any way to do so. Is there any way through which we can remove it so that it will not be shown in any themes. Attaching here with the images showing the same gauge in 2 different theme. 

Kindly help us resolve this issue.

The attached 2 images are visible in respective themes:

1. Image with background - In Crystal Light/Dark, Fluent light/Dark

2. Image without background - In Office2016, Office2016touch, Expression Dark.

Dilyan Traykov
Telerik team
 answered on 09 Jun 2021
1 answer
385 views

Hi Team,

We want to show the battery status for laptop users in our application designed using Telerik in MVVM pattern using PRISM framework. We want to show the ICON with gauge showing current status of Battery very similar to thermometer design present in Telerik sample application. 

We are able to design the Battery similar to mobile application using Viewbox and Borders in WPF. We are not able to implement it in the Telerik RadVerticalLinearScale Custom Items. We want to define the battery status with 3 ranges in which one will be red indicating action required, one will be yellow representing warning and one will be green indicating normal state. Kindly help us design it using RadVerticalLinearGauge. 

Below is the code we tried but it is not working. If you have any other way then please help we also tried like thermometer code but we are not able to design the battery as shown in image.

<telerik:RadVerticalLinearGauge Grid.Row="3" Grid.Column="0" Grid.RowSpan="4"><br>                            <telerik:VerticalLinearScale Min="0" Max="100" MajorTicks="4" RangeLocation="Inside" IsInteractive="True"><br>                                <telerik:VerticalLinearScale.Ranges><br>                                    <telerik:GaugeRange Background="#FFE50000" Min="0" Max="20" IndicatorBackground="#FFE50000" StartWidth="0.05" EndWidth="0.05"/><br>                                    <telerik:GaugeRange Background="#FFFFFF00" Min="20" Max="30" IndicatorBackground="#FFFFFF00" StartWidth="0.05" EndWidth="0.05"/><br>                                    <telerik:GaugeRange Background="#FF32CD32" Min="30" Max="100" IndicatorBackground="#FF32CD32" StartWidth="0.05" EndWidth="0.05"/><br>                                </telerik:VerticalLinearScale.Ranges><br>                                <telerik:VerticalLinearScale.Indicators><br>                                    <telerik:BarIndicator UseRangeColor="True"<br>                                                        RangeColorMode="MixedColor" <br>                                                        Value="35" /><br>                                </telerik:VerticalLinearScale.Indicators><br>                                <telerik:VerticalLinearScale.Template><br>                                    <ControlTemplate><br>                                        <Viewbox Width="80" Height="150"><br>                                            <StackPanel Orientation="Vertical"><br>                                                <Border Background="#00c000" CornerRadius="2,2,0,0" Padding="2" Width="20" Height="7" Margin="0,-2,0,-2"/><br>                                                <Border BorderBrush="#00c000" BorderThickness="2" CornerRadius="5" Padding="2" Width="50" Height="100"><br>                                                    <Grid><br>                                                        <Grid.RowDefinitions><br>                                                            <RowDefinition /><br>                                                            <RowDefinition Height="Auto" /><br>                                                        </Grid.RowDefinitions><br>                                                        <Border Height="75" Grid.Row="1" Background="#00c000" CornerRadius="2" Padding="2" /><br>                                                    </Grid><br>                                                </Border><br>                                            </StackPanel><br>                                        </Viewbox><br>                                    </ControlTemplate><br>                                </telerik:VerticalLinearScale.Template><br>                            </telerik:VerticalLinearScale><br>                        </telerik:RadVerticalLinearGauge>

 

Hi Martin,
Thanks for the code sample tried to implement the way you have shown but it does not look like the expected design shared in the sample image. We have Windows application which we have designed using telerik control and was able to achieve the same design using rad linear Gauge.  You can check below attached image for the same. We are migrating this application to WPF and we are not able to design this part. Can you look at windows control and helps us design the same way?
Or can we achieve the same thing using any other way like using path for designing the battery icon like you people had designed the thermometer? Kindly help.

 

Attaching changedbatterydesignonResize for reference.

Nilesh
Top achievements
Rank 1
Veteran
 updated question on 04 May 2021
1 answer
288 views

When I run the Groups demo in the Gauge_WPF solution (no modifications), the linear / vertical gauge group doesn't look anything like what it's supposed to:

  • No indicators
  • Only 1.5 of the 4 ranges visible

(screenshot attached)

Can you pls. clarify how to fix this?

 

Vladimir Stoyanov
Telerik team
 answered on 17 Jun 2020
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
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?