首页 > 代码库 > WP - 控件基础-按钮控件
WP - 控件基础-按钮控件
Button;HyperlinkButton;RepeatButton;ToggleButton
1、Button:
<button content="Button" height="72" horizontalalignment="Left" margin="171,200,0,0" name="button1"
VerticalAlignment="Top" Width="160"
Background="Blue" Foreground="Red" BorderBrush="Green"
BorderThickness="3"/>
<button content="Button" height="96" horizontalalignment="Left" margin="147,298,0,0"
Name="button2" VerticalAlignment="Top" Width="229" >
<ignore_js_op>
2、HyperlinkButton:
超链接按钮,用于本地、Web
<HyperlinkButton Content="GoToPage1" NavigateUri="http://msdn.microsoft.com/zh-cn/ff380145.aspx" TargetName="_self"> </HyperlinkButton> <HyperlinkButton Height="60" Content="ToMainPage" Margin="100,197,100,43" NavigateUri="/MainPage.xaml"> <HyperlinkButton.Background> <ImageBrush ImageSource="/images/11.jpg"></ImageBrush> </HyperlinkButton.Background> </HyperlinkButton>
<ignore_js_op>
3、RepeatButton:
在按下鼠标不放时,不断的发出click事件。其它和Button是一样的。
4、ToggleButton:
开关按钮,三种状态Checked、UnChecked、Indeterminate
只有IsThreeState为True才拥有这三种状态,否则只有Checked和UnChecked两种状态。
详细说明:http://wp.662p.com/thread-7942-1-1.html
WP - 控件基础-按钮控件