Skip to content

Edit sample code for FillTreeNode on TreeView Class page. #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

XB1-Hexdecimal
Copy link

Edited sample code for FillTreeNode so that items in the node will show the StorageFile/Folder's name vs just "Windows.Storage.StorageFile" type.

Edited sample code for FillTreeNode so that items in the node will show the StorageFile/Folder's name vs just "Windows.Storage.StorageFile".
@mikematteson
Copy link
Contributor

@jwmsft : PR passed acceptance checklist. Please review further and approve/merge if appropriate. Thanks!

@jwmsft
Copy link
Contributor

jwmsft commented May 3, 2018

@XB1-Hexdecimal, thanks for the suggestion. However, the TreeViewNode.Content has to be the complete storage item, not just the name. Otherwise, the rest of the code that relies on the storage item doesn't work.
If you're seeing "Windows.Storage.StorageFile" in the TreeView, check your XAML for the TreeViewItemDataTemplate. This line is what tells the TreeView to display the storage item name: Text="{Binding Content.DisplayName}". The data template needs to be used to correctly display the storage item in the TreeView.

@jwmsft jwmsft closed this May 24, 2018
mijacobs pushed a commit that referenced this pull request Jan 13, 2020
Update .openpublishing.redirection.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants