{"action":"closed","issue":{"url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1314","repository_url":"https://api.github.com/repos/Windows-XAML/Template10","labels_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1314/labels{/name}","comments_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1314/comments","events_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1314/events","html_url":"https://github.com/Windows-XAML/Template10/issues/1314","id":189611579,"number":1314,"title":"Converter called twice when navigate to an new page and once when goback","user":{"login":"lyling","id":485493,"avatar_url":"https://avatars.githubusercontent.com/u/485493?v=3","gravatar_id":"","url":"https://api.github.com/users/lyling","html_url":"https://github.com/lyling","followers_url":"https://api.github.com/users/lyling/followers","following_url":"https://api.github.com/users/lyling/following{/other_user}","gists_url":"https://api.github.com/users/lyling/gists{/gist_id}","starred_url":"https://api.github.com/users/lyling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyling/subscriptions","organizations_url":"https://api.github.com/users/lyling/orgs","repos_url":"https://api.github.com/users/lyling/repos","events_url":"https://api.github.com/users/lyling/events{/privacy}","received_events_url":"https://api.github.com/users/lyling/received_events","type":"User","site_admin":false},"labels":[{"id":197692295,"url":"https://api.github.com/repos/Windows-XAML/Template10/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-16T07:04:34Z","updated_at":"2016-12-28T21:02:30Z","closed_at":"2016-12-28T21:02:30Z","body":"I found an issue about calling converter. \r\nWhen navigate to an new page, a conveter (for only one property) will be called twice.\r\nFirst, called by XamlUtils.InitializeBindings.\r\nSecond, called by XmlaUtilUpdateBindings.\r\nBelow is call stack: \r\n-------------------------------------------------------------------------------------------------------------------\r\n \tSample.exe!Sample.Views.DemoConverter.Convert(object value, System.Type targetType, object parameter, string language) Line 17\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update_(Sample.Views.DetailPage obj, int phase) Line 155\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update() Line 93\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Initialize() Line 87\tC#\r\n \t[External Code]\t\r\n>\tTemplate10Library.dll!Template10.Utils.XamlUtils.InitializeBindings(Windows.UI.Xaml.Controls.Page page) Line 38\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService.NavigateToAsync(Windows.UI.Xaml.Navigation.NavigationMode mode, object parameter, object frameContent) Line 183\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService..ctor.AnonymousMethod__2() Line 91\tC#\r\n \tTemplate10Library.dll!Template10.Common.DispatcherWrapper.DispatchAsync.AnonymousMethod__0() Line 77\tC#\r\n\r\n>\tSample.exe!Sample.Views.DemoConverter.Convert(object value, System.Type targetType, object parameter, string language) Line 17\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update_(Sample.Views.DetailPage obj, int phase) Line 155\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update() Line 93\tC#\r\n \t[External Code]\t\r\n \tTemplate10Library.dll!Template10.Utils.XamlUtils.UpdateBindings(Windows.UI.Xaml.Controls.Page page) Line 30\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService.NavigateToAsync(Windows.UI.Xaml.Navigation.NavigationMode mode, object parameter, object frameContent) Line 184\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService..ctor.AnonymousMethod__2() Line 91\tC#\r\n \tTemplate10Library.dll!Template10.Common.DispatcherWrapper.DispatchAsync.AnonymousMethod__0() Line 77\tC#\r\n-------------------------------------------------------------------------------------------------------------\r\n\r\nAnd when go back to preview page, it is called by XamlUtils.UpdateBindings.\r\nBelow is call stack:\r\n-------------------------------------------------------------------------\r\n \tSample.exe!Sample.Views.DemoConverter.Convert(object value, System.Type targetType, object parameter, string language) Line 17\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update_(Sample.Views.DetailPage obj, int phase) Line 155\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update() Line 93\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Initialize() Line 87\tC#\r\n \t[External Code]\t\r\n>\tTemplate10Library.dll!Template10.Utils.XamlUtils.InitializeBindings(Windows.UI.Xaml.Controls.Page page) Line 38\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService.NavigateToAsync(Windows.UI.Xaml.Navigation.NavigationMode mode, object parameter, object frameContent) Line 183\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService..ctor.AnonymousMethod__2() Line 91\tC#\r\n \tTemplate10Library.dll!Template10.Common.DispatcherWrapper.DispatchAsync.AnonymousMethod__0() Line 77\tC#\r\n\r\n>\tSample.exe!Sample.Views.DemoConverter.Convert(object value, System.Type targetType, object parameter, string language) Line 17\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update_(Sample.Views.DetailPage obj, int phase) Line 155\tC#\r\n \tSample.exe!Sample.Views.DetailPage.DetailPage_obj1_Bindings.Update() Line 93\tC#\r\n \t[External Code]\t\r\n \tTemplate10Library.dll!Template10.Utils.XamlUtils.UpdateBindings(Windows.UI.Xaml.Controls.Page page) Line 30\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService.NavigateToAsync(Windows.UI.Xaml.Navigation.NavigationMode mode, object parameter, object frameContent) Line 184\tC#\r\n \tTemplate10Library.dll!Template10.Services.NavigationService.NavigationService..ctor.AnonymousMethod__2() Line 91\tC#\r\n \tTemplate10Library.dll!Template10.Common.DispatcherWrapper.DispatchAsync.AnonymousMethod__0() Line 77\tC#\r\n-------------------------------------------------\r\n\r\nThe question is the original(not using t10) UWP just call the converter once when navigate to and never called when navigtate from.  Is this issue reasonable? why call so many times?\r\n\r\n"}}
{"actor":{"display_login":"JerryNixon"}}