Telerik Forums
UI for WPF Forum
1 answer
111 views

Hi all,

 

I have a chart : RadCarteisaonChart defined like this :
Is possible to change the Axis (X and Y) by Logarithmics Axis at runtime ?

Regards


 <telerik:RadCartesianChart Grid.Column="0" Margin="0,30,0,30" Foreground="{StaticResource DarkGray}">
                            <telerik:RadCartesianChart.HorizontalAxis>
                                <telerik:LinearAxis x:Name="hLinearAxis" ShowLabels="True">
                                </telerik:LinearAxis>
                                <!--<telerik:LogarithmicAxis x:Name="hLogarithmAxis" ShowLabels="True">
                                </telerik:LogarithmicAxis>-->                                
                            </telerik:RadCartesianChart.HorizontalAxis>
                            <telerik:RadCartesianChart.VerticalAxis>
                                <telerik:LinearAxis x:Name="vAxis"/>
                            </telerik:RadCartesianChart.VerticalAxis>
                            <telerik:ScatterPointSeries x:Name="ChartCurve" XValueBinding="Concentration" YValueBinding="OpticalDensity" Foreground="{StaticResource DarkGray}">
                                <telerik:ScatterPointSeries.PointTemplate>
                                    <DataTemplate>
                                        <Ellipse Width="10" 
                                                Height="10" 
                                            Fill="{StaticResource ElectricBlue}"/>
                                    </DataTemplate>
                                </telerik:ScatterPointSeries.PointTemplate>
                            </telerik:ScatterPointSeries>
                            <telerik:RadCartesianChart.Grid>
                                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
                            </telerik:RadCartesianChart.Grid>
                            <telerik:RadCartesianChart.Annotations>
                                <telerik:CartesianCustomLineAnnotation Stroke="Red" StrokeThickness="2" HorizontalFrom="0" HorizontalTo="{Binding CONCMAX}" VerticalFrom="{Binding A}" VerticalTo="{Binding YMAX}" />
                            </telerik:RadCartesianChart.Annotations>
                        </telerik:RadCartesianChart>

Stenly
Telerik team
 answered on 17 Sep 2021
1 answer
253 views

Hello,

I had to create a template of the grid filtering control so I could replace the text entry control with a Watermark text entry control. Since I am not changing the functionality of the control, is it possible to get access to the code behind so I don't have to rewrite it?

Also, can you point to a good reference on the object model of the column filtering system so I can understand it better? 

Thanks,
Jack Allread

 

Dilyan Traykov
Telerik team
 answered on 15 Sep 2021
1 answer
292 views

Hi Telerik team,

We are having a rad-combo box control implemented in a pop up, where the user will be able to select one item from the list based on the Alphabets entered by the User.

Let us consider the user is entering 'OLI' in the combo box
The drop down list appears for the entered Alphabets, but when the user tries to add more Alphabet to it, already entered 'OLI' gets cleared and the user entered new alphabets is appearing, which should not.

I have attached the image(RadCombo box Focus Issue.jpeg)
We found that as soon as the user stops entering the Alphabet, the control selects the whole Alphabets already entered(Blue Selection). - which should not and the user have to press the Right Arrow to get the focus to the last alphabet to add more alphabet the existing text.

Any Possibility to change the behavior so that when the user stops entering the alphabet the focus is set next of the last character entered.

The Xaml Code Used is

<telerik:RadComboBox
                    Name="NameCombo"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    HorizontalContentAlignment="Left"
                    BorderBrush="#F1F1F1"
                    EmptyText="Type to Search Name"
                    IsDropDownOpen="{Binding IsDropDownOpen, Mode=TwoWay}"
                    IsEditable="True"
                    IsTextSearchCaseSensitive="False"
                    Text="{Binding NameSearchText, Mode=TwoWay}"
                    TextSearchMode="Contains">
                    <telerik:RadComboBoxItem>
                        <telerik:RadComboBoxItem.Template>
                            <ControlTemplate>
                                <Grid>
                                    <telerik:RadBusyIndicator BusyContent="Loading..." IsBusy="{Binding IsNameLoading}">
                                        <telerik:RadGridView
                                            Width="455"
                                            MaxHeight="150"
                                            behavior:ControlEventsCommand.RadGridSelectionChangedEvent="{Binding NameSelectionChangedCommand}"
                                            AutoGenerateColumns="False"
                                            CanUserFreezeColumns="False"
                                            CanUserInsertRows="False"
                                            CanUserResizeColumns="False"
                                            CanUserSortColumns="False"
                                            IsFilteringAllowed="False"
                                            IsReadOnly="True"
                                            ItemsSource="{Binding NameList}"
                                            RowIndicatorVisibility="Collapsed"
                                            ScrollViewer.VerticalScrollBarVisibility="Auto"
                                            SelectedItem="{Binding SelectedName, Mode=OneWayToSource}"
                                            ShowGroupPanel="False">
                                            <telerik:RadGridView.Columns>
                                                <telerik:GridViewDataColumn
                                                    Width="450"
                                                    Header="Name"
                                                    HeaderCellStyle="{StaticResource NameClassHeader}">
                                                    <telerik:GridViewColumn.CellTemplate>
                                                        <DataTemplate>
                                                            <TextBlock
                                                                Text="{Binding Name}"
                                                                TextTrimming="WordEllipsis"
                                                                ToolTip="{Binding Name}"
                                                                ToolTipService.IsEnabled="True"
                                                                ToolTipService.ShowOnDisabled="False">
                                                                <TextBlock.Style>
                                                                    <Style TargetType="TextBlock">
                                                                        <Style.Triggers>
                                                                            <DataTrigger Binding="{Binding Name}" Value="">
                                                                                <Setter Property="IsEnabled" Value="False" />
                                                                            </DataTrigger>
                                                                        </Style.Triggers>
                                                                    </Style>
                                                                </TextBlock.Style>
                                                            </TextBlock>
                                                        </DataTemplate>
                                                    </telerik:GridViewColumn.CellTemplate>
                                                </telerik:GridViewDataColumn>
                                            </telerik:RadGridView.Columns>
                                        </telerik:RadGridView>
                                    </telerik:RadBusyIndicator>
                                </Grid>
                            </ControlTemplate>
                        </telerik:RadComboBoxItem.Template>
                    </telerik:RadComboBoxItem>
                </telerik:RadComboBox>

Thanks In Advance!

Regards,

KishoreKumar

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Sep 2021
1 answer
199 views

Hi,

I want to call different functions based on RadSaveFileDialog's FilterIndex but I'm having trouble getting the correct FilterIndex when trying to save a file. The filter shows up correctly on the dialog but whenever I click Save button, the dialog's FilterIndex is 0, instead of the expected values 1 or 2.

Using the same code, FilterDialog correctly gets set with Windows SaveFileDialog. Is there a known issue with this or could this be related to not setting the Owner property?

Thanks!

Vladimir Stoyanov
Telerik team
 answered on 15 Sep 2021
1 answer
135 views

I have setup a diagram using the Sugiyama Layout.  I have added  50  Rounded Rectangle shapes (without connectors)  in code behind.  I  am using the  following code to size the shapes to fit the diagram:

 Rect allShapesBounds = Diagram1.Shapes.GetEnclosingBounds();
 Rect inflatedRect = allShapesBounds.InflateRect(10, 10, 10, 10);
 Diagram1.BringIntoView(inflatedRect, false);
When I use the mouse to drag a shape into a different position, I would like all the other shapes compensate and adjust to :
  1. Allow the moved shape to fit in without over lapping
  2. Adjust to fill the empty spot

In the attached image Before.png you will see the 50 shapes all sized and lined up correctly.  The After.png shows I moved the shape with the #1 is overlapping the others and there is a space where it used to reside.  I tried calling the above code in the drag event handler but that returns the moved shape to it's original position.  What do I need to do to achieve the results listed above?

 
Martin Ivanov
Telerik team
 answered on 15 Sep 2021
1 answer
971 views

Hi Team ,

 

I am new to WPF , we are using RadGridView to load data from View Model in WPF by using C# .

if selected a row and data grid refreshed or load with new items(rows) then selected row position is moving either up or down to row .

here vertical scroll bar position changed .

 

reproduce steps

1. Select any of the row from the grid.

2. Wait for the Lobby updates to happen and new tables get added to the grid

 

Expected:

  • The select state should be anchored to its grid position, updates should happen above and below the selected row (the selected row will not move)

XAML : 

<telerik:RadGridView x:Name="PokerX_CashGames_RadGridView_LobbyGrid" ItemsSource="{Binding CashGamesCollection, UpdateSourceTrigger=PropertyChanged}"
                       SelectedItem="{Binding SelectedTableItem, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged}"  Loaded="OnDataGridLoaded" Unloaded="OnDataGridUnloaded"
                       AutomationProperties.AutomationId="PokerX_CashGames_RadGridView_LobbyGrid">
        <i:Interaction.Behaviors>

xaml.cs

private void OnDataGridDataUpdated(object datagridUpdateEventArgs)
        {
            if (datagridUpdateEventArgs is DataGridUpdateEvent eventArgs && this.PokerX_CashGames_RadGridView_LobbyGrid != null)
            {
                double scrollOffset = (eventArgs.CurrentIndexOfSelectedRecord - eventArgs.PreviousIndexOfSelectedRecord) * this.PokerX_CashGames_RadGridView_LobbyGrid.RowHeight;
                GridViewScrollViewer scrollViewer = this.PokerX_CashGames_RadGridView_LobbyGrid.ChildrenOfType<GridViewScrollViewer>().First();
                if (scrollViewer != null)
                {
                    double verticalOffset = scrollViewer.VerticalOffset;
                    scrollViewer.ScrollToVerticalOffset(verticalOffset + scrollOffset);

                    
                }
            }
        }

Please help me how can i fix this .

Martin Ivanov
Telerik team
 answered on 15 Sep 2021
1 answer
211 views
Hi I just installed a MS Security Update.

Windows 10 KB5005033 -  https://support.microsoft.com/en-au/topic/august-10-2021-kb5005033-os-builds-19041-1165-19042-1165-and-19043-1165-b4c77d08-435a-4833-b9f7-e092372079a4

Now I get this ugly Telerik Error.  any ideas?  thx



Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at Telerik.Windows.Controls.RadComboBoxAutomationPeer.RaiseSelectionEvents(SelectionChangedEventArgs e) at System.Windows.Controls.Primitives.Selector.SelectionChanger.End() at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection) at System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) 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.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) at Flom2K18.Truckbook.btnRepeat_Click(Object sender, RoutedEventArgs e) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at Telerik.Windows.Controls.RadButton.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonDown(MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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) 
Dilyan Traykov
Telerik team
 answered on 14 Sep 2021
1 answer
135 views

Hi Telerik Team,

I have some few question regarding telerik:RadMaskedDateTimeInput Control

telerik:RadMaskedDateTimeInput:
I have a telerik:RadMaskedDateTimeInput Control which has a default date as 08/09/21. We want to change the date to 31/10/2021.
When the user enters 31 in the date field, the control is taking the month into consideration and changing the date automatically to 30 since there is no 31 in the month of September
So first I have to change the month field and then date field to get the new proposed date 31/10/2021.
Any Possibility to change the behaviour.

The property I have used is 
        <telerik:RadMaskedDateTimeInput
          Culture="{x:Static globalization:CultureInfo.InvariantCulture}"
          DataContext="{Binding Path=UiArrivalDateObject, Mode=TwoWay}"
          FontSize="10"
          InputBehavior="Replace"
          IsClearButtonVisible="False"
          Mask="dd/MM/yy HH:mm"
          PreviewKeyDown="RadMaskedDateTimeInput_PreviewKeyDown"
          SectionsNavigationMode="Cycle"
          SelectionOnFocus="CaretToBeginning"
          TextMode="PlainText"
          UpdateValueEvent="PropertyChanged"
          Value="{Binding Path=LiveDateBerth, Mode=TwoWay, UpdateSourceTrigger=LostFocus, Converter={StaticResource DateTimeOffsetToDateTimeConverter}}">
</telerik:RadMaskedDateTimeInput>

Thanks In Advance
Regards,
Kishore Kumar

                          
Dinko | Tech Support Engineer
Telerik team
 answered on 14 Sep 2021
1 answer
247 views

I'm using a RadGrid / GridView and the performance is horrible. 

I'm not doing anything fancy. I have 15 columns and about 2000 rows 

In HTML, this is piece of cake, blazing fast and 200hz when scrolling. 

in WPF this just sucks at 5 fps and a very laggy experience.

I'm reading through the optimization docs and there are somewhat 50+ nobs to turn in the hope that it makes a difference. 

 

My humble request is therefore : Some Telerik Application Analyzer that scans through the program and finds all the problematic settings or constructions that hurt performance. 

I guess it should be pretty simple to look at container element properties and instance properties of the RadGrid and tell the user which ones are hurting the performance or disabling scroll virtualization... coz i have no idea. 

PS. One of the performance tips are completely impossible to correct: 

  • Placing RadGridView in panels/controls which measure it with infinity disables the UI virtualization mechanism of the control and can greatly impact performance when dealing with large amounts of data. Examples of such panels include ScrollViewerStackPanel and Grid with a definition with Width/Height set to Auto.

MANY UI-elements use Grid in their internal workings: 

MainWindow - uses a Grid with height/width = auto
AdornerDecorator - uses a Grid with height/width = auto
Rootgrid - uses a Grid with height/width = auto
TabControl - uses a Grid with height/width = auto
TabItem - uses a Grid with height/width = auto
Border (Contentpresenter) - uses a Grid with height/width = auto
RadBusyIndicator - uses a Grid with height/width = auto

So how the heck am i supposed to correct all those problems without completely going insane and create a stinking pile of code ? 

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Sep 2021
0 answers
140 views

I want to draw a custom MajorLinesVisibility XY. 

MajorLinesVisibility Not using XY, instead, when CategoricalAxis' PlotMode is BetweenTicks,

I want to draw vertical lines between items.
Please refer to the referenced image.

 

<telerik:RadCartesianChart x:Name="chart1" Palette="Flower" Margin="10">
            <telerik:RadCartesianChart.HorizontalAxis>
                <!--PlotMode="BetweenTicks"-->
                <telerik:CategoricalAxis  x:Name="catAxis" PlotMode="BetweenTicks"  />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis x:Name="verticalAxis" />
            </telerik:RadCartesianChart.VerticalAxis>

           <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
            </telerik:RadCartesianChart.Grid>
            <telerik:RadCartesianChart.Annotations>
                <telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=catAxis}"
                   Value="B"   Stroke="Red"   StrokeThickness="5"       />
            </telerik:RadCartesianChart.Annotations>

yoochul
Top achievements
Rank 1
 updated question on 14 Sep 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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?