Telerik Forums
UI for WPF Forum
1 answer
288 views

Hey,

I downloaded the demo code and created a control called "RadRichTextBoxToolBarControl". This control contains many controls:  RadRibbonComboBox to change font Family and Size, FormattingColorPicker to change text color, etc.

The DataContext of the control is RadRichTextBox, Path=Commands.

This way allowed to have all the functionality with zero code behind.

The RichTextBox gets the style according to the RadRichTextBoxToolBarControl as expected.

The problem is that after I wrote some text and change the text style (font family, size, color) then I should click the end of the line to have the focus on the RichTextBox and start typing.

The problem is that the new text uses the style of the text to the left of the cursor instead of the styling configured in the toolbar. 
I would like to have the same behavior as word. While typing or selecting text, the style should be inherited from the toolbar options.

Unfortunately, I can't share my code but I think that the explanation is enough.

Vladislav
Telerik team
 answered on 26 Oct 2022
1 answer
103 views

I want show something like the Telerik ExplorerControl in folder-browser mode.  But in my control, I need certain folders are shown with a custom icon /view that will reflect the contents of the folder.   I love all the tree-view functionality of the control and do not want to re-invent all of that.  but I need the main pane to show my view, not Telerik's

Basically when ever a folder contains a file named "scan.yaml" and "image01.png", I want my UI to show the contents of "image01.png" as the folder instead of the regular folder icon.  (My code actually does some background processing to overlay other information on that image sometimes but that's not important for now)

Is this possible or would I need to use my own Tree View?

I thought of a few approaches.  Can you tell me which, if any of these are feasible and which would work best?

1.  Use a ControlTemplate that totally replaces the contents of`PART_MainPane` which is currently this

<historyNavigationPane:FileBrowserTabControl x:Name="PART_MainPane"
        Grid.Column="2"
        SelectedIndex="{Binding ElementName=PART_LayoutConfigurator, Path=SelectedIndex}"
        ItemsSource="{Binding Layouts}"
        ContentTemplateSelector="{StaticResource MainPaneTabControlTemplateSelector}">

 Is it feasible to use a style for ExplorerControl with a ControlTemplate  that completely tears that out and replaces that `FileBrowserTabControl` it with my own control? 

2. Use a ControlTemplate that does not show the MainPane at all and just puts my custom control next to the existing tree view.  My control could then key off its sibling's `CurrentDirectory` property

3. Try to find some way to customize how FileBrowserTabControl shows the folder contents as I described

Would any of these work.

I've attached an image of part of what my control looks like in large-icon mode.  It shows two regular folders and two of the "special" folders that I mentioned

(Also I looked for a question tag for ExplorerControl but could not find one so I tagged "General Discussion")


Dilyan Traykov
Telerik team
 answered on 26 Oct 2022
1 answer
177 views

I have TreeLinesVisibility="Visible" on my TreeListView, as in the XAML snippet below.

<telerik:RadTreeListView x:Name="NEWCollectionControl" Grid.Row="1" EnableLostFocusSelectedState="False" ShowColumnHeaders="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadOutlookBar}}, Path=DataContext.Controller.ShowTreeHeader, Mode=TwoWay}" GridLinesVisibility="None" RowIndicatorVisibility="Collapsed" SelectionUnit="FullRow" ColumnWidth="*" TreeLinesVisibility="Visible" AutoExpandItems="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadOutlookBar}}, Path=DataContext.Controller.TreeViewAutoExpand, Mode=TwoWay}" AutoGenerateColumns="False" ItemsSource="{Binding Items}" IsExpandedBinding="{Binding IsExpanded, Mode=TwoWay}" SelectedCellsChanging="NEWCollectionControl_SelectedCellsChanging" DataLoaded="NEWCollectionControl_DataLoaded" Initialized="NEWCollectionControl_Initialized" SelectionChanged="NEWCollectionControl_SelectionChanged">
    <telerik:RadTreeListView.ChildTableDefinitions>
        <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}" />
    </telerik:RadTreeListView.ChildTableDefinitions>
    <telerik:RadTreeListView.Columns>
        <telerik:GridViewImageColumn IsVisible="{Binding Controller.UseTreeViewIcons}" DataMemberBinding="{Binding Image}" TextAlignment="Left" ImageHeight="12" ImageWidth="{Binding ImageWidth}" />
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Translation.CurrentTranslation}" MinWidth="200" Header="{Binding Controller.PSRDictionary.Collection.CurrentTranslation}" />
    </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

However, the GridViewImageColumn, which was added later in order to allow for some icons to the side of the TreeListView, is causing elements of the 3rd hierarchy level onwards to not have those lines. The behaviour can be seen in the image below, and it will happen regardless if the column is visible or not. 

I have tried to mess with many of the properties on these elements but to no success.

 

 

Stenly
Telerik team
 answered on 25 Oct 2022
1 answer
103 views

Hello,

I'm generating columns dynamically, I have a RadGridView with LeftFrozenColumnCount = 1.
It is possible that my grid becomes not visible (for exemple, when switching tab in a TabControl).

But the columns my grid is bound to can still be re-generated.
It seems that way, the grid doesn't update the IsFrozen property of the columns.

I assume this is because the CoerceValueCallback for this propery checks for null on each column.DataControl and if so, returns the base value for the property, which in my case is always equal to false, because I've just generated the columns and they didn't get to the view yet.

I rely on this IsFrozen property to do some custom filtering logic, and it doesn't execute properly because the IsFrozen property isn't updated reliably.

I don't have any issue when coming back to the grid, because the IsFrozen property is then updated correctly: the real problem is in that this property isn't updated properly if the grid is not visible and we change the columns it's bound to.

What can I do to work around this?

Thanks! :)

Petar Mladenov
Telerik team
 answered on 24 Oct 2022
1 answer
159 views
I have a Telerik RadSplitButton defined as follows:
<telerik:RadSplitButton Style="{StaticResource MySplitButtonStyle}" Content="Some Text" DropDownHeight="150">
  <telerik:RadSplitButton.DropDownContent>
    <ListBox>
      <ListBoxItem Content="Item 1" />
      <ListBoxItem Content="Item 2" />
      <ListBoxItem Content="Item 3" />
      <ListBoxItem Content="Item 4" />
      <ListBoxItem Content="Item 5" />
    </ListBox>
  </telerik:RadSplitButton.DropDownContent>
</telerik:RadSplitButton>
I am using the NoXaml version of the assemblies and so I have styled the split button based on a style that I got from a Telerik theme (Telerik.Windows.Controls.xaml file).  The style contains the following:
<Style x:Key="MySplitButtonStyle" TargetType="telerik:RadSplitButton">
  ...
  <Setter Property="ButtonPartStyle" Value="{StaticResource MyButtonStyle}"/>
  <Setter Property="IsToggle" Value="False"/>
  <Setter Property="IsTabStop" Value="True" />
  <Setter Property="IsOpen" Value="False" />
  <Setter Property="CloseOnPopupMouseLeftButtonUp" Value="True" />
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="telerik:RadSplitButton">
        ...
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

When I use the Tab-Navigation to cycle through the controls on the page (because I have no mouse for example), this RadSplitButton gets the focus as expected.  So far so good.  However, when I then try to interact with this RadSplitButton using the keyboard (because I have no mouse) I can't seem to get the main button to activate and I cannot change the selected item in the drop-down.

When the RadSplitButton has focus:

- When I press the Spacebar or the Enter key, the drop-down opens but no events fires.  I would expect the button to get clicked or the Activate event to get fired.

- When I press the down-arrow key the drop-down opens and shows me the list box but the list box does not get keyboard focus and so I cannot navigate (using keys).  I cannot select an item from the drop-down as I can with a normal list box.

Can you suggest some changes that might help me to fix this?  Ideally, I would like to do this from the style and not have to add event handlers to every SplitButton.

Thanks
Vladimir Stoyanov
Telerik team
 answered on 24 Oct 2022
0 answers
145 views
i want to add a cubic bezier curve to a canvas with a start point and an end point, i cant do it in the xaml it has to be in the c# because the points are constantly changing
Conrad
Top achievements
Rank 1
 asked on 22 Oct 2022
4 answers
271 views
Hi, is there a way to change the data type returrned by the NumericUpDown's value? I need it to be int, not double, because it's mapped to a database field which has an int type, and I'm getting a conversion error. Thanks.
alex
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 22 Oct 2022
0 answers
211 views
I have a RadGridview where I select 3 cells and I paste 5 cells copied from excel,notepad,etc., now i have 2 new rows added(empty rows acting as new row). I tried setting insertnewrows=false and also allselectedcells but no use. help would be appreciated.  
Shivam
Top achievements
Rank 1
Iron
 asked on 21 Oct 2022
1 answer
174 views

I want to drag and drop files from a RadGridView to Outlook. Each line in my grid represents an Invoice including PDF file.
My users want to drag items into an Outlook message in order to send the PDF as attachment. (one or more)

I've been trying to search for a way to do it, but I can only find examples to drag-and-drop within the same application.

Martin Ivanov
Telerik team
 answered on 21 Oct 2022
1 answer
131 views

Is there a way to have a custom event on a GridViewHyperlinkColumn and disable the primary default behavior?

Currently I can add a handler to the Hyperlink.Click event, but the control seems to always have the default click event enabled.

For example, if my custom event opens a link, then the above behavior ends up opening duplicate links.

 

Thanks,

Nelson

Stenly
Telerik team
 answered on 19 Oct 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
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?