Telerik Forums
UI for WPF Forum
1 answer
143 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
0 answers
130 views

I have a LineSeries where I can add new points by clicking on the chart.

Most of the time everything is fine but sometimes the lines are connected to the wrong point.

It only happens when the time values are close to each other.

If I close the page with the chart and open it again the lines are drawn correctly.

1. Is there a way to get the chart to draw the line correct?

2. If not 1. Then can I somehow force a refresh of the chart?

Fredrik
Top achievements
Rank 1
Veteran
Iron
 asked on 08 Jun 2021
1 answer
282 views

I have a template for a customized control panel for my grid (see below).
It has been working fine for over a year, until I did the latest update (2021 R2).
Now I get an error that the CotrolPanelItemCollection is not part of the RadGridView.

Getting really frustrated lately with updates causing more problems than solutions :/
Right now both Blazor and WPF are unusable

Style TargetType="telerik:RadGridView" BasedOn="{StaticResource RadGridViewStyle}">
        <Setter Property="ControlPanelItems">
            <Setter.Value>
                <telerik:ControlPanelItemCollection>
                    <telerik:ControlPanelItem ButtonTooltip="Export To CSV" >
                        <telerik:ControlPanelItem.ButtonContent>
                            <Button Name="exportCSVButton" Width="16" Height="16" FontSize="8">
                                CSV
                            </Button>
                        </telerik:ControlPanelItem.ButtonContent>
                    </telerik:ControlPanelItem>
                    <telerik:ControlPanelItem ButtonTooltip="Export To PDF" >
                        <telerik:ControlPanelItem.ButtonContent>
                            <Button Name="exportPDFButton" Width="16" Height="16" FontSize="10">
                                PDF
                            </Button>
                        </telerik:ControlPanelItem.ButtonContent>
                    </telerik:ControlPanelItem>
                    <telerik:ControlPanelItem ButtonTooltip="Column chooser" >
                        <telerik:ControlPanelItem.ContentTemplate>
                            <DataTemplate>
                                <ListBox ItemsSource="{Binding Columns}"  BorderThickness="0">
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <CheckBox Content="{Binding Header, Mode=OneWay}" 
                                                      IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </DataTemplate>
                        </telerik:ControlPanelItem.ContentTemplate>
                    </telerik:ControlPanelItem>
                </telerik:ControlPanelItemCollection>
            </Setter.Value>
        </Setter>

Martin Ivanov
Telerik team
 answered on 08 Jun 2021
1 answer
874 views

How do I clear the RadMultiColumnComboBox text when the SelectedItem value it is bound to is NULL?  The ComboBox retains the value of the previous selection.

SelectedItem="{Binding SelectedPricedLineItem.ManufacturingGroup, Mode=TwoWay}"
DisplayMemberPath="DisplayValue"

When  SelectedPricedLineItem.ManufacturingGroup is NULL, the value displayed is is from the previous LineItem

Setting SelectedIndex to -1 is not an option since that would break MVVM.

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Jun 2021
0 answers
127 views

Good morning, I would like to know if there is a tool to move text or any part of the image, it would be very useful. I hope you can answer my question.

best regards

 

Javier

Electrónica GOIA
Top achievements
Rank 2
 asked on 04 Jun 2021
1 answer
269 views

Hello.

 

I want to customize the header for the tab control.

1.(red) I want to change or delete the color of the underlined line for the selected item.

2(blue). I want to change the mouse hover background color of tab items.

3.(orenge). There is a "+" button after the menu with AdditionalContent. I also want to put a "*" in front of the menu.

 

Some old data used navigationtabcontrol, so I couldn't find a recent example.

I'd appreciate it if you could tell me how to style each of these.

Thanks.

Vladimir Stoyanov
Telerik team
 answered on 04 Jun 2021
4 answers
318 views

We have a RadPane styled with IsHidden bound to a viewmodel property.

 <Style x:Key="PaneStyle" TargetType="{x:Type telerik:RadPane}">
   <Setter Property="CanUserClose" Value="False" />
   <Setter Property="CanFloat" Value="False" />
   <Setter Property="CanUserPin" Value="False" />
   <Setter Property="ContextMenuTemplate" Value="{x:Null}" />
   <Setter Property="IsPinned" Value="True" />
</Style>
<Style x:Key="PaneXStyle" TargetType="{x:Type telerik:RadPane}" BasedOn="{StaticResource PaneStyle}">
     <Setter Property="IsHidden" Value="{Binding HidePaneX}" />
</Style>
 

with the styles used like so:

<telerik:RadDocking AllowUnsafeMode="True">
   <telerik:RadDocking.DocumentHost>
     <telerik:RadSplitContainer>
       <telerik:RadPaneGroup>
        <telerik:RadPane Style="{StaticResource PaneStyle}" Header="Some Panes">
          <telerik:RadDocking AllowUnsafeMode="True">
            <telerik:RadDocking.DocumentHost>
              <telerik:RadSplitContainer>
                <telerik:RadPaneGroup>
                  <telerik:RadPane Style="{StaticResource PaneXStyle}" Header="PaneX">
       ......
 

After updating recently to v. 2021.1.325, we get the following exception.  We'd previously been on a very old version (2015 q1 sp1).

System.InvalidOperationException: Cannot modify the logical children for this node at this time because a tree walk is in progress.
   at System.Windows.FrameworkElement.RemoveLogicalChild(Object child)
   at MS.Internal.Controls.InnerItemCollectionView.ClearModelParent(Object item)
   at MS.Internal.Controls.InnerItemCollectionView._RemoveAt(Int32 index, Int32 indexR, Object item)
   at System.Windows.Controls.ItemCollection.Remove(Object removeItem)
   at Telerik.Windows.Controls.RadPaneGroup.ClosePane(RadPane pane) in c:\DeveloperTooling_Agent13\_work\103\s\Controls\Docking\Docking\Docking\RadPaneGroup.cs:line 671
   at Telerik.Windows.Controls.RadDocking.HidePane(RadPane pane) in c:\DeveloperTooling_Agent13\_work\103\s\Controls\Docking\Docking\Docking\RadDocking.cs:line 463
   at Telerik.Windows.Controls.RadPane.Close() in c:\DeveloperTooling_Agent13\_work\103\s\Controls\Docking\Docking\Docking\RadPane.cs:line 1566
   at Telerik.Windows.Controls.RadPane.OnIsHiddenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\DeveloperTooling_Agent13\_work\103\s\Controls\Docking\Docking\Docking\RadPane.cs:line 1319
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperty(TreeChangeInfo info, DependencyObject d, FrameworkObject& fo, DependencyProperty dp, FrameworkPropertyMetadata fMetadata, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(TreeChangeInfo info, FrameworkElement fe, FrameworkContentElement fce, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
   at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
   at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
   at System.Windows.FrameworkElement.AddLogicalChild(Object child)
   at Telerik.Windows.Controls.RadDocking.OnLoaded(Object sender, RoutedEventArgs e) in c:\DeveloperTooling_Agent13\_work\103\s\Controls\Docking\Docking\Docking\RadDocking.cs:line 1756
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

For the time being, we instead bind IsEnabled to our VM property, but we'd like to be able to hide these panes again, please.

Additionally, the exception doesn't happen if the pane happens to be visible when the application starts; rather, it only happens if the pane is out of view (one of the other panes in the top-level Docking is foremost) and we browse to it later.  It is still docked during this time.

 

Is this a bug for which we should file a report?  Is there a different or better way to do this?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Jun 2021
1 answer
313 views

I have read the Telerik Article on Localization with UI for WPF but I am using the Telerik NuGet server and the assemblies it provides to not appear to match what is in that article.   

My application...

  • uses Telerik binaries *with* Xaml
  • uses the Telerik NuGet server to obtain its DLLs
  • has both English and French translations.

I see that the Telerik NuGet Server appears to provide two separate  assemblies related to each language.  For example, I see the following two assemblies with the ".fr" suffix for French

Telerik.Windows.Controls.for.Wpf.fr
Telerik.Windows.Controls.for.Wpf.Xaml.fr

What is the difference between these two?  Should I include them BOTH with my application or just one of them?

Vladimir Stoyanov
Telerik team
 answered on 03 Jun 2021
1 answer
139 views
How to save and load local themes
Martin Ivanov
Telerik team
 answered on 03 Jun 2021
2 answers
250 views

I am trying to display the data points in a ScatterLineSeries when the user clicks a button using the following code:

private void ShowDataPointsButton_Click(object sender, RoutedEventArgs e)
{
    foreach (var series in CartesianChart.Series)
    {
        if (series is ScatterLineSeries)
        {
            series.DefaultVisualStyle = Application.Current.Resources["DataPointStyle"] as Style;
        }
    }
}

(where `CartesianChart` is a `RadCartesianChart` control)

The style definition is as follows:

<Style x:Key="DataPointStyle" TargetType="{x:Type Path}">
    <Setter Property="Height" Value="5" />
    <Setter Property="Width" Value="5" />
</Style>

(I am using a palette to style the chart; hence the missing definition for `Fill`)

But for some reason, I have to follow these steps in order to see the data points styled:

  1. Press the `ShowDataPointsButton` button
  2. Zoom into the chart
  3. Press the `ShowDataPointsButton` button
  4. Press the `ShowDataPointsButton` button again

I have tried the following options to fix this issue:

  1. Remove the series from the chart -> Apply the style -> Add the series back into the chart
  2. Apply the style -> Force a redraw manipulating the zoom level on the chart
  3. Using the dispatcher associated with the series to force a redraw
  4. Using Application.Current.Dispatcher to apply the style with Render priority
  5. Binding a property to `DefaultVisualStyleProperty` and setting its value when user clicks the button

But in all these instances (except option 5 where the trial with binding did not work at all), I have to follow the steps mentioned up above to see the data points in the chart.

Could you please guide me on what is the right way to apply `DefaultVisualStyle` for a ScatterLineSeries in runtime from C# code-behind?

Vladimir Stoyanov
Telerik team
 answered on 02 Jun 2021
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
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?