FontIcon.Glyph Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur kode karakter yang mengidentifikasi glyph ikon.
public:
property Platform::String ^ Glyph { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring Glyph();
void Glyph(winrt::hstring value);
public string Glyph { get; set; }
var string = fontIcon.glyph;
fontIcon.glyph = string;
Public Property Glyph As String
<FontIcon Glyph="characterCode"/>
Nilai Properti
Kode karakter heksadesimal untuk glyph ikon.
Contoh
var newAppBarButton = new AppBarButton();
var fontIcon = new FontIcon();
fontIcon.FontFamily = new FontFamily("Segoe MDL2 Assets");
fontIcon.Glyph = "\xE790";
newAppBarButton.Icon = fontIcon;
using namespace winrt::Windows::UI::Xaml;
...
auto newAppBarButton = Controls::AppBarButton{};
auto fontIcon = Controls::FontIcon{};
fontIcon.FontFamily(Media::FontFamily{ L"Segoe MDL2 Assets" });
fontIcon.Glyph(L"\xE790");
newAppBarButton.Icon(fontIcon);