{"action":"closed","issue":{"url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1547","repository_url":"https://api.github.com/repos/Windows-XAML/Template10","labels_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1547/labels{/name}","comments_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1547/comments","events_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1547/events","html_url":"https://github.com/Windows-XAML/Template10/issues/1547","id":252276111,"number":1547,"title":"AppBarButton in PageHeader","user":{"login":"dg2k","id":14026786,"avatar_url":"https://avatars3.githubusercontent.com/u/14026786?v=4","gravatar_id":"","url":"https://api.github.com/users/dg2k","html_url":"https://github.com/dg2k","followers_url":"https://api.github.com/users/dg2k/followers","following_url":"https://api.github.com/users/dg2k/following{/other_user}","gists_url":"https://api.github.com/users/dg2k/gists{/gist_id}","starred_url":"https://api.github.com/users/dg2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg2k/subscriptions","organizations_url":"https://api.github.com/users/dg2k/orgs","repos_url":"https://api.github.com/users/dg2k/repos","events_url":"https://api.github.com/users/dg2k/events{/privacy}","received_events_url":"https://api.github.com/users/dg2k/received_events","type":"User","site_admin":false},"labels":[{"id":197692292,"url":"https://api.github.com/repos/Windows-XAML/Template10/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"dg2k","id":14026786,"avatar_url":"https://avatars3.githubusercontent.com/u/14026786?v=4","gravatar_id":"","url":"https://api.github.com/users/dg2k","html_url":"https://github.com/dg2k","followers_url":"https://api.github.com/users/dg2k/followers","following_url":"https://api.github.com/users/dg2k/following{/other_user}","gists_url":"https://api.github.com/users/dg2k/gists{/gist_id}","starred_url":"https://api.github.com/users/dg2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg2k/subscriptions","organizations_url":"https://api.github.com/users/dg2k/orgs","repos_url":"https://api.github.com/users/dg2k/repos","events_url":"https://api.github.com/users/dg2k/events{/privacy}","received_events_url":"https://api.github.com/users/dg2k/received_events","type":"User","site_admin":false},"assignees":[{"login":"dg2k","id":14026786,"avatar_url":"https://avatars3.githubusercontent.com/u/14026786?v=4","gravatar_id":"","url":"https://api.github.com/users/dg2k","html_url":"https://github.com/dg2k","followers_url":"https://api.github.com/users/dg2k/followers","following_url":"https://api.github.com/users/dg2k/following{/other_user}","gists_url":"https://api.github.com/users/dg2k/gists{/gist_id}","starred_url":"https://api.github.com/users/dg2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dg2k/subscriptions","organizations_url":"https://api.github.com/users/dg2k/orgs","repos_url":"https://api.github.com/users/dg2k/repos","events_url":"https://api.github.com/users/dg2k/events{/privacy}","received_events_url":"https://api.github.com/users/dg2k/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-08-23T13:07:54Z","updated_at":"2018-02-19T18:44:45Z","closed_at":"2018-02-19T18:44:45Z","author_association":"CONTRIBUTOR","body":"@kfchengkf mentioned an issue with **AppBarButton** in PageHeader (see #1526). I noticed this problem for over a year with the **Anniversary Update** early August 2016. It was at the same time I also noticed another platform related issue with regard to a 4\" Emulator -- see issue #1178.\r\n\r\n## The Problem\r\n\r\nThe problem is with the **ContentControl** in a Grid control (with `x:Name=\"ContentRoot\"`) in PageHeader's control template xaml. What is going on is that once the **ContentControl** expands (due to a collapsed element being visible), it will never shrink back to an Auto width/height required when one or more elements collapse. Interestingly, if you keep toggling visible/collapse, the ContentControl keeps on growing (sure, it recognizes visibility, but totally unaware of collapse) to the extent that Primary menu AppBarButton captions show up in Secondary menu.\r\n\r\nCould this point to a solution within Template10, perhaps based on how *space-filler controls* and others are interacting? PageHeader is a relatively complex control and perhaps a close look could reveal something. I can't see anything obvious that forces the **ContentControl** behave this way, but @JerryNixon can comment on this one.\r\n\r\n## A Solution, kinda...\r\n\r\n- Define a Width DependencyProperty for the **ContentControl** in question. Call this **ContentWidth**.\r\n\r\n- Bind the **ContentWidth** DP to **ContentControl**'s Width with `TemplateBinding`.\r\n\r\n- In your design, play with the PageHeader.ContentWidth property to counteract the issue described. Typically you'd use a Setter in VisualStateManager, for example:\r\n\r\n`<Setter Target=\"pageHeader.ContentWidth\" Value=\"0\" />` or\r\n`<Setter Target=\"pageHeader.ContentWidth\" Value=\"NaN\" />`\r\n\r\nI will do a PR on this (for 10.1 and 10.2)"}}
{"actor":{"display_login":"JerryNixon"}}