Architect's Log

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

2010-11-16から1日間の記事一覧

複数のコントロール間でプロパティをバインドする

MyWindow.xaml SliderのValueをTextBoxのテキストにバインドする。 <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"> <StackPanel> </stackpanel></window>

複数のコントロールで色定義を共有する

MyWindow.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"> <Window.Resources> <SolidColorBrush x:Key='bg' Color='Red' /> </solidcolorbrush></window.resources></window>

コントロールを操作する

MyWindow.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"> <WrapPanel> <TextBox Name="textBox" Width="100"></TextBox> </wrappanel></window>