Hi.
I am using Grouping with GroupRenderMode set to Flat and ColumnAggregatesAlignment set to NextToGroupKey.
My problem is that as long as i try i cannot overwrite the ToggleButton style in order to link the foreground to a resource.
Below is what i believe that is the style of the toggle button. Whatever i do, nothing works.
<Style BasedOn="{StaticResource GroupHeaderRowToggleButtonStyle}" TargetType="{x:Type ToggleButton}">
<Setter Property="Control.Template" Value="{StaticResource GroupHeaderRowToggleButtonTemplateCUSTOM}"/>
<Setter Property="Control.HorizontalContentAlignment" Value="Left"/>
<Setter Property="Control.VerticalContentAlignment" Value="Center"/>
<Setter Property="Control.Padding" Value="9 0 0 0"/>
</Style>
I have WPF application RadCartesianChart
This is the code of one of them......
<telerik:RadCartesianChart x:Name="RadChart1" Palette="Windows8" DataContext="{Binding XPath=/Nodes/Node,Source={StaticResource xml_Chart}}">
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis Background="#FFF50000" />
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis />
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.Series>
<telerik:BarSeries CategoryBinding="{Binding XPath=@shortTime}"
ValueBinding="{Binding XPath=Item/@value}"
ItemsSource="{Binding}" ShowLabels="True">
</telerik:BarSeries>
</telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>
=============================================================
I want to work with xml..
<telerik:BarSeries CategoryBinding="{Binding XPath=@shortTime}"
ValueBinding="{Binding XPath=Item/@value}"
ItemsSource="{Binding}" ShowLabels="True">
</telerik:BarSeries>
I can not run it. Help..... Thanks.
Hi
I have big troubles using your framework. Nowadays the docking functionality doesn't work as it should.
If I drag a panel, the panel (and also its border) is not visible while dragging. After docking the panel's titlebar is disappeared.
I'm running the latest version of your framework on visual studio 2017 (15.2).
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 Sub
End 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 MainWindow
End 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