8,735
社区成员
发帖
与我相关
我的任务
分享
<ComboBox Width="200">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="3"></UniformGrid>
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBoxItem>1</ComboBoxItem>
<ComboBoxItem>2</ComboBoxItem>
<ComboBoxItem>3</ComboBoxItem>
<ComboBoxItem>4</ComboBoxItem>
<ComboBoxItem>5</ComboBoxItem>
<ComboBoxItem>6</ComboBoxItem>
</ComboBox>
<TextBox>
<TextBox.Resources>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource form_textbox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<StackPanel>
<Grid x:Name="LayoutRoot" ButtonBase.Click="LayoutRoot_Click" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.2*"/>
</Grid.RowDefinitions>
<Button Content="1" Margin="2" x:Name="key1" Grid.Row="1" />
<Button Content="2" Margin="2" Grid.Column="1" x:Name="key2" Grid.Row="1" />
<Button Content="3" Margin="2" Grid.Column="2" x:Name="key3" Grid.Row="1" />
<Button Content="4" Margin="2" Grid.Row="2" x:Name="key4" />
<Button Content="5" Margin="2" Grid.Row="2" Grid.Column="1" x:Name="key5" />
<Button Content="6" Margin="2" Grid.Row="2" Grid.Column="2" x:Name="key6" />
<Button Content="7" Margin="2" Grid.Row="3" x:Name="key7" />
<Button Content="8" Margin="2" Grid.Row="3" Grid.Column="1" x:Name="key8" />
<Button Content="9" Margin="2" Grid.Row="3" Grid.Column="2" x:Name="key9" />
<Button Content="*" Margin="2" Grid.Row="4" x:Name="keyStar" />
<Button Content="0" Margin="2" Grid.Row="4" Grid.Column="1" x:Name="key0" />
<Button Content="#" Margin="2" Grid.Row="4" Grid.Column="2" x:Name="keySharp" />
<Button Content="退格" Margin="2" Grid.Row="5" x:Name="keyBackspace" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF4FDE43" Offset="0"/>
<GradientStop Color="#FF4EB832" Offset="0.5"/>
<GradientStop Color="#FF4FDE43" Offset="1"/>
</LinearGradientBrush>
</Button.Background>
</Button>
<Button Content="清除" Margin="2" Grid.Row="5" Grid.Column="1" x:Name="keyClear" />
<Button Content="确定" Margin="2" Grid.Row="5" Grid.Column="2" x:Name="keyOk">
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFFCE49" Offset="0"/>
<GradientStop Color="#FFF9B319" Offset="0.5"/>
<GradientStop Color="#FFFFCE49" Offset="1"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Grid>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TextBox.Resources>
</TextBox>