CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of binding
XML
SelectedItem="{Binding TheProperty, PresentationTraceSources.TraceLevel=High}"
by patrick   March 12, 2012 @ 5:46am
38 Views
no comments
 
C#
<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sys="clr-namespace:System;assembly=mscorlib">
  <Grid>
    <Grid.DataContext>
      <x:Array Type="sys:String">
        <sys:String>Red</sys:String>
        <sys:String>Yellow</sys:String>
        <sys:String>Blue</sys:String>
by Vijay Sharma   January 07, 2011 @ 8:55am
180 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
by Thom Lamb   May 19, 2010 @ 7:42am
329 Views
no comments
 
C#
/*
 
DataSet myDataSet;
Example
 
If you have a common language runtime (CLR) object you would like to bind to from XAML, one way you can make the object available for binding is to define it as a resource and give it an x:Key. In the following example, you have a Person object with a string property named PersonName. The Person object is defined in the namespace called SDKSample.
XAML
Copy
 
<Window
by FoxyComputersLtd   April 24, 2010 @ 8:56am
309 Views
no comments
 
C#
/// <summary>
/// Return all properties from a type up to a specified base type in the inheritance hierarchy
/// </summary>
/// <param name="type">Type that will be examined</param>
/// <param name="baseType">Where to stop in the inheritance hierarchy. Must be a type that first parameter inherits from
/// </param>
/// <returns>A list of all found properties</returns>
public static List<PropertyInfo> GetAllProperties(Type type, Type baseType)
{
   List<PropertyInfo> properties = new List<PropertyInfo>();
by Robert Andersson   March 11, 2010 @ 12:25pm
336 Views
no comments
 
C#
 
   public class ListUtils
   {
       /// <summary>
       /// Manual ComboBox binding and adding a first item
       /// 
       /// Assumes you're binding to an enumerable list of some sort
       /// and you're binding to Properties (not fields)
       /// </summary>
       public static void BindWithFirstItem(IEnumerable items, ComboBox listBox,
by Rick Strahl   October 27, 2009 @ 3:46pm
766 Views
2 comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate