Format:
Recent snippets matching tags of View
/************************************************************************************* * * Copyright 2012 Davide Orazio Montersino http://www.davidemontersino.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or
59 Views
no comments
using System; using System.Windows; using System.Windows.Controls; using System.Windows.Interactivity; using System.Windows.Threading; namespace Behaviors { /// <summary> /// On ListBoxes using CanContentScroll=True (virtualized), WPF layout changes will make the scrollviewer reset to zero.
95 Views
no comments
USE <%DatabaseName%> GO SELECT t.name AS table_name, SCHEMA_NAME(schema_id) AS schema_name, c.name AS column_name FROM sys.tables AS t INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID WHERE c.name LIKE '%UserName%' ORDER BY schema_name, table_name;
67 Views
no comments
<asp:ListView ID="ListView_Example" runat="server" > <LayoutTemplate> <ul> <asp:PlaceHolder ID="PlaceHolder_Example" runat="server" /> </ul> </LayoutTemplate> <ItemTemplate> <li> <a href="<%=Eval("ExampleLink")%>"><%=Eval("ExampleName")%></a><%=Eval("ExampleSeparator")%> </li>
92 Views
no comments
namespace WindowsFormsApplication1 { public partial class Form1 : System.Windows.Forms.Form { public Form1() { InitializeComponent(); // create list of data var _List = new System.Collections.Generic.List<Data>
1724 Views
1 comments
public interface IView { event EventHandler Load; } public class Presenter { private IView _View; public Presenter(IView view)
212 Views
no comments
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Windows.Data; namespace VMLocatorSample.ViewModels { public class ViewModelLocator
1110 Views
no comments
private void dataGridViewOrders_SelectionChanged(object sender, EventArgs e) { dataGridViewOrderDetails.DataSource = null; if (dataGridViewOrders.SelectedRows.Count == 0) return; DataGridViewRow row = dataGridViewOrders.SelectedRows[0]; if (row == null) return; int orderId = int.Parse(row.Cells["OrderId"].Value.ToString());
163 Views
no comments
private void treeViewCustomer_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { treeViewCustomer.SelectedNode = treeViewCustomer.GetNodeAt(e.Location); contextMenuStripCustomer.Show((Control)sender, e.Location); } }
222 Views
no comments
public partial class _Default : System.Web.UI.Page { private bool mInserted = false; protected void Page_Load(object sender, EventArgs e) { mInserted = false; } protected void ASPxGridView1_CustomJSProperties(object sender, ASPxGridViewClientJSPropertiesEventArgs e) { e.Properties["cpIsInserted"] = mInserted.ToString(); }
682 Views
no comments
<dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="AccessDataSource1" KeyFieldName="CategoryID"
OnCustomJSProperties="ASPxGridView1_CustomJSProperties"
onrowinserted="ASPxGridView1_RowInserted">
<ClientSideEvents EndCallback="function(s, e) {
if (s.cpIsInserted == 'True') alert('Inserted!');
}" />
1163 Views
no comments
protected void ASPxButton1_Click(object sender, EventArgs e)
{
object key = ASPxGridView1.GetRowValues(2, "CategoryID");
ASPxGridView1.Selection.SelectRowByKey(key);
}
479 Views
no comments
<ListView.View> <GridView> <GridView.ColumnHeaderContainerStyle> <Style> <!-- This hides the header --> <Setter Property="FrameworkElement.Visibility" Value="Collapsed" /> </Style> </GridView.ColumnHeaderContainerStyle> <GridViewColumn DisplayMemberBinding="{Binding Path=Key}" /> <GridViewColumn DisplayMemberBinding="{Binding Path=Value}" />
316 Views
1 comments
Sub ToggleMvcBuildViews() DTE.ExecuteCommand("Project.UnloadProject") DTE.ExecuteCommand("OtherContextMenus.StubProject.EditProjectFile") Dim wasSetToTrue As Boolean = SetMvcBuildView(True) Dim wasSetToFalse As Boolean If Not wasSetToTrue Then wasSetToFalse = SetMvcBuildView(False) End If
769 Views
no comments
<var columnClass="new [] {'span-11 column', 'span-11 column last' }" /> <div each="var item in o.Items" columnClass="${lastClass[itemIndex%2]}"> </div>
295 Views
no comments
public static void ExportToJpeg() { prepare(true); SaveFileDialog saveDialog = new SaveFileDialog { Filter = "JPEG Files (*.jpeg)|*.jpeg", DefaultExt = ".jpeg", }; if ((bool)saveDialog.ShowDialog()) { using (Stream fileStream = saveDialog.OpenFile()) { WriteableBitmap bitmap = new WriteableBitmap(containerPanel, null);
885 Views
no comments
[Precompile] public class WorkoutController : Controller { public ActionResult Index() { var workouts = new WorkoutRepository().GetAll(); ViewData["workouts"] = new WorkoutIndexViewModel().Render(workouts); return View(); }
261 Views
no comments
public class ShowSnippetViewModel { public ShowSnippetViewModel(SnippetController controller) { this.Controller = controller; } SnippetController Controller = null;
204 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) {
217 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
