{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/247","repository_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit","labels_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/247/comments","events_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/247/events","html_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/247","id":173405812,"number":247,"title":"Implement loading control with sample.","user":{"login":"dachibox","id":1771785,"avatar_url":"https://avatars.githubusercontent.com/u/1771785?v=3","gravatar_id":"","url":"https://api.github.com/users/dachibox","html_url":"https://github.com/dachibox","followers_url":"https://api.github.com/users/dachibox/followers","following_url":"https://api.github.com/users/dachibox/following{/other_user}","gists_url":"https://api.github.com/users/dachibox/gists{/gist_id}","starred_url":"https://api.github.com/users/dachibox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dachibox/subscriptions","organizations_url":"https://api.github.com/users/dachibox/orgs","repos_url":"https://api.github.com/users/dachibox/repos","events_url":"https://api.github.com/users/dachibox/events{/privacy}","received_events_url":"https://api.github.com/users/dachibox/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/labels/cla-signed","name":"cla-signed","color":"207de5"},{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/labels/controls","name":"controls","color":"fef2c0"},{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/labels/need%20more%20info","name":"need more info","color":"d93f0b"},{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/labels/open%20discussion","name":"open discussion","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-26T09:09:42Z","updated_at":"2016-08-30T14:03:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/pulls/247","html_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/247","diff_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/247.diff","patch_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/247.patch"},"body":"The loading control is for showing an animation with some content when the user should wait in some tasks of the app.\r\n\r\nThere is a sample on [`Microsoft.Toolkit.Uwp.SampleApp/SamplePages`](https://github.com/dachibox/UWPCommunityToolkit/tree/dev/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Loading) where we can change all the properties and content to see how easy it is.\r\n\r\n![uwpwindowstoolkit](https://cloud.githubusercontent.com/assets/1771785/18082257/50db048a-6e9e-11e6-9ba5-3ea30b0dfc5a.PNG)\r\n\r\nAn example of how we can build the loading control.\r\n\r\n```xaml\r\n<controls:Loading x:Name=\"LoadingControl\" LoadingHorizontalAlignment=\"{Binding LoadingContentHorizontalAlignment.Value}\" \r\n                    LoadingVerticalAlignment=\"{Binding LoadingContentVerticalAlignment.Value}\"\r\n                    LoadingBackground=\"{Binding LoadingBackground.Value}\" LoadingOpacity=\"{Binding OpacityForLoadingControl.Value}\">\r\n    <ContentControl x:Name=\"LoadingContentControl\"/>\r\n</controls:Loading>\r\n```\r\n\r\n\r\n- **LoadingHorizontalAlignment** and **LoadingVerticalAlignment** are responsible to align the custom content of the control. It aligns what we create inside as a ContentPresenter.\r\n- **LoadingBackground** and **LoadingOpacity** are for the panel who appears and disappears behind our custom control.\r\n- **ContentControl** could be everything done with xaml. For example:\r\n```xaml\r\n<controls:Loading x:Name=\"LoadingControl\" LoadingHorizontalAlignment=\"{Binding LoadingContentHorizontalAlignment.Value}\" \r\n                    LoadingVerticalAlignment=\"{Binding LoadingContentVerticalAlignment.Value}\"\r\n                    LoadingBackground=\"{Binding LoadingBackground.Value}\" LoadingOpacity=\"{Binding OpacityForLoadingControl.Value}\">\r\n    <StackPanel Orientation=\"Horizontal\" Padding=\"12\">\r\n        <Grid Margin=\"0,0,8,0\">\r\n            <Image Source=\"../../Assets/ToolkitLogo.png\" Height=\"50\" />\r\n            <ProgressRing IsActive=\"True\" Foreground=\"Blue\" />\r\n        </Grid>\r\n        <TextBlock Text=\"It's ok, we are working on it :)\" Foreground=\"Black\" VerticalAlignment=\"Center\" />\r\n    </StackPanel>\r\n</controls:Loading>\r\n```\r\n Finally that the loading control appears, we must set the `IsLoading` property to `true`\r\n\r\n`LoadingControl.IsLoading = true;`"},"comment":{"url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/comments/243449181","html_url":"https://github.com/Microsoft/UWPCommunityToolkit/pull/247#issuecomment-243449181","issue_url":"https://api.github.com/repos/Microsoft/UWPCommunityToolkit/issues/247","id":243449181,"user":{"login":"deltakosh","id":1306056,"avatar_url":"https://avatars.githubusercontent.com/u/1306056?v=3","gravatar_id":"","url":"https://api.github.com/users/deltakosh","html_url":"https://github.com/deltakosh","followers_url":"https://api.github.com/users/deltakosh/followers","following_url":"https://api.github.com/users/deltakosh/following{/other_user}","gists_url":"https://api.github.com/users/deltakosh/gists{/gist_id}","starred_url":"https://api.github.com/users/deltakosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deltakosh/subscriptions","organizations_url":"https://api.github.com/users/deltakosh/orgs","repos_url":"https://api.github.com/users/deltakosh/repos","events_url":"https://api.github.com/users/deltakosh/events{/privacy}","received_events_url":"https://api.github.com/users/deltakosh/received_events","type":"User","site_admin":false},"created_at":"2016-08-30T14:03:49Z","updated_at":"2016-08-30T14:03:49Z","body":"You have a conflict to fix and I'll check it with pleasure:)"}}
{"actor":{"display_login":"deltakosh"}}