茄子在线看片免费人成视频,午夜福利精品a在线观看,国产高清自产拍在线观看,久久综合久久狠狠综合

    <s id="ddbnn"></s>
  • <sub id="ddbnn"><ol id="ddbnn"></ol></sub>

  • <legend id="ddbnn"></legend><s id="ddbnn"></s>

    XAML中Button重繪為圓形的方法技巧
    來源:易賢網(wǎng) 閱讀:1489 次 日期:2014-07-22 11:18:31
    溫馨提示:易賢網(wǎng)小編為您整理了“XAML中Button重繪為圓形的方法技巧”,方便廣大網(wǎng)友查閱!

    在用XAML布局的時候,有時候為了使界面Metro化,有些Button要使用圓形代替默認的長方形。以下的Button樣式可以解決這個問題,可以根據(jù)自己的需要再加以修改。當然如果你熟悉Bland的話可以直接使用它來繪制你需要的樣式,但是貼代碼是否更快一點呢?

    代碼如下:

    <Style x:Key="btnNext" TargetType="Button">

    <Setter Property="Template">

    <Setter.Value>

    <ControlTemplate TargetType="Button">

    <Grid>

    <VisualStateManager.VisualStateGroups>

    <VisualStateGroup x:Name="CommonStates">

    <VisualState x:Name="Pressed">

    <Storyboard>

    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="rectangle">

    <DiscreteObjectKeyFrame KeyTime="0">

    <DiscreteObjectKeyFrame.Value>

    <Thickness>-3</Thickness>

    </DiscreteObjectKeyFrame.Value>

    </DiscreteObjectKeyFrame>

    </ObjectAnimationUsingKeyFrames>

    </Storyboard>

    </VisualState>

    <VisualState x:Name="Normal"/>

    <VisualState x:Name="Disabled"/>

    <VisualState x:Name="MouseOver"/>

    </VisualStateGroup>

    <VisualStateGroup x:Name="FocusStates">

    <VisualState x:Name="Focused"/>

    </VisualStateGroup>

    </VisualStateManager.VisualStateGroups>

    <Rectangle x:Name="rectangle" RadiusY="25" RadiusX="25" Stroke="Blue" StrokeThickness="4">

    </Rectangle>

    <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>

    </Grid>

    </ControlTemplate>

    </Setter.Value>

    </Setter>

    <Setter Property="Margin" Value="5"/>

    <Setter Property="Width" Value="50"/>

    <Setter Property="Height" Value="50"/>

    <Setter Property="FontSize" Value="120"/>

    <Setter Property="Foreground" Value="White"/>

    </Style>

    更多信息請查看IT技術專欄

    更多信息請查看網(wǎng)頁制作
    易賢網(wǎng)手機網(wǎng)站地址:XAML中Button重繪為圓形的方法技巧
    由于各方面情況的不斷調整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復僅供參考,敬請考生以權威部門公布的正式信息和咨詢?yōu)闇剩?/div>

    2026國考·省考課程試聽報名

    • 報班類型
    • 姓名
    • 手機號
    • 驗證碼
    關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網(wǎng)