Buttons.xaml
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:4k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. <Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
  2. <Border VerticalAlignment="Center" HorizontalAlignment="Center" BorderBrush="Black" BorderThickness="2">
  3. <StackPanel  Orientation="Horizontal" KeyboardNavigation.TabNavigation="Cycle">
  4. <Border Background="Yellow" Padding="3">
  5. <StackPanel >
  6. <Button Margin="2" Background="Red"  Cursor="Hand" Content="This is Large Button"></Button>
  7. <Button Margin="2" Background="LightGreen" HorizontalAlignment="Center" Cursor="Hand">This is Button</Button>
  8. <Button Margin="2" Background="LightBlue"  Cursor="Hand">
  9. <TextBlock HorizontalAlignment="Center">This is Button</TextBlock>
  10. </Button>
  11. <Button Margin="2" Cursor="Hand">
  12. <TextBlock HorizontalAlignment="Center">System Button</TextBlock>
  13. </Button>
  14. <Button Background="Gold" Margin="2" Cursor="Hand" Padding="2" >
  15. <StackPanel Orientation = "Horizontal"  HorizontalAlignment="Center">
  16. <Ellipse Width = "15" Height = "15" Fill = "Red" />
  17. <Ellipse Width = "15" Height = "15" Fill = "Green" />
  18. <Ellipse Width = "15" Height = "15" Fill = "Blue" />
  19. </StackPanel>
  20. </Button>
  21. <Button  Margin="2">
  22. <StackPanel Orientation = "Horizontal"  HorizontalAlignment="Center">
  23. <Image Source="file://Help.bmp"/>
  24. <TextBlock VerticalAlignment="Center" Padding="2, 0, 0, 0">Help</TextBlock>
  25. </StackPanel>
  26. </Button>
  27. <TextBlock Margin = "2">Text with <Button Background="Cyan"  Cursor="Hand" Width= "14" Height="14"></Button> inside</TextBlock>
  28. </StackPanel>
  29. </Border>
  30. <Border Background="Pink" Padding="3">
  31. <StackPanel>
  32. <CheckBox Margin="1">Just Check Box</CheckBox>
  33. <CheckBox Margin="1" IsChecked="True" Padding="0">Another Check Box</CheckBox>
  34. <CheckBox Margin="1" IsThreeState="True" IsChecked="" Padding="0">3-State Check Box</CheckBox>
  35. </StackPanel>
  36. </Border>
  37. <Border Background="Cyan" Padding="3">
  38. <StackPanel >
  39. <StackPanel>
  40. <RadioButton Margin="1">Just Radio Button</RadioButton>
  41. <RadioButton Margin="1" Padding="0">Another Radio Button</RadioButton>
  42. <RadioButton Margin="1" IsChecked="" Padding="0"><TextBlock>Radio With <Hyperlink>Link</Hyperlink></TextBlock></RadioButton>
  43. </StackPanel>
  44. <StackPanel Margin = "0, 7, 0, 0">
  45. <StackPanel.Resources>
  46. <Style x:Key="{x:Type RadioButton}" TargetType="RadioButton">
  47. <Style.Triggers>
  48. <Trigger Property="IsChecked" Value="True">
  49. <Trigger.Setters>
  50. <Setter Property="TextElement.FontWeight" Value="Bold"/>
  51. </Trigger.Setters>
  52. </Trigger>
  53. <Trigger Property="IsMouseOver" Value="True">
  54. <Trigger.Setters>
  55. <Setter Property="TextBlock.TextDecorations" Value="Underline"/>
  56. </Trigger.Setters>
  57. </Trigger>
  58. </Style.Triggers>
  59. </Style>
  60. </StackPanel.Resources>
  61. <RadioButton Margin="1" IsChecked="True"><TextBlock>Remove Only Inbox <Run FontWeight="Normal" Foreground = "Green">[10]</Run></TextBlock></RadioButton>
  62. <RadioButton Margin="1"><TextBlock>Remove All Items <Run FontWeight="Normal" Foreground = "Red">[10]</Run></TextBlock></RadioButton>
  63. </StackPanel>
  64. <Border Margin = "0, 7, 0, 0" BorderBrush="Black" Background="White" BorderThickness="1"><ScrollViewer Height="60">
  65. <StackPanel >
  66. <RadioButton Margin="1" IsChecked="True" Content="Item 1"/>
  67. <RadioButton Margin="1" Content="Item 2"/>
  68. <RadioButton Margin="1" Content="Item 3"/>
  69. <RadioButton Margin="1" Content="Item 4"/>
  70. <RadioButton Margin="1"  Content="Item 5"/>
  71. </StackPanel>
  72. </ScrollViewer></Border>
  73. </StackPanel>
  74. </Border>
  75. </StackPanel>
  76. </Border>
  77. </Page>