VS2015 + WPF + C#
AeroLiteテーマのコントロールにStyleを使ってプロパティ値の設定をしたいのですが、うまくいきません。
PresentationFramework.AeroLite.dllの参照を追加し、xamlは以下の通り記述しました。
プロパティ値を直接指定したButtonコントロールはAeroLiteテーマで表示されますが、
Styleを使ったButtonコントロールはAeroテーマで表示されます。
何か足りない参照や記述などがあるのでしょうか?
<Window x:Class="test_aerolite.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:test_aerolite" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <Style TargetType="{x:Type Button}" x:Key="buttonstyle"> <Setter Property="Width" Value="200" /> <Setter Property="Height" Value="50" /> <Setter Property="Margin" Value="2" /> </Style> </Window.Resources> <StackPanel VerticalAlignment="Center"> <StackPanel.Resources> <ResourceDictionary Source="/PresentationFramework.AeroLite;component/themes/aerolite.normalcolor.xaml" /> </StackPanel.Resources> <Button Content="button with style" Style="{StaticResource buttonstyle}" /> <Button Content="button without style" Width="200" Height="50" Margin="2" /> </StackPanel> </Window>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/12/16 07:50
2016/12/16 07:55
2016/12/16 07:59