サンプル

画面上のボタンのテンプレートをすべて変更する簡単な例

以下をResourceに入れる
		<Style TargetType="{x:Type Button}">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Border BorderThickness="2" BorderBrush="White" CornerRadius="5" Padding="2">
							<TextBlock Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center">button</TextBlock>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

このページへのコメント

ControlTemplate - WPF memo - Seesaa Wiki鐃淑ワ申鐃緒申鐃緒申鐃緒申 for 鐃緒申鐃殉¥申鐃夙フワ申鐃緒申 ≪潟若 ≪ http://www.pslcbi.com/moncler2014.html

0
Posted by ≪潟若 ≪ 2013年12月07日(土) 13:34:42 返信

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

どなたでも編集できます