■ DesignInstance 태그 확장 사용하기

----------------------------------------------------------------------------------------------------

Customer.cs

 

/// <summary>

/// 고객

/// </summary>

public class Customer

{

    //////////////////////////////////////////////////////////////////////////////////////////////////// Property

    ////////////////////////////////////////////////////////////////////////////////////////// Public

 

    #region 이름 - FirstName

 

    /// <summary>

    /// 이름

    /// </summary>

    public string FirstName { get; set; }

 

    #endregion

 

    #region 성 - LastName

 

    /// <summary>

    ///

    /// </summary>

    public string LastName { get; set; }

 

    #endregion

}

 

XAML

 

<Grid x:Name="grid"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:local="clr-namespace:DataBindingApplication"

    d:DataContext="{d:DesignInstance Type=local:Customer}"

    Background="White">

    <TextBox x:Name="textBox"

        Width="200"

        Height="25"

        BorderBrush="Black"

        FontFamily="Times New Roman"

        FontSize="16"

        Text="{Binding Path=FirstName, Mode=TwoWay}" />

</Grid>

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요