Hi,
I've noticed the gallery items are scrollable when many items are placed. I was wondering how to make the gallery sections/categories scrollable as well. Sometimes in our application we have so many categories they don't fit.
Kind regards
3 Answers, 1 is accepted
1
Hi Joost,
To achieve your requirement you can extract the ControlTemplate of the RadDiagramToolBox control and wrap the ItemsPresenter that shows the categories in a ScrollViewer. Here is an example in code:
I hope that helps.
Regards,
Martin Ivanov
Progress Telerik
To achieve your requirement you can extract the ControlTemplate of the RadDiagramToolBox control and wrap the ItemsPresenter that shows the categories in a ScrollViewer. Here is an example in code:
<!-- OTHER XAML HERE -->
<
Grid
x:Name
=
"hideablePart"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
Grid.RenderTransform
>
<
TranslateTransform
/>
</
Grid.RenderTransform
>
<
Border
BorderBrush
=
"{TemplateBinding BorderBrush}"
BorderThickness
=
"1,0,0,1"
Background
=
"{TemplateBinding Background}"
Grid.Row
=
"1"
Grid.RowSpan
=
"2"
/>
<
Border
BorderBrush
=
"#FF848484"
BorderThickness
=
"1,1,0,1"
Background
=
"{TemplateBinding HeaderBackground}"
>
<
Border
BorderBrush
=
"#FFB5B5B5"
BorderThickness
=
"1,1,0,1"
>
<
ContentControl
ContentTemplate
=
"{TemplateBinding TitleTemplate}"
Content
=
"{TemplateBinding Title}"
Foreground
=
"{TemplateBinding Foreground}"
FontSize
=
"11"
FontFamily
=
"Portable User Interface"
HorizontalAlignment
=
"Left"
Margin
=
"{TemplateBinding Padding}"
VerticalAlignment
=
"Center"
/>
</
Border
>
</
Border
>
<
ScrollViewer
Margin
=
"2,3"
Grid.Row
=
"1"
>
<
ItemsPresenter
/>
</
ScrollViewer
>
<
telerik:RadButton
x:Name
=
"CloseButton"
InnerCornerRadius
=
"0"
Grid.Row
=
"2"
Style
=
"{TemplateBinding CloseButtonStyle}"
>
<
telerik:RadButton.ToolTip
>
<
ToolTip
Content
=
"Close"
/>
</
telerik:RadButton.ToolTip
>
</
telerik:RadButton
>
</
Grid
>
<!-- OTHER XAML HERE -->
Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Benedikt
commented on 09 May 2021, 03:59 PM
Top achievements
Rank 1
Iron
@Martin could you add a complete example of this? E.g. a kind of complete RadDiagramToolbox example. Thanks a lot!
Martin Ivanov
commented on 12 May 2021, 08:31 PM
Telerik team
I've added a new answer in this thread with an attached project. I hope it helps.
0
Joost
Top achievements
Rank 1
answered on 13 Apr 2018, 03:22 PM
Thanks Martin, it works great!
1
Hello,
I've attached a small example showing the approach with the custom RadDiagramToolBox ControlTemplate. The template is based on the Fluent theme's template.
Regards,
Martin Ivanov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Benedikt
commented on 13 May 2021, 08:56 AM
Top achievements
Rank 1
Iron
Perfect, works great. Thanks a lot!