Win 8 Metro denetimi için özel bir ControlTemplate (XAML) yazarken, VisualState geçişlerine göre denetimi güncelleştirmek için VisualStateManager'ı kullanmamız gerekir. Hepsini kapa Bu Sayfada Hepsini aç Hepsini kapa Belirtiler VisualStateGroup "CommonStates" belgelenen ve diğer VisualStates "PointerOver" ve "Normal" dışında başka tanımlanmış nerede aşağıdaki örnek tüm MSDN üzerinde görüyorum, ancak bulamıyorum. Bir düğme için varsayılan ControlTemplate'i bulmak için SDK'ya girmeniz gerekiyor mu? Öyleyse nerede?Windows 8 için olası VisualStates Metro denetimleri nerede belgeleniyor?
<ControlTemplate TargetType="Button">
<Grid >
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualStateGroup.Transitions>
<!--Take one half second to transition to the PointerOver state.-->
<VisualTransition To="PointerOver"
GeneratedDuration="0:0:0.5"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="Normal" />
<!--Change the SolidColorBrush, ButtonBrush, to red when the
Pointer is over the button.-->
<VisualState x:Name="PointerOver">
<Storyboard>
<ColorAnimation Storyboard.TargetName="ButtonBrush"
Storyboard.TargetProperty="Color" To="Red" />
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid.Background>
<SolidColorBrush x:Name="ButtonBrush" Color="Green"/>
</Grid.Background>
</Grid>
</ControlTemplate>
Ayrıca bkz: http://stackoverflow.com/questions/10861160/control-styles-and-templates-for-windows-8-metro-ui –