Format:
Recent snippets matching tags of control
<?php abstract class Controller { protected function __construct() { $this->that = $this; }
35 Views
no comments
public static class UnityContainerExtensions { public static void AssertMappingsAreValid(this IUnityContainer container) { foreach (var registration in container.Registrations) { container.Resolve(registration.RegisteredType, registration.Name); } } }
92 Views
no comments
/* * Escrito por Jone Polvora - jpolvora@gmail.com * Julho2011 * Novidades: Convenção para resolver interfaces (IClasse, Classe) * Resolver por String * Resolver com parâmetros * Escopo de registro * Objetos registrados com WeakReference */
97 Views
no comments
''' <summary> ''' An Extension of the ControlCollection ''' </summary> ''' <param name="controls"></param> ''' <returns>An Enumerable collection of all of the controls in a ControlCollection</returns> ''' <remarks></remarks> <Extension()> _ Public Function All(ByVal controls As ControlCollection) As IEnumerable(Of Control) Dim results As New List(Of Control) For Each Control As Control In controls
127 Views
no comments
public static Control FindControlUsingStack(Control root, string id) { // Seed it. Stack<Control> stack = new Stack<Control>(); stack.Push(root); while(stack.Count > 0) { Control current = stack.Pop(); if (current.ID == id)
152 Views
no comments
/// <summary> /// Holds up the test execution for the given duration without blocking the UI thread. /// </summary> void UIPause(int sec) { Storyboard PauseSB = new Storyboard() { Duration = new Duration(new TimeSpan(0, 0, sec)) }; PauseSB.Completed += (sender, e) => { TestComplete(); }; PauseSB.Begin(); }
454 Views
no comments
<Extension()> _ Public Function GetBindingInfo(ByVal DataLayoutControl As DataLayoutControl, _ Optional ByVal ExcludePropetries As String = "") As List(Of DataLayoutBindingInfo) Dim bh As New LayoutElementsBindingInfoHelper(DataLayoutControl) Dim info As LayoutElementsBindingInfo = bh.CreateDataLayoutElementsBindingInfo GetBindingInfo = (From x As LayoutElementBindingInfo In info.GetAllBindings _ Where (Not x.DataInfo.Name.ToUpper.EqualsAny(ExcludeNames)) _ And (Not x.DataInfo.Name.ToUpper.EqualsAny(ExcludePropetries)) _ Select New DataLayoutBindingInfo(x.DataInfo.Name, x.DataInfo.Caption, x.Visible, x.EditorType)).ToList End Function
288 Views
no comments
private void button_Click(object sender, EventArgs e) { // pass in the containing panel LoadControl<MyControls.MyControl>(panelContainer); } void LoadControl<T>(Panel panel) where T : Control, new() { T _Control = GetControl<T>(panel); if (_Control == null)
538 Views
no comments
Public Class ctlDragableSizable ' Locked when parent control handles the resizing Private blnIsResizeLocationLocked As Boolean = False Private intXMouseDownPosition As Integer Private intYMouseDownPosition As Integer Private blnSizableVertical As Boolean = False Private blnSizableHorizontal As Boolean = False
568 Views
no comments
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</controls>
</pages>
</system.web>
388 Views
no comments
using Microsoft.TeamFoundation.VersionControl.Client; using Microsoft.TeamFoundation.WorkItemTracking.Client; // create a new work item linked to an existing item in version control static void CreateLinkedWorkItem(String teamProject, String workItemType) { using (var tfs = TeamFoundationServerFactory.GetServer(_ServerUri)) { var workItemStore = (WorkItemStore)tfs.GetService(typeof(WorkItemStore));
397 Views
no comments
using Microsoft.TeamFoundation.VersionControl.Client; // query the version control repository for items matching a file specification // set the folder for the root of your search String rootFolder = "$/MyProject"; // construct the set of item specifications you want to search for ItemSpec[] itemSpecs = new ItemSpec[] { new ItemSpec(String.Format("{0}/*.sln", rootFolder), RecursionType.Full), };
207 Views
no comments
// Renders ANY control into HTML public static string RenderControl(Control ctrl) { StringBuilder sb = new StringBuilder(); StringWriter tw = new StringWriter(sb); HtmlTextWriter hw = new HtmlTextWriter(tw); ctrl.RenderControl(hw); return sb.ToString();
227 Views
no comments
using System; using System.Collections.Generic; using System.Web; using System.Web.Mvc; using Westwind.Utilities; using System.ServiceModel.Syndication; using CodePasteBusiness; using System.Text; using System.Collections; using System.IO;
1013 Views
no comments
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MensajeGeneralError.ascx.cs" Inherits="Syllabus_PL.UserControls.WebUserControl1" %> <table cellspacing="0" cellpadding="0" class="cf ve"> <tbody> <tr> <td class="vj"> </td> <td class="vi" /> <td class="vk" /> </tr>
226 Views
no comments
public static string Control<ControlType>(this HtmlHelper htmlHelper, string name, ControlType control, object htmlAttributes) where ControlType : BaseControl { control.HtmlHelper = htmlHelper; control.UrlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext); control.Id = name; control.MergeAttributes(htmlAttributes); return control.Render(); }
420 Views
no comments
<td> <%= Html.DateField("ToDate", new DateControl { CssClass = "datefield", SelectedDate = Model.Parameters.ToDate, DateFormat = "mm/dd/yyyy" }, new { style = "min-width: 150px;" } ) %></td>
234 Views
1 comments
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Mvc.Ajax; using System.Web.Routing; namespace CodePasteMvc.Controllers {
660 Views
no comments
public class ShowSnippetViewModel { public ShowSnippetViewModel(SnippetController controller) { this.Controller = controller; } SnippetController Controller = null;
190 Views
no comments
public string GetTagLinkList(string tags) { if (string.IsNullOrEmpty(tags)) return string.Empty; string[] tagStrings = tags.Split( new char[1] {','}, StringSplitOptions.RemoveEmptyEntries); StringBuilder html = new StringBuilder(); foreach (string tagString in tagStrings) {
199 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
