Make a Customized LayoutRoot as a template for creating New layouts - visual-studio

Good day, am still a beginner to Windows Phone and visual studio environment so apologies in advance. In Visual Studio, when creating a new layout we have the LayoutRoot by default. After having this LayoutRoot customized(with set rows and columns and a postioned TextBlock), is it possible to make the layout like a base template so that when one starts a new layout, it can have this customized Layout as its LayoutRoot. How can i do this or do i have to copy this values to every new layout that i intend to create. Many Thanks

Three options come to mind here.
You can make a visual studio item template for your customized page where you can easily add it to new projects. Check this tutorial on how to make item templates: Visual Studio - How To Create Item Templates
You can make a base page with the customized xaml and have your other pages inherit from it.
You can make user controls responsible for specific UI parts and then add these controls to pages whenever needed.

Related

How to make form templates in visual basic 6?

I would like to make a template for all the forms I create in my visual basic 6 project, for example I want to put a header on all the forms that contains user name etc, I know in c# all I have to do is make the form with appropriate controls and make all other forms inherit from in, in visual basic 6 there does not seem to be a way to make a form inherit from another?
According to MSDN:
To create your own template, save the object that you want to use as a
template, then copy it to the appropriate subdirectory of the Visual
Basic Template directory. For example, to create a custom MyForm form
template, save a form named MyForm, then copy the MyForm.frm file to
the \VB\Template\Forms directory. When you select the Add Form command
from the Project menu, Visual Basic displays the MyForm template in
the Add Form dialog box...
So...design a form any way you want--with whatever code, controls, etc. Then save it and copy it to the \VB\Template\Forms directory.

Sitefinity 5.3: How can I place a widget into my Visual Studio template?

I'm new to Sitefinity and building templates in Visual Studio. What I'm trying to do is build a template that will have reusable components included automatically (ie. header, navigation, footer, etc). This way, when a content editor goes in to add an item, he won't have to manually add all of the elements that should already be on every page.
How can I add the navigation widget to the template I'm building in Visual Studio?
Templates are better created in the Page Templates under the Design menu of the Sitefinity Administration Backend.
You can create a single master page in Visual Studio for the very basic layout, then use the Page Templates to base a template on that master page. You can then add the elements (navigation, footer, etc) to those templates, and create pages based on those templates.
You can even nest the templates so that you have the base (using only the master page) then a two-column, three-column, etc layouts.
Here's a video with some more information on page templates: http://www.sitefinity.com/documentation/gettingstarted/design/create-your-first-sitefinity-template
I hope this is helpful!

ShowInNewForm="FALSE" Does Not Work - Field is Displayed in New Form

I have created a List in SharepointUI, then made some layout changes in InfoPath. I then created a WSP file and imported the List into a new Project in Visual Studio 2010.
For a mumber of fields I do not want to display in the New Entry form I have set the ContentType FieldRefs for the field to have the property ShowInNewForm="FALSE" in the Schema.xml.
However, when I Deploy the Project and Add a New Item to the List the said fields are displayed. I am expecting these fields not to be visibile in the NewForm? Any ideas why this is not working?
Thanks
I think you problem here is that you customized the forms with InfoPath which I think does not apply normal forms rules like ShowInNewForm = "FALSE".
You can control the visibility of the controls from InfoPath as you want.

Sharepoint 2010 List and Visual Studio

as a newbie to Sharepoint.... I have created a simple list with several columns in Sharepoint 2010.
I now want to add a button on the List that I can programmatically add some onClick events to do the following:
get a handle on some of the columns in the list;
Distribute an email automatically based on the content of some of the columns
I am looking at using c# via Visual Studio 2010 for all the programmatic aspect of this development.
Is it possible to export the xml from Sharepoint 2010 then import into Visual Studio 2010 so that I can use the list I created as my starting point for the coding work? If so, how do I go about this?
Thanks.
You'll have to setup Visual Studio to work with Sharepoint.
Install it on a server that has Sharepoint 2010 running.
You can then create a webpart that incorporates the list (or a view on it) and add the button to that list.
But I imagine that you'll want to work on a specific row. So what you want is a Custom Action on that list (Visual Studio has a template for that: Add -> New Item -> Custom Action).
The Custom Action will create a new item in the Edit Control Block (the context menu that appears for every item in the list).
I prefer to create the ECB (Edit Control Block) menu items using JavaScript. In the page load I inject a jSon string that has additional information about each of the rows, and a JavaScript function then is called by the builtin SharePoint javaScript function that creates the ECB.
The JavaScript function you'll have to create is Custom_AddListMenuItems .
In that function you'll call CAMOpt to create menu items. If you want SharePoint to create the built-in menu items (and Custom Actions you created), set the return value of the Custom_AddListMenuItems function to true. (And fals if you don't want to see the built in ECB menu items and any Custom Actions you created)
You can start here:Jan Tielens Blogging's
Hope this helps.

Custom controls in Visual Studio Lightswitch

Can someone point me to an article or tutorial on using custom controls in Visual Studio Lightswitch? I'm trying to add a rich text box to a page, linked to a string property. When running the app, sometimes the field will show up, sometimes it won't. If it does show the width of the field is small, about 2 characters, but will expand when text is pasted inside. Saving doesn't work, though.
I'm not even sure about whether or not I'm allowed to use controls like these in a Lightswitch app, even though custom controls are obviously supported. Are the custom controls restricted to a certain type or set?
Thanks in advance for any assistance.
W.
Have a look at the following example, http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/10/LightSwitch-Student-Information-System-Part-3-Custom-Controls.aspx
Also the Training Kit has examples of Custome Controls included.
There is also this tutorial:
Creating A LightSwitch Custom Silverlight Control
http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/2/Creating-A-LightSwitch-Custom-Silverlight-Control.aspx

Resources