Telerik Forums
UI for WPF Forum
1 answer
9 views

Hi,

Many Chinese characters are displayed incorrectly when set theme for  GridView.

The display is correct when no theme is set.

I uploaded an app. It is displayed correct in left, and incorrectly in right.

天安 门  display as  
包    display as  

Martin Ivanov
Telerik team
 answered on 20 Sep 2021
0 answers
9 views
                           

Hi, I can see the map in preview, but not when I debug. Does anyone know why?

 

<telerik:RadMap x:Name="radMap" ZoomLevel="11" Center="35.675,+51.35" >
                         <telerik:RadMap.Provider>
                            <telerik:EmptyProvider />
                        </telerik:RadMap.Provider>
                        <telerik:VisualizationLayer>
                                    <telerik:VisualizationLayer.Reader>
                                <telerik:AsyncShapeFileReader DataSource="/WpfApp5;component/shp9/tt.dbf"
                                            Source="/WpfApp5;component/shp9/tt.shp">
                                </telerik:AsyncShapeFileReader>
                                    </telerik:VisualizationLayer.Reader>
                                </telerik:VisualizationLayer>
</telerik:RadMap>

ALI
Top achievements
Rank 1
 asked on 18 Sep 2021
1 answer
6 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
9 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
10 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
Telerik team
 answered on 15 Sep 2021
1 answer
14 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
9 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
18 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
14 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
12 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
Telerik team
 answered on 14 Sep 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran