Telerik Forums
UI for WPF Forum
1 answer
474 views

Can i achieve this type of WPF navigation view in Telerik
With items having GroupBox above them with seperator.

Stenly
Telerik team
 answered on 05 Sep 2022
1 answer
477 views

Hi,

I`m looking for a way to disable the behavior when double-click on the separator between header cells of GridView sets column to adjust its width according to the widths of all currently visible items inside. For example WinForms DataGridView element has ColumnDividerDoubleClick event which allows me to override this behavior. I`m supposing that there should be something similar for GridView

Can you offer any advice?

Eduard

Stenly
Telerik team
 answered on 02 Sep 2022
5 answers
1.3K+ views

Hi,

I am trying to set a method to be called when the selected value of a GridViewComboBoxColumn is changed.

I have read about it on http://docs.telerik.com/devtools/wpf/controls/radgridview/columns/how-to/selectionchanged-comboboxcolumn and tried to implement it.

Here is my code:

mainGridView.AddHandler(RadComboBox.SelectionChangedEvent, new System.Windows.Controls.SelectionChangedEventHandler(OnSelectionChanged));
 
private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
       {
           RadComboBox combo = (RadComboBox)sender;
         
              //  method to call
       }

 

However, I am getting an error:

"Expected a method with 'void OnSelectionChanged(object, SelectionChangedEventArgs signature".

If I get rid of my OnSelectionChanged() method and use the suggestions given, it gives me:

 

public System.Windows.Controls.SelectionChangedEventHandler OnSelectionChanged { get; set; }

 

Can someone please explain why this is not working for me?

Thank you

 

Mario
Top achievements
Rank 1
Iron
Iron
 answered on 01 Sep 2022
1 answer
339 views

Hi

I'm trying to implement RadDocking using DockingPanesFactory as per your examples (like this one).

I have set the PaneSource to a collection of viewmodels e.g. MyViewModel which has a property "Name".

I would like to bind the RadPane header to the "Name" property on the viewmodel. Ideally I would like to have a custom DataTemplate as well but I will settle for just getting the value to update with the ViewModel.

The CreatePaneFromItem method states that "...set any of the DataContext, Header, Title or Content based on the item as well as Style with bindings in the style setters to bind properties of the item to properties of the RadPane" however nothing I've tried seems to work.

I've tried setting a style with the setter properties like this:

var pane = new RadPane();
pane.DataContext = (MyViewModel)item;

Style style = new Style();
style.TargetType = typeof(RadPane);
Setter setter = new Setter();
setter.Property = RadPane.HeaderProperty;
setter.Value = new Binding("Name")
pane.Style = style;

Ideally I'd like to define a DataTemplate in a ResourceDictionary and retrieve and set that to the pane header but I'm not sure how to get that resource in the DockingPanesFactory

Can you offer any advice?

Jason

Stenly
Telerik team
 answered on 01 Sep 2022
1 answer
241 views

Hello,

Is it possible to highlight the default button on a text input dialog? As per: 

Focus is on the text input and I can type, but Save is highlighted and clearly the default when hitting enter. Note that when you tab through to Cancel, Save is no longer highlighted and cancel is - this is the behaviour I would like to implement.

Is there a way of building a dialog with input text and highlighting the default button? For a normal dialog with a message and no text input, setting the button as the FocusedElement suffices, but that will not work for the case with an input.

Cheers

Stenly
Telerik team
 answered on 31 Aug 2022
1 answer
142 views

I am trying to implement function similar to a Acount info in Visual Studio in my App build On RibbonWindow/RibbonView(WPF).

Somethink like this:

Controls do not get focus if the RibbonWindow is not Maximzed. If it is Maximzed they get focus only if mouse enters from bottom side.

Here is small reproducer .

Do I miss some setting in RibnbonWindow/RibbonView? Is it Posible with Telerik Framework?   

 

Stenly
Telerik team
 answered on 30 Aug 2022
1 answer
293 views
I am looking into migrating from an EF backend to an EF core backend which I already have stood up. I seem to be running into an issue though when retrieving data from the front end. I keep getting a bad response payload from the QueryableDataServiceCollectionView when I make my data calls. Is this the collection I should be using or should I be using something different?
Stenly
Telerik team
 answered on 29 Aug 2022
0 answers
284 views

Hi,

Context:

- TextBox in a Popup

- Type using the RadVirtualKeyboard

- Keyboard is set to Japanese

After making sure the TextBox has the popup and then starting to use the Keyboard in Hiragana, the IME suggestions are shown in the top left corner of the screen instead above the TextBox.

Code:

<telerik:RadVirtualKeyboard Margin="10,119,436,58"/>
<Popup Width="100" Height="100" IsOpen="True">
	<StackPanel Background="Red">
		<TextBox></TextBox>
	</StackPanel>
</Popup>

Using the RadVirtualKeyboard:

Using real keyboard or windows intergrade ok screen keyboard:

Is there a way to solve this issue?

Thanks a lot!

Adam
Top achievements
Rank 1
 updated question on 29 Aug 2022
1 answer
280 views

Hi Stenly,

I think this is my last question.
Then I'll will finish my PoC with the Telerik WPF controls.

Now I still know that I have to build my application with the Telerik controls without the embedded XAML.

I have still a problem to run the Docking controls with PRISM 8 without the XAML libs.
With the XAML libs everything ist fine.

My demo projects:

1.) Prism 8 default solution from Brian Lagunas template pack extended by the Telerik solution of using Docking with Prism 7 (from Telerik SDK Samples Browser).
Samles is using the embedded XAML version.
=> Everything works fine
Please have a look at the attached image

2.) Prism 8 default solution from Brian Lagunas template pack extended by the Telerik solution of using Docking with Prism 7 (from Telerik SDK Samples Browser).
Samles isn't (!) the embedded XAML version.
=> The RadDocking header are missing.
Please have a look at the attached image

I think I'm still missing to set any style somewhere.

Thanks 

Dirk

 

 

 

Stenly
Telerik team
 answered on 29 Aug 2022
0 answers
125 views

Is there a 

telerik:ComboBoxToolTipHelper.ShowToolTipOnTrimmedText="True" that works on the RadListBox (not only the RadComboBox)?

So a :ComboBoxToolTipHelper.ShowToolTipOnTrimmedText that works on the RadListBox?

Or another way of achieving it on the RadListBox?

Background:

I tried with a behavior on the row data template but it conflicts with the drag and drop by causing exceptions during the drag and drop (but that would incur another question thread).  I am just writing this to say i tried this avenue.

Right now my RadLitBox looks as follows:

<telerik:RadListBox x:Name="RLB_Source"   
                                        VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
                                        ItemsSource="{Binding SourceSplitList, Mode=TwoWay}" 
                                        SelectionMode="Multiple"  
                                        telerik:ListBoxSelectedItemsBehavior.SelectedItemsSource="{Binding SelectedSourceItems}"
                                        DisplayMemberPath="Name" 
                                        AllowDrop="True" 
                                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                                        ScrollViewer.VerticalScrollBarVisibility="Visible"  
                                        Style="{StaticResource RadListBoxStyle}" 
                                        telerik:ComboBoxToolTipHelper.ShowToolTipOnTrimmedText="True"
                                        ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" 
                                        >

Because of the lines:

                                        telerik:ComboBoxToolTipHelper.ShowToolTipOnTrimmedText="True"
                                        ToolTipService.ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" 

There is a tool tip showing the text of every RadListBox row - and not only where the text is trimmed.

How is the text trimmed? Short answer: i have a telerik:RadListBoxItem style template where text trimming is set as below:  

         <Setter Property="TextTrimming" Value="CharacterEllipsis"></Setter>

Here is the entire control template:

 <ControlTemplate TargetType="{x:Type telerik:RadListBoxItem}">
                    <Border
                                x:Name="Bd"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="true">
                        <ContentPresenter 
                                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                   SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                   >

                            <ContentPresenter.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextTrimming" Value="CharacterEllipsis"></Setter>
                                    <Setter Property="TextWrapping" Value="NoWrap" />
                                    <Setter Property="Text" Value="{Binding Name}" />
                                    <Setter Property="ToolTipService.ToolTip" Value="{Binding Name}" />
                                </Style>
                            </ContentPresenter.Resources>
                        </ContentPresenter> 
                    </Border>  

</ControlTemplate>

Trimming is set on the TextBlock that appears (implicitly by Telerik) in the Contentpresenter.

 

The whole styling is below if relevant for answering the question:

My RadListBox has this style:

 <Style x:Key="RadListBoxStyle" TargetType="{x:Type telerik:RadListBox}">
        <Setter Property="AlternationCount" Value="2" />
        <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
        <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel" />
        <Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource Gray}" />
        <Setter Property="Background" Value="{DynamicResource White}" />
        <Setter Property="SelectionMode" Value="Multiple" />
        <Setter Property="FontSize" Value="12pt" />
        <Setter Property="FontFamily" Value="{StaticResource SourceSansPro-Regular}" />
        <Setter Property="Foreground" Value="{StaticResource Brand Default}" />
        <Setter Property="Margin" Value="0,2,0,0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource DefaultDragDropRadListBoxItemStyle}" /> 
    </Style> 

 

In the the above style there is an ItemContainerStyle.  Here it goes:

        

  <Style x:Key="DefaultDragDropRadListBoxItemStyle" TargetType="telerik:RadListBoxItem">
        <Setter Property="BorderBrush" Value="{StaticResource 'Gray Light'}" />
        <Setter Property="BorderThickness" Value="0,0,0,1" />
        <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" /> 

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadListBoxItem}">
                    <Border
                                x:Name="Bd"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                SnapsToDevicePixels="true">
                        <ContentPresenter 
                                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                   SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                   >

                            <ContentPresenter.Resources>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextTrimming" Value="CharacterEllipsis"></Setter>
                                    <Setter Property="TextWrapping" Value="NoWrap" />
                                    <Setter Property="Text" Value="{Binding Name}" />
                                    <Setter Property="ToolTipService.ToolTip" Value="{Binding Name}" />
                                </Style>
                            </ContentPresenter.Resources>
                        </ContentPresenter> 
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                            <Setter Property="Background" Value="White"></Setter>
                        </Trigger>
                        <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                            <Setter Property="Background" Value="{StaticResource 'Gray Lighter'}"></Setter>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False" />
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsKeyboardFocused" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Light}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsKeyboardFocused" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsKeyboardFocused" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                            <Setter Property="Foreground" Value="White" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                            <Setter Property="Foreground" Value="White" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                                <Condition Property="IsMouseOver" Value="False" />
                                <Condition Property="IsKeyboardFocused" Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                            <Setter Property="Foreground" Value="White" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="False" />
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsKeyboardFocused" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource Brand Secondary}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter> 
    </Style>

 

Paul Schwartzberg
Top achievements
Rank 1
 asked on 29 Aug 2022
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?