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")
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.
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! :)
<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>
<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>
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.
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
Hi,
I'm trying to create a custom component that inherits from RadGanttView, but I'm not sure what the intended workflow is intended to be. Namely to set my columns, rows, taskssource,... up. Here are the steps that I took:
1- Create a "CustomGantt.cs" class that inherits from RadGanttView
2- Create a Generic.xaml file. Within that file, create a style that targets CustomGantt and is based on the default RadGanttViewStyle
3- Add said Generic.xaml file to my App.Resources
Now I can add my CustomGantt control to any of my views, and it does display a Gantt as intended, however, this, is not enough as I've yet to define my columns, rows, source,.... But I'm unsure of what the best way to do that is supposed to be. Should I create a ControlTemplate within my Generic.xaml file in which I add a RadGanttView that I can then set up?
Thanks a lot for your help!