■ DropDownButton 엘리먼트에서 아이콘을 표시하는 방법을 보여준다.
▶ MainWindow.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
<?xml version="1.0" encoding="utf-8"?> <Window x:Class="TestProject.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TestProject"> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> <DropDownButton HorizontalAlignment="Center" Content="이메일"> <DropDownButton.Flyout> <MenuFlyout Placement="Bottom"> <MenuFlyoutItem Text="발송하기" /> <MenuFlyoutItem Text="회신하기" /> <MenuFlyoutItem Text="모두 회신하기"/> </MenuFlyout> </DropDownButton.Flyout> </DropDownButton> <DropDownButton Margin="0 10 0 0"> <DropDownButton.Content> <FontIcon Glyph=""/> </DropDownButton.Content> <DropDownButton.Flyout> <MenuFlyout Placement="Bottom"> <MenuFlyoutItem Text="발송하기"> <MenuFlyoutItem.Icon> <FontIcon Glyph=""/> </MenuFlyoutItem.Icon> </MenuFlyoutItem> <MenuFlyoutItem Text="회신하기"> <MenuFlyoutItem.Icon> <FontIcon Glyph=""/> </MenuFlyoutItem.Icon> </MenuFlyoutItem> <MenuFlyoutItem Text="모두 회신하기"> <MenuFlyoutItem.Icon> <FontIcon Glyph=""/> </MenuFlyoutItem.Icon> </MenuFlyoutItem> </MenuFlyout> </DropDownButton.Flyout> </DropDownButton> </StackPanel> </Window> |