WPF
ビハインドでMarginを一定間隔で毎回生成することで移動させます。 //XAML
UpdateSourceTriggerにProportyChanged指定で入力中に反映できます。 <TextBox Text="{Binding Mode=TwoWay, Path=str, UpdateSourceTrigger=PropertyChanged }" /> <TextBlock Text="{Binding Mode=TwoWay, Path=str}" /> バインドしているのはstring型のプロパティです。 入力するとTextBlockにも同時に反映されます。</textblock></textbox>
前回の記事でフォームで画像表示するのがアレな気がしたのでWPFでやりました。参照にPresentationFrameworkとPresentationCoreとWindowsBaseを追加します。 MainメソッドにSTAThread属性を追加します。 using System; using System.Windows; using System.Wi…