We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SfTreeNavigator back navigation header template

Thread ID:

Created:

Updated:

Platform:

Replies:

125394 Aug 12,2016 07:23 AM Aug 16,2016 08:52 AM UWP 3
loading
Tags: SfTreeNavigator
sergey
Asked On August 12, 2016 07:23 AM

Hi,
Is it possible to modify navigation header style for back navigation part?
there is a xaml snapshot:

<common:SfTreeNavigator 
ItemsSource="{Binding BookmarksPanel.Bookmarks}" 
Style="{StaticResource SfTreeNavigatorStyle1}"
HeaderStyle="{StaticResource TreeHeaderStyle}">
<common:SfTreeNavigator.HeaderTemplate>
<DataTemplate>
<TextBlock Text="Bookmarks" />
</DataTemplate>
</common:SfTreeNavigator.HeaderTemplate>
<common:SfTreeNavigator.ItemTemplate>
<primitives:HierarchicalDataTemplate ItemsSource="{Binding Bookmarks}">
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Header}" TextWrapping="Wrap" />
</StackPanel>
</DataTemplate>
</primitives:HierarchicalDataTemplate>
</common:SfTreeNavigator.ItemTemplate>
</common:SfTreeNavigator>

so, on first level I see "Bookmarks",
on next level header usesItemTemplate, is it possible to has different template for item and back navigation part?
Thank you

Sugapriya Mariappan [Syncfusion]
Replied On August 15, 2016 12:40 AM

Hi Sergey,

Thank you for contacting Syncfusion Support.

HeaderTemplate property of SfTreeNavigator control used to apply customized template for Header.To achieve your requirement of applying different template for item and back navigation part, we suggest you to use HierachicalDataTemplate.On using this HiearchicalDataTemplate, Sub items can be viewed and you can edit the template for each level in this.

Sample:SfTreeNavigatorUWPSample

If your requirement is different from the sample, please provide more information about your requirement.

Regards,
M.Sugapriya


sergey
Replied On August 15, 2016 09:21 AM

Thank you for your answer,
But it seems that this approach works with known levels of hierarchy, or am I wrong?
I've tried your sample with 4 levels deep and it seems that I can navigate only to 2nd level, also 1th level has different style than 2nd
Our customer what to have next:
on navigation level back button (<-) + trimmed text if not fit a size
on items level (from 1th - N deep level) - text with wrap

the deep level is unknown (something like table of content for a book with sub levels)

Thanks

Sugapriya Mariappan [Syncfusion]
Replied On August 16, 2016 08:52 AM

Hi Sergey,

Thank you for contacting Syncfusion Support.

“Query #: on navigation level back button (<-) + trimmed text if not fit a sizeon items level (from 1th - N deep level) - text with wrap”

We have prepared a sample with four levels.In this sample, we have set the TextWrapping for the SfTreeNavigatorItem in the ItemTemplate of the SfTreeNavigator.

As the Template which we are applying is common for both TreeNavigatorItem and TreeNavigatorHeaderItem(near back button), we cannot apply TextWrapping and TextTrimming separately.

Please download the sample form the below link
Sample:SfTreeNavigatorUWPSample

Regards,
M.Sugapriya


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;