Architect's Log

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

2011-03-20から1日間の記事一覧

バインディングのプロパティをクラス修飾で指定する

プロパティだけを指定した場合と動作は同じですが、内部でリフレクションを使用しないので、パフォーマンス面で有利です。 アプリ実行 起動 スライダーを移動 ソースコード 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> Main…

データテンプレートを使用する

データテンプレートはデータ(このエントリではHuman)を受け取り、表示ツリーを構築します。 アプリ実行 起動 入力 ソースコード 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

単純なバインディング

アプリ実行 起動 入力 ソースコード 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

動的バインディング

アプリ実行 起動 ボタンクリック ソースコード 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