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); } } }
90 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 */
96 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
124 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)
150 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(); }
450 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
287 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)
536 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
561 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>
386 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));
393 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), };
204 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();
224 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;
1003 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>
224 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(); }
413 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>
233 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 {
656 Views
no comments
public class ShowSnippetViewModel { public ShowSnippetViewModel(SnippetController controller) { this.Controller = controller; } SnippetController Controller = null;
189 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) {
196 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
