Windows8程序开发小技巧---在代码中使用Segoe UI Symbol图标字体及常用图标列表

在windows商店应用程序开发中经常会Segoe UI Symbol图标符号,在xaml中使用很简单,如下边的代码

            <StackPanel Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" Margin="10,5,5,5" Orientation="Horizontal" >

                <Button Content="&#xE100;" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontFamily="Segoe UI Symbol" FontSize="24">

                </Button>

                <Button Content="&#xE101;" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontFamily="Segoe UI Symbol" FontSize="24"/>

                <Button x:Name="btnAutoPlay" Content="&#xE102;" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontFamily="Segoe UI Symbol" FontSize="24" Tapped="btnAutoPlay_Tapped"/>

                <Button Content="&#xE103;" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FontFamily="Segoe UI Symbol" FontSize="24"/>

            </StackPanel>

那么在.cs代码中应该如何来使用呢,很简单,见如下代码

this.btnAutoPlay.Content = char.ConvertFromUtf32(0xE102);

常用图标列表:

红心大战

星形评级

复选框组件

单选按钮控件

杂项

滚动条箭头

渐进式公开箭头

你可能感兴趣的:(windows)