GithubHelp home page GithubHelp logo

microsoft / templatestudio Goto Github PK

View Code? Open in Web Editor NEW
2.6K 177.0 458.0 465.86 MB

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.

License: Other

PowerShell 0.17% C# 30.96% Batchfile 0.04% HTML 0.02% Rich Text Format 64.09% Visual Basic .NET 4.69% C++ 0.03% C 0.01%
csharp uwp uwp-apps visual-studio windows-10 xaml template-engine template

templatestudio's People

Contributors

bartlannoeye avatar cliff-simpkins avatar crutkas avatar dependabot[bot] avatar dgomezc avatar geertvanhorrik avatar jamesmcroft avatar javitosanchez avatar jermws avatar leeparrishmsft avatar lucastaimsft avatar mbcrump avatar microsoft-github-policy-service[bot] avatar mikebattista avatar milazzom avatar mrlacey avatar mvegaca avatar myokeeh avatar mysterious-dev avatar nigel-sampson avatar pratikone avatar prupipho avatar ralarcon avatar scottkuhl avatar sibille avatar smorin4 avatar varorbc avatar vmadurga avatar vssilin avatar wasteam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

templatestudio's Issues

Localization added into wizard

The system currently is localized. However, the wizard needs an improved experience for adding new languages. Due to the v0.1 experience, we're moving this out to focus on polishing the experience.

"Pages" and "Views" naming

We handle the concept of pages (in the wizard, in the templates and so on). For a certain page, the view part (xaml file) need to be called "xxxxView.xaml", for example, the "Blank Page" selected from the wizard will generate the following files:

Model/
• Blank1Model.cs
ViewModel/
• Blank1ViewModel.cs
View/
• Blank1View.xaml

That is, the "Blank Page" template will generate the Blank1View.xml

We want to double check that it is fine to have the templates called "Page" generating "Views".

Then, for the Code Behind framework, the xaml file will be named "xxxView.xaml" in order to be able to "reuse" as much xaml code as possible. Is that fine as well?

Code Behind Framework shouldn't use bindings

We understand that, in general, the properties for the controls will be established / modified within event handlers. This means that, by default the basic framework will not use "Bindings" and will not have implementation of INotifyPropertyChange. Is that assumtion correct?

Setting page location in SplitView

If they are using the SplitView template and select the Settings page, then it should be added to the bottom of the pane. You can see this in the News UWP app.

Collection initialization notification in BackgroundTaskServices.cs

    private static IEnumerable<BackgroundTaskBase> CreateInstances()
    {
        var backgroundTasks = new List<BackgroundTaskBase>();
        
        backgroundTasks.Add(new BackgroundTask()); 

        return backgroundTasks;
    }

can be

    private static IEnumerable<BackgroundTaskBase> CreateInstances()
    {
        var backgroundTasks = new List<BackgroundTaskBase>
        {
            new BackgroundTask()
        };
        return backgroundTasks;
    }

Crashing after selecting project type

Wizard: v1.0.313.1
Template: v0.0.0313.9

System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.Combine(String[] paths)
at Microsoft.Templates.Core.TemplatesRepository.GetFrameworkTypeInfo(String fxType)
at Microsoft.Templates.Wizard.Steps.Framework.ViewModel.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Templates.Wizard.Steps.StepViewModel.<b__9_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at System.Windows.Window.ShowDialog()
at Microsoft.Internal.VisualStudio.PlatformUI.WindowHelper.ShowModal(Window window, IntPtr parent)
at Microsoft.Templates.Wizard.VisualStudio.VsGenShell.ShowModal(Window dialog)
at Microsoft.Templates.Wizard.GenController.GetUserSelection(WizardSteps selectionSteps)

x:Bind & MVVMLight

We have started implementing binding with {x:Bind} instead of {Binding} and we have found an issue. MVVMLight is based on establishing the page DataContext in xaml thru a ViewModel property in a static ViewModelLocator type. The thing is, x:bind doesn't work with the concept of DataContext, but with concept of properties in page code behind. The solution proposed here is to cast back the DataContext to the ViewModel and use it in xaml, using the DataContext as a bridge. We found that very strange, and we don't see the need to use the ViewModelLocator strategy (see post comments).

In my opinion we have different options:

  1. Continuing using {Binding}
  2. Use {x:Bind} only for MVVM (basic). This will make much more complex the xaml sharing strategy
  3. Use {x:Bind} for both but with the casting strategy described above.

Pre-release vsix does load available templates properly

#Verified that the content is downloaded properly from the CND to %ProgramData%\UWPTemplates.

The templates discovery is not working properly. The mounting point in C:\users<user>.templateengine\settings.json is ok:

{
  "MountPoints": [
    {
      "ParentMountPointId": "00000000-0000-0000-0000-000000000000",
      "MountPointFactoryId": "94e92610-cf4c-4f6d-aeb6-9e42dde1899d",
      "MountPointId": "02486ad3-79e9-40c2-9332-6df301943e25",
      "Place": "C:\\ProgramData\\UWPTemplates\\Packages\\packages.nupkg"
    },
    {
      "ParentMountPointId": "00000000-0000-0000-0000-000000000000",
      "MountPointFactoryId": "8c19221b-dea3-4250-86fe-2d4e189a11d2",
      "MountPointId": "1027b9dc-f2c2-401d-ae6c-fcfa24638c85",
      **"Place": "C:\\ProgramData\\UWPTemplates\\Templates"**
    }
  ],
  "ComponentGuidToAssemblyQualifiedName": {},
  "ProbingPaths": [
    "C:\\Users\\<user>\\.templateengine\\UWPTemplates\\1.0.0\\content"
  ],
  "ComponentTypeToGuidList": {}
}

But there is nothing loaded in the cache files (templatecache.json):

{
  "TemplateInfo": []
}

The code running locally make the discovery properly and, after having the cache loaded the firts time, the extension running within Visua Studio shows the available templates fine.

Store push notifications

Store push notifications are planned to be added but we need to resolve a positive experience for the end user. Right now the install experience leaves a bit to be desired.

Right click: Add Page

Contextual action over an active project in the solution explorer to launch the wizard and add a page to the project.

SettingStorage feels not done

Looking at the Suspend and Resume service, it directly references AppData. I thought we had discussed for SettingStorage to abstract the ApplicationData.Current folders.

Structure of MVVM project

We should have the following structure for an MVVM project :

This is the “structure” that we’ve been using:

Model/
• CarModel.cs
• DriverModel.cs
ViewModel/
• CarViewModel.cs
• DriverViewModel.cs
View/
• CarView.xaml
• DriverView.xaml

classes are lacking identifiers

namespace App17.Activation
{
class ActivationService

I feel like this should be

namespace App17.Activation
{
private class ActivationService

Navigation Service

MVVM Light still have the lack of some methods to be able to implement the navigation for UWP Apps. We have implemented our own NavigationService for the MVVM Basic Framework. We want to double check that it fine to use the Basic NavigationService with the MVVM Light framework.

By the way, it can be used wiht the CodeBehind framework, do you think it is worthy.

Finally, we can create a Mandatory dev feature for all the frameworks which use the NavigationService. Is it fine?

Pages: Settings

This page will have a section for About, licenses, and a privacy statement.

Theme change not being reflected

I created a nav pane & MVVM Light with just a settings page.

I nav to the setting page
Switch to dark theme
nav to main page
nav back to setting page
switch to light theme

Expected result: Go to light theme
Actual result: no theme change happens

blog documentation should be replaced with only officials docs

ToastNotificationService.cs and probably others

        //TODO UWPTemplates: Handle activation from toast notification,
        //for more info handling activation see
        //https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/07/08/quickstart-sending-a-local-toast-notification-and-handling-activations-from-it-windows-10/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.