2012年2月3日金曜日

WPFのはじめ

Visual Studio起動。ファイル→新規作成→プロジェクト→WPF アプリケーションで作成。

XAMLファイルにてデザイン編集を行うことが出来る。
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
    </Grid>
</Window>
WindowタグがC#でいうフォームの変わり。
Gridがフォーム上に配置したパネルみたいなもの。コンテナ コントロールというらしい。