Customize Scaffolding templates list - t4

Is there any way to customize the controller scaffolding template list, like adding different kind of options to use different kind of templates?
thanks

how we could add the Scaffold environment so that it will be available in "Scaffolding options" of Add Controller dialog box?

I prefer creating my own scaffolders and use them from nuget, but you can modify the scaffolding options by adding CodeTemplate folders to your solution. See Hanselmans tutorial about modifying codetemplates

Related

Menu-commands extension for Visual Studio without command-table

I am building a Visual Studio extension (VSIX) with menu commands depending on the options for the extension. Its dynamic, what commands (how many) depends on the options.
I have a solution for it that uses the command-table, like: Dynamically add menu items
I would like to skip the command-table and build the menus totally programmatically, like: HOWTO: Package with commands created by code
The reason is to make it more dynamic. So if the user adds/changes/deletes in the options of the extension it would be handled dynamically (programmatically). On saving options the menu-command tree would be rebuildt. If I use a command-table I will have to add/delete nodes there to be able to solve it.
The thing I can not figure out is howto add the objects for "groups" and "menus" programmatically.
So I am out for the class/interface that has "AddGroup" or "AddMenu" as methods.
Is this at all possible or do I have to use the command-table? If it is possible I would appreciate links to code-examples for it.
Regards Hans
MVP Carlos Quintero has published sample code using IVsProfferCommmands3.AddNamedCommand that illustrates how to programmatically add menu items via the automation services (formerly utilized by the now discontinued add-in extensibility model).
https://github.com/visualstudioextensibility/VSX-Samples/tree/master/PackageCommandsCreatedByCode
While add-ins are no longer supported, the automation interfaces are still present. So you can use these, bearing in mind these menu items (aka commands) are temporary.
Also, the sample code here is a little outdated, using Package instead of AsyncPackage, and ProvideAutoLoad attributes. So you'll also want to read up on the following:
https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/AsyncPackageMigration
https://devblogs.microsoft.com/visualstudio/updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019/
Sincerely,

Xamarin Forms Dropdown Menu

I am new to Xamarin and I was wondering if it is possible in Xamarin Forms to create a menu similar to this:
.
It looks like you are trying to do a SlideOver menu which I would suggest using SlideOverKit
They support some nice menu options which you can adapt with and is easily implementable by using their nuget package.
Yes. It is possible. I recommend you have a look at Custom renderers. They enable you to do whatever the executing platform is capable of. Note that depending on what you need there may be plenty of platform knowledge that is needed.
I would suggest using SyncFusion component called DataGrid. SyncFusion has many great components for Xamarin forms. They also have a community license were you can get all components for free if you are qualified.
you can use this list in your custom master detail or menu component.

Are there any special event hooks for joomla modules

I have been searching special event hooks for use to track and update module forms. I found contenthooks on the documentation site but I couldn't get anything for modules. I want to add a plugin so that it adds an extra field viz. radio button to every module form. Finally I want to use the value of this radio field in templates/your-template/html/module.php. Can someone point me in the right direction towards this. Thanks :)
Jooma does not have event driven structure like for example .NET or Java. However if you want to trigger some additional functionality on certain event you may create a plugin. Plugin is something different than module or component but it 'collaborates' with them. It handles some per-defined events:
[http://docs.joomla.org/Plugin/Events][1]
[1]: http://docs.joomla.org/Plugin/Events and it lets you define your own.
You may also try the way I usually take which is customize module display. You simply copy
view file of the module you want to modify to your template. For example:
/modules/mod_feed/tmpl/default.php
to
/templates/{your template}/mod_feed/default.php
Now you can freely modify this file without any risk that it may be overwritten on the next Joomla update. Just don't forget to set your overwrite in module settings: go to administrator, modules, choose module to edit and in the tab 'Advanced' select 'Alternative Layout'.
I hope this helps and good luck!
Take a look at the new com_ajax that is in 3.2.

Is it possible to customize the asp .net mvc 3 generated Views?

I've been using asp.net mv3 via vs 2010 for quite a while now, also the default views and actions generated when creating a controller are very helpful. However lately, i found it redundant to keep on adding the same stuff in the generate view, for example, i have to place "btn" class names on links and button, since im using a 3rd party css library. So, i was wondering if it was possible to customize the generated views so that i wouldn't have to add them anymore after generation of the view?
image --> http://i.stack.imgur.com/J8Aiz.png
Yes it's possible to customize the built in TT templates which used fot the scaffolding.
Here is a good how to: Modifying the default code generation/scaffolding templates in ASP.NET MVC
If you are more into scaffolding the MVC Scaffolding project could be also interesting for you.

How to create custom editor/display templates in ASP.NET MVC 3?

I would like to make custom editor templates for different data types in ASP.NET MVC (to use with Html.EditorFor()), including rewriting the existing templates. The ultimate goal is to create a mini-framework where each editor supports javascript notifications about being changed, and I can show a message to the user that there are unsaved changes in the page. (Maybe there's something existing already?)
I can find many questions pertaining to problems with such templates, but nowhere can I find a tutorial or manual on creating them. Where do they go? Is there any special syntax? How does a template get selected? What information is available in the template and how do I access it? Etc.
So - where can I find out all about these templates?
Check and download ASP.NET MVC 3 Futures on http://aspnet.codeplex.com/releases/view/58781 and see how the default source code looks. Note: this works for MVC 4 as well.

Resources