Architect's Log

I'm a Cloud Architect. I'm highly motivated to reduce toils with driving DevOps.

単純なバインディング

アプリ実行

起動


入力


ソースコード

App.xaml
<Application x:Class="HelloWorld.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
</Application>
MainWindow.xaml
<Window x:Class="HelloWorld.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="150" Width="200">
    <StackPanel>
        <TextBox x:Name="textBox1" />
        <ContentControl
            Margin="5"
            Content="{Binding ElementName=textBox1, Path=Text}"
        />
    </StackPanel>
</Window>