Hello,
I have a problem trying to reproduce the Radwindow as main window KB (https://www.telerik.com/support/kb/wpf/window/details/how-to-use-radwindow-as-main-window).
I'm using VB.NET with 2017.3.913.40 telerik components. I'm also using noXaml binaries.
When i run the application, nothing is visible.
I've tried todo this alos MainWindow inherits radwindow, but it's not better.
If i remove the onStartup code and set the application startupuri to MainWindow.xaml, i have the window visible, but there is another aweful window visible behind.
This problem will drive me crazy !
Thanks in advance for your answers.
Application.xaml
<Application x:Class="TelerikWpfApp13.Application" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:TelerikWpfApp13"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Telerik.Windows.Themes.Material;component/Themes/System.Windows.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Material;component/Themes/Telerik.Windows.Controls.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Material;component/Themes/Telerik.Windows.Controls.Navigation.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Material;component/Themes/Telerik.Windows.Controls.Docking.xaml" /> </ResourceDictionary.MergedDictionaries> <Style TargetType="local:MainWindow" BasedOn="{StaticResource RadWindowStyle}" /> </ResourceDictionary> </Application.Resources></Application>
Application.xaml.vb
Class Application Inherits System.Windows.Application ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException ' can be handled in this file. Protected Overrides Sub OnStartup(e As StartupEventArgs) Call New MainWindow().Show() MyBase.OnStartup(e) End SubEnd Class
MainWindow.xaml
<telerik:RadWindow x:Class="MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Header="MainWindow" Height="300" Width="300"> <Grid> </Grid></telerik:RadWindow>
MainWindow.xaml.vb
Public Class MainWindowEnd Class
I have the following code for generating a stackedbar chart, but the bars are not visible. I have attached the screen shot of chart as well.
Can you please help me point out the issue
Class ChartDatas
Public SalesRep As String
Public LastYearValue As Double
Public CurYearValue As Double
Public BudgetedValue As Double
Public Sub New(ByVal strSalesRep As String, dbLastYearVal As Double, dbCurYearVal As Double, dbBudgetedVal As Double)
SalesRep = strSalesRep
LastYearValue = dbLastYearVal
CurYearValue = dbCurYearVal
BudgetedValue = dbBudgetedVal
End Sub
End Class
Private Sub ShowChart()
chtComparison.SeriesMappings.Clear()
chtComparison.DefaultView.ChartLegend.Visibility = Visibility.Collapsed
chtComparison.DefaultView.ChartArea.DataSeries.Clear()
chtComparison.DefaultView.ChartLegend.UseAutoGeneratedItems = True
Dim SeriesColor As Color
Dim seriesDef As StackedBarSeriesDefinition
Dim ListChartData As New List(Of ChartDatas)
ListChartData.Add(New ChartDatas("Sales Rep1", 100, 200, 300))
ListChartData.Add(New ChartDatas("Sales Rep2", 200, 300, 200))
ListChartData.Add(New ChartDatas("Sales Rep3", 50, 300, 200))
Dim SeriesMap1 As New SeriesMapping() With {.LegendLabel = "Series1"}
SeriesMap1.ItemMappings.Add(New ItemMapping("LastYearValue", DataPointMember.YValue))
SeriesMap1.ItemMappings.Add(New ItemMapping("SalesRep", DataPointMember.XCategory))
'SeriesMap1.SeriesDefinition = New StackedBarSeriesDefinition() With {.ShowItemLabels = True}
SeriesColor = Color.FromRgb(0, 0, 255)
seriesDef = New StackedBarSeriesDefinition With {.ShowItemLabels = True}
seriesDef.Appearance.Fill = New SolidColorBrush(SeriesColor)
SeriesMap1.SeriesDefinition = seriesDef
Dim SeriesMap2 As New SeriesMapping() With {.LegendLabel = "Series2"}
SeriesMap2.ItemMappings.Add(New ItemMapping("CurYearValue", DataPointMember.YValue))
SeriesMap2.ItemMappings.Add(New ItemMapping("SalesRep", DataPointMember.XCategory))
'SeriesMap2.SeriesDefinition = New StackedBarSeriesDefinition() With {.ShowItemLabels = True}
SeriesColor = Color.FromRgb(0, 255, 0)
seriesDef = New StackedBarSeriesDefinition With {.ShowItemLabels = True}
seriesDef.Appearance.Fill = New SolidColorBrush(SeriesColor)
SeriesMap2.SeriesDefinition = seriesDef
Dim SeriesMap3 As New SeriesMapping() With {.LegendLabel = "Series3"}
SeriesMap3.ItemMappings.Add(New ItemMapping("BudgetedValue", DataPointMember.YValue))
SeriesMap3.ItemMappings.Add(New ItemMapping("SalesRep", DataPointMember.XCategory))
SeriesColor = Color.FromRgb(255, 0, 0)
seriesDef = New StackedBarSeriesDefinition With {.ShowItemLabels = True}
seriesDef.Appearance.Fill = New SolidColorBrush(SeriesColor)
SeriesMap3.SeriesDefinition = seriesDef
'chtComparison.DefaultView.ChartArea.AxisY.AutoRange = False
'chtComparison.DefaultView.ChartArea.AxisY.AddRange(0, 1000, 100)
chtComparison.SeriesMappings.Add(SeriesMap1)
chtComparison.SeriesMappings.Add(SeriesMap2)
chtComparison.SeriesMappings.Add(SeriesMap3)
chtComparison.ItemsSource = ListChartData
End Sub

Hi,
I want to change selected text style. I don't have problem with change one word or line but i don't know how to select exact text and change style.
Below is code how i change style selected line.
private void Editor_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
var normalStyle = editor.Document.StyleRepository[HeadingName];
var position = new DocumentPosition(editor.Document.CaretPosition);
position.MoveToCurrentLineStart();
editor.Document.Selection.AddSelectionStart(position);
position.MoveToCurrentLineEnd();
editor.Document.Selection.AddSelectionEnd(position);
editor.ChangeSpanStyle(normalStyle);
}
I don't find any solution to solve this problem.
Any suggestion?
Hi,
I have a problem with bindning command (which is in parent ViewModel) to RadRibbonBackstageItem.
<UserControl x:Class="Project.TelerikEditor"
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:telerikViewModel ="clr-namespace:Project.Modules.TelerikEditor.ViewModel"
xmlns:optionsViewModel="clr-namespace:Project.Modules.Options.ViewModel"
d:DesignHeight="300"
d:DesignWidth="900"
mc:Ignorable="d" >
<UserControl.DataContext>
<telerikViewModel:TelerikEditorViewModel/>
</UserControl.DataContext>
...........
...........
...........
<telerik:RadRibbonBackstageItem Header="Options"
Icon="{telerik:IconResource IconRelativePath=16/new.png,
IconSources={StaticResource IconSources}}"
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Mode=TwoWay}"
Command="{Binding OptionsWindowCommand }""
IsSelectable="false"
>
The Command don't pass to ViewModel.
Any suggestion?

See that over the years there has been many issues with "Index out of range". Is this a general issue that has not been resolved yet? We are starting to use a WPF-application in production and as the load increases we get more and more of these exceptions. Looks like it can happen when we remove and item from a RadObservableCollection (or a ObservableCollection bound to a RadTimeline) and add an item right afterwards. Maybe combined with many entries in the collection.
Is there a workaround?
Here is a callstack:
2017-11-13 16:34:38,704 [106:1] ERROR Tennotech.Hilding.Watchman.App - Unhandled exception: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
2017-11-13 16:34:38,714 [106:1] DEBUG Tennotech.Hilding.Watchman.App - Stacktrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at Telerik.Windows.Controls.ProjectedView`1.ObservableSourceListCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Data.CompositeCollection.OnContainedCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Windows.Data.CollectionContainer.OnContainedCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.Remove(T item)
at Tennotech.Hilding.Watchman.Utilities.MirroredRadList`2.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in C:\BuildAgent\work\a6c0493e3d7aa6b\Source\Tennotech.Hilding.Watchman.Utilities\MirroredRadList.cs:line 193
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.Remove(T item)
at Tennotech.Hilding.Watchman.Framework.Devices.GenericRecordingsSynchronizer.OnRecordingsUpdated(Object sender, ParameterizedEventArgs`1 eventArgs) in C:\BuildAgent\work\a6c0493e3d7aa6b\Source\Tennotech.Hilding.Watchman.Framework\Devices\GenericRecordingsSynchronizer.cs:line 174
at System.Reactive.AnonymousSafeObserver`1.OnNext(T value)
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)
Hi,
There are switches you can use in Word to make the value of a mail merge field change case. Ex. \* FirstCap, \* Upper, \* lower. These don't seem to work correctly in the RichTextBox. I'm adding the fields in code and the values display but the formatting isn't correct. I've taken a template I made in Word and tried that which works correctly in Word but doesn't in the Telerik control so I'm not sure it is my code that is the issue.
Any help would be appreciated.
Troy

Dear Sirs,
I have been working with RadVirtualGrid for WPF and I have found a problem trying to change columns' visibility. I need to do it both from code and from xaml.
I would appreciate any help with it.
I'm working with DataProvider, if this info helps in anyway.
Thanks in advance,
I manually set the color of a Line Series in xaml as Blue. Now in tooltip I also want the same color.
<telerik:LineSeries x:Name=ser1 ItemsSource="{Binding Data}"CategoryBinding="Name" Stroke="Blue" ValueBinding="Value"> <telerik:LineSeries.TooltipTemplate> <DataTemplate> <SatckPanel> <ItemsControls ItemsSource="{Binding}"> <ItemsControl.Template> <DataTemplate> <Ellipse Width="12" Height="12" Fill="Blue"> .... </DataTemplate> </ItemsControl.Template> <ItemsControls> </StackPanel> </DataTemplate> </telerik:LineSeries.TooltipTemplate></telerik:LineSeries>Now my question if we don't use hard code how can we make the colors same?
I've got a TabStripPanel on a RadPaneGroup where sometimes the tabs are only the width of the label and other times they stretch to fill the entirety of the width of the pane. The application is using a pretty dated Telerik version 2014.3.2117.45
Any tips about why this sort of behavior could be manifesting? Thanks.
I am using a ObservableGraphSourceBase with a fairly standard Link model and a HierarchicalNodeViewModel as bases for my Diagram to display.
Within my Diagram declaration in the XAML I am successfully using ShapeStyleSelector property to set the style of my Nodes as they are dropped or read into the diagram.
I am looking for a way to remove and or add Connectors to the Nodes either from the Style via a Setter of some sort or somehow grammatically with a MVVM friendly method.
I have tried from within the HierarchicalNodeView model but it does not have access to the resulting shape it seems. Also the ObservableGraphSourceBase does not seem to have access to the resulting RadDiagramShape which houses the Connectors list.
Please help.
