質問編集履歴
1
Button の定義を記載しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,3 +13,75 @@
|
|
13
13
|
|
14
14
|
|
15
15
|
よろしくお願いします。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
現在ボタンに画像を設定して、とりあえず押したら(IsMouseOverも)透明度を変えています
|
24
|
+
|
25
|
+
```ここに言語を入力
|
26
|
+
|
27
|
+
<Button x:Name="Button_Next" Content="" Margin="128,768,0,0" Width="1792" Height="464" Click="Button_Next_Click" BorderBrush="{x:Null}" Foreground="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="1" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
|
28
|
+
|
29
|
+
<Button.Style>
|
30
|
+
|
31
|
+
<Style TargetType="Button">
|
32
|
+
|
33
|
+
<Setter Property="Template">
|
34
|
+
|
35
|
+
<Setter.Value>
|
36
|
+
|
37
|
+
<ControlTemplate TargetType="Button">
|
38
|
+
|
39
|
+
<Border Name="border" BorderThickness="1" BorderBrush="#00000000">
|
40
|
+
|
41
|
+
<StackPanel Name="panel" Orientation="Horizontal" Background="#00000000">
|
42
|
+
|
43
|
+
<Image Name="image" Source="{StaticResource Image_Button_ON}" />
|
44
|
+
|
45
|
+
</StackPanel>
|
46
|
+
|
47
|
+
</Border>
|
48
|
+
|
49
|
+
<ControlTemplate.Triggers>
|
50
|
+
|
51
|
+
<Trigger Property="IsMouseOver" Value="true">
|
52
|
+
|
53
|
+
<Setter TargetName="border" Property="BorderBrush" Value="#00000000" />
|
54
|
+
|
55
|
+
<!-- <Setter TargetName="image" Property="Source" Value="{StaticResource Image_Button_ON}" /> -->
|
56
|
+
|
57
|
+
<Setter TargetName="image" Property="Opacity" Value="0.8" />
|
58
|
+
|
59
|
+
<Setter TargetName="panel" Property="Background" Value="#00000000" />
|
60
|
+
|
61
|
+
</Trigger>
|
62
|
+
|
63
|
+
<Trigger Property="IsPressed" Value="true">
|
64
|
+
|
65
|
+
<Setter TargetName="border" Property="BorderBrush" Value="#00000000" />
|
66
|
+
|
67
|
+
<Setter TargetName="image" Property="Opacity" Value="0.8" />
|
68
|
+
|
69
|
+
<Setter TargetName="panel" Property="Background" Value="#00000000" />
|
70
|
+
|
71
|
+
</Trigger>
|
72
|
+
|
73
|
+
</ControlTemplate.Triggers>
|
74
|
+
|
75
|
+
</ControlTemplate>
|
76
|
+
|
77
|
+
</Setter.Value>
|
78
|
+
|
79
|
+
</Setter>
|
80
|
+
|
81
|
+
</Style>
|
82
|
+
|
83
|
+
</Button.Style>
|
84
|
+
|
85
|
+
</Button>
|
86
|
+
|
87
|
+
```
|