{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/issues/1179","repository_url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio","labels_url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/issues/1179/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/issues/1179/comments","events_url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/issues/1179/events","html_url":"https://github.com/Microsoft/WindowsTemplateStudio/issues/1179","id":259515404,"number":1179,"title":"Post-Actions for Style resources dictionaries","user":{"login":"mvegaca","id":5556784,"avatar_url":"https://avatars2.githubusercontent.com/u/5556784?v=4","gravatar_id":"","url":"https://api.github.com/users/mvegaca","html_url":"https://github.com/mvegaca","followers_url":"https://api.github.com/users/mvegaca/followers","following_url":"https://api.github.com/users/mvegaca/following{/other_user}","gists_url":"https://api.github.com/users/mvegaca/gists{/gist_id}","starred_url":"https://api.github.com/users/mvegaca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvegaca/subscriptions","organizations_url":"https://api.github.com/users/mvegaca/orgs","repos_url":"https://api.github.com/users/mvegaca/repos","events_url":"https://api.github.com/users/mvegaca/events{/privacy}","received_events_url":"https://api.github.com/users/mvegaca/received_events","type":"User","site_admin":false},"labels":[{"id":504921181,"url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":574573008,"url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/labels/Generated%20Code","name":"Generated Code","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/milestones/11","html_url":"https://github.com/Microsoft/WindowsTemplateStudio/milestone/11","labels_url":"https://api.github.com/repos/Microsoft/WindowsTemplateStudio/milestones/11/labels","id":2652860,"number":11,"title":"1.5","description":"","creator":{"login":"crutkas","id":1462282,"avatar_url":"https://avatars2.githubusercontent.com/u/1462282?v=4","gravatar_id":"","url":"https://api.github.com/users/crutkas","html_url":"https://github.com/crutkas","followers_url":"https://api.github.com/users/crutkas/followers","following_url":"https://api.github.com/users/crutkas/following{/other_user}","gists_url":"https://api.github.com/users/crutkas/gists{/gist_id}","starred_url":"https://api.github.com/users/crutkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crutkas/subscriptions","organizations_url":"https://api.github.com/users/crutkas/orgs","repos_url":"https://api.github.com/users/crutkas/repos","events_url":"https://api.github.com/users/crutkas/events{/privacy}","received_events_url":"https://api.github.com/users/crutkas/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":1,"state":"open","created_at":"2017-07-20T16:20:13Z","updated_at":"2017-09-21T14:26:33Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2017-09-21T14:26:33Z","updated_at":"2017-09-21T14:26:33Z","closed_at":null,"author_association":"MEMBER","body":"In relation of #519 and #1164 we were thinking about the following:\r\n\r\nWe have a conflict handling styles between project template and pages/features templates. We are developing Camera and image gallery pages that need to add styles on project resources dictionaries.\r\n\r\nThere are two different ways to solve it:\r\n- The new template adds a new style sheet in the project.\r\n- The new template adds styles to existing style sheets in the project.\r\n\r\nThe first option has the following problem:\r\n- If we have two different templates that add a new style sheet with the same name and different styles on it, only one style sheet will be added.\r\n\r\nThe second has the following problem:\r\n- This option forces us to create empty style sheets in all new projects even if no templates add styles on it.\r\n\r\nWe were thinking on the best approach could be to add a specific Post-Actions for styles.\r\nStyles PostAction should create a empty style sheet if the project hasn't it before apply the postaction.\r\n\r\ni.e. Adding Button styles from two different templates:\r\n- Check no button styles sheet in the project.\r\n- Create a Empty Style Sheet.\r\n```xml\r\n<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n</ResourceDictionary>\r\n```\r\n- Add styles from first template\r\n```xml\r\n<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n    <Style TargetType=\"Button\" x:Key=\"StyleFromFirstTemplate\">\r\n        <Setters>........</Setters>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n```\r\n- Add styles from second template\r\n```xml\r\n<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n    <Style TargetType=\"Button\" x:Key=\"StyleFromFirstTemplate\">\r\n        <Setters>........</Setters>\r\n    </Style>\r\n\r\n    <Style TargetType=\"Button\" x:Key=\"StyleFromSecondTemplate\">\r\n        <Setters>........</Setters>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n```\r\n\r\nThis issue is added to 1.5 version, By this moment we are going to solve Camera and Image gallery templates by:\r\n**New Image Galley Page -> ImageGalleryPageStyles.xaml** (New file)\r\n**New Camera Page -> CameraPageStyles.xaml** (New file)\r\n\r\n"}}
{"actor":{"display_login":"mvegaca"}}