Telerik Forums
UI for WPF Forum
1 answer
891 views

I have been racking my brains on this.  I am using Gridview with a CollectionView.  All fields are strings but they often contain numbers.  For example, "doctor1_21".  The problem is, the default sorting is not natural sorting. I followed your "Custom Sorting handling Sorting Event" example but can't seem to get it working with the CollectionView. I have six columns that are all strings and any of them should be able to sort naturally.  In a perfect word, I could tell the grid or collectionview to use a custom generic IComparerinst using this dllimport and just plug it in once and any column that is selected would sort ascending and descending using this natural sort.  But I simply cannot get it working.  Could you tell me the best way to implement this?  I have seen some where you have to designate the column name, but I would have to then do that for each column. I will do that if needed, but would be nice to have a more generic method.

 

[SuppressUnmanagedCodeSecurity]
    internal static class SafeNativeMethods
    {
        [DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
        public static extern int StrCmpLogicalW(string psz1, string psz2);
    }

Martin Ivanov
Telerik team
 answered on 14 Apr 2021
5 answers
329 views

Hello.

 

In the case of colorPickerOver, I want to remove the colorpicker borderthickness. I gave the thickness as 0, but it doesn't work.

And I want to fill the Rectangle in the ContentTemplate, but the red top, bottom, left and right gray margins remain.

 

In the case of color picker under, a split button was created to create a ColorPicker, but it is not synchronized with the button next to it.

And can you delete the arrow buttons?

<telerik:RadColorPicker Grid.Row="1"
                        x:Name="colorPickerOver"
                        VerticalAlignment="Center"
                        SelectedColor="{Binding OverColor, Mode=TwoWay}"
                        AutomaticColor="{Binding OverColor}"
                        IsRecentColorsActive="True"
                        NoColorText="Default"
                        Background="Transparent"
                        BorderBrush="Transparent"
                        BorderThickness="0"
                        >
    <telerik:RadColorPicker.ContentTemplate>
        <DataTemplate>
            <Rectangle Width="30" Height="30"
                       Fill="{Binding RelativeSource={RelativeSource Mode=FindAncestor,
                       AncestorType={x:Type telerik:RadColorPicker}},
                       Path=SelectedColor, Converter={StaticResource mediaToBrushConverter}}"/>
        </DataTemplate>
    </telerik:RadColorPicker.ContentTemplate>
 
    <telerik:RadColorPicker.AdditionalContent>
        <ContentControl HorizontalContentAlignment="Stretch" ContentTemplate="{StaticResource MoreColorsTemplate}" Content="{Binding}" />
    </telerik:RadColorPicker.AdditionalContent>
</telerik:RadColorPicker>
 
 
<telerik:RadColorPicker Grid.Row="2"
                        x:Name="colorPickerUnder"
                        VerticalAlignment="Center"
                        SelectedColor="{Binding UnderColor, Mode=TwoWay}"
                        AutomaticColor="{Binding UnderColor}"
                        IsRecentColorsActive="True"
                        NoColorText="Default"
                        Background="Transparent"
                        BorderBrush="Transparent"
                        BorderThickness="0"
                        >
    <telerik:RadColorPicker.ContentTemplate>
        <DataTemplate>
            <telerik:RadDropDownButton Padding="0" Height="30" Width="30" BorderThickness="0" DropDownIndicatorVisibility="Collapsed">
                <telerik:RadDropDownButton.Content>
                    <Rectangle Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=telerik:RadColorPicker}}"
                               Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=telerik:RadColorPicker}}">
                        <Rectangle.Fill>
                            <SolidColorBrush Color="{Binding }"/>
                        </Rectangle.Fill>
                    </Rectangle>
                </telerik:RadDropDownButton.Content>
                <telerik:RadDropDownButton.DropDownContent>
                    <telerik:RadColorSelector />
                </telerik:RadDropDownButton.DropDownContent>
            </telerik:RadDropDownButton>
        </DataTemplate>
    </telerik:RadColorPicker.ContentTemplate>

 

 

 

 

Thanks.

Dilyan Traykov
Telerik team
 answered on 13 Apr 2021
1 answer
146 views

hello,

how can i place legend horizontally in RadCartesianChart which is placed vertically by default.

Thans!

ALi
Top achievements
Rank 1
 answered on 13 Apr 2021
2 answers
154 views
I use a RadNavigationView for my whole application.  I whipped up a context menu for it that I set on it.  But I want my context menu to only appear when the user right-clicks on the "Pane" part of the RadNavigationView -- the part on the left, not for the content part on the right.  How may I do this? 

I tried looking at the visual structure of the control template to see if there is some sort of distinct control representing just the pane whose "ContextMenu" property I could set but I could not spot anything.

I really do not want to redefine the whole ControlTemplate.

Any ideas?
Martin Ivanov
Telerik team
 answered on 12 Apr 2021
2 answers
133 views

when use the LineSeries, the scale position on the X-Axis is different from that scare position when use the BarSeries.

How to customize the position of the x axis scale?

Please help me

ALi
Top achievements
Rank 1
 answered on 12 Apr 2021
2 answers
200 views

I tried this "How to" here: https://docs.telerik.com/devtools/wpf/controls/radnavigationview/how-to/customize-open-close-animations

and it works. However, the animation is applied only to the bit when the nav. view is in compact mode. I need it to go all the way to completely hidden or collapsed.

I opened the xaml theme file 

Telerik.Windows.Controls.Navigation.xaml

from here

C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2021\Themes.Implicit\WPF40\Office2016\Themes

The file is 9000 lines.

On what element instead of "PART_PaneRoot" should I apply the animation so that the complete nav. view is hidden:

<Setter Property="animation:AnimationManager.AnimationSelector">
                        <Setter.Value>
                            <animation:AnimationSelector>
                                <animation:ResizeAnimation AnimationName="ResizePaneAnimation" TargetElementName="PART_PaneRoot" Duration="0:0:3" ResizeMode="Horizontal">
                                    <animation:ResizeAnimation.Easing>
                                        <ExponentialEase EasingMode="EaseOut" />
                                    </animation:ResizeAnimation.Easing>
                                </animation:ResizeAnimation>
                                <animation:SlideAnimation AnimationName="MinimalPaneOpenAnimation" TargetElementName="PART_PaneRoot" Duration="0:0:0.2" PixelsToAnimate="250" Orientation="Horizontal" Direction="In" />
                                <animation:SlideAnimation AnimationName="MinimalPaneCloseAnimation" TargetElementName="PART_PaneRoot" Duration="0:0:0.2" PixelsToAnimate="250" Orientation="Horizontal" Direction="Out"/>
                                
                            </animation:AnimationSelector>
                        </Setter.Value>
                    </Setter>

Vladimir
Top achievements
Rank 1
Veteran
 answered on 09 Apr 2021
10 answers
2.6K+ views

Hello

How can I bind the selected Items from the Combobox when using "AllowMultipleSelection"?

ItemTemplate: <CheckBox Content="{Binding Name}" IsChecked="{Binding RelativeSource={RelativeSource AncestorType=telerik:RadComboBoxItem}, Path=IsSelected}" />

Sincerly

A.Kasar

 

Dinko | Tech Support Engineer
Telerik team
 answered on 09 Apr 2021
1 answer
125 views

    Hi,

 

i need to add some sorting and filtering methods, we were testing to create a grid and put in on the back of the listview so we can use the headers as sort&filter buttons (attached an image to show how we use it).

 

 

the thing is, that we are having like a ton of information, and the grid/listview just hangs when we set the property of the datasource of both lists.

 

how would be the best way to get the filtering and sorting for a listbox?

is there a way to replicate the buttons functionality of the grid on plain buttons? maybe a toolbar?

 

 

thanks for any advice...

 

 

Martin Ivanov
Telerik team
 answered on 09 Apr 2021
6 answers
200 views

 

I am working with the RadRichTextBox Document History, and I noticed that whenever I change the Depth of the Undo stack, or change IsEnabled, the Redo stack is cleared, but the Undo stack is preserved.  Is there any way to preserve the Redo stack during these changes?

For example:

myRadRichTextBox.Document.History.Depth = newDepthLimit;

and

myRadRichTextBox.Document.History.IsEnabled = false;

 

will both clear the Redo stack.  I am trying to prevent a callback command that manipulates a bookmark from adding an element to the history, but if I use either of these methods, I lose the Redo stack.

 

Thanks,

Bob

 

Tanya
Telerik team
 answered on 09 Apr 2021
4 answers
429 views

We have a custom Find/Replace dialog for our RadRichTextBox.  As part of the replacement of text, we have this code:

var startPos = Document.Selection.Ranges.First.StartPosition;
var endPos = Document.Selection.Ranges.First.EndPosition;
 
this.CurrRichTextBox.Document.CaretPosition.MoveToPosition(endPos);
 
this.CurrRichTextBox.Document.Selection.SetSelectionStart(startPos);
this.CurrRichTextBox.Document.Selection.AddSelectionEnd(endPos);
 
StyleDefinition style = new StyleDefinition();
style.CopyPropertiesFrom(this.CurrRichTextBox.CurrentEditingStyle);
 
this.CurrRichTextBox.Delete(false);
this.CurrRichTextBox.Document.Insert(s, style);

 

However, this code uses the deprecated Insert method, and this also causes the history to be cleared.  What is the now correct method for replacing text and maintaining the styling of the text?  Can you please provide a code example?  I have tried to search through documentation, but I could not find any examples.

Thanks, Bob

 

 

 

 

Bob
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 07 Apr 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?