MenuItem.Icon Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the icon that appears in a MenuItem.
public:
property System::Object ^ Icon { System::Object ^ get(); void set(System::Object ^ value); };
[System.ComponentModel.Bindable(true)]
public object Icon { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.Icon : obj with get, set
Public Property Icon As Object
Property Value
The icon that appears in a MenuItem. The default value is null
.
- Attributes
Examples
The following example creates a menu item with an icon.
<MenuItem Header="New">
<MenuItem.Icon>
<Image Source="data/cat.png"/>
</MenuItem.Icon>
</MenuItem>
Remarks
Many Menu controls have more than just text in the MenuItem elements. Often there are icons, check marks, accelerators, and arrows to indicate submenus.
Dependency Property Information
Identifier field | IconProperty |
Metadata properties set to true |
None |
Applies to
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.