Click here to Skip to main content
15,887,304 members
Home / Discussions / C#
   

C#

 
GeneralRe: General C# question Pin
Christian Graus20-Dec-07 15:15
protectorChristian Graus20-Dec-07 15:15 
GeneralRe: General C# question Pin
PIEBALDconsult20-Dec-07 15:27
mvePIEBALDconsult20-Dec-07 15:27 
GeneralRe: General C# question Pin
Christian Graus20-Dec-07 15:51
protectorChristian Graus20-Dec-07 15:51 
GeneralRe: General C# question Pin
Paul Conrad23-Dec-07 7:21
professionalPaul Conrad23-Dec-07 7:21 
QuestionIE7 Style Button? Pin
Grizzley9020-Dec-07 14:30
Grizzley9020-Dec-07 14:30 
GeneralRe: IE7 Style Button? Pin
Christian Graus20-Dec-07 15:11
protectorChristian Graus20-Dec-07 15:11 
QuestionVector-based icons in XAML menu items? Pin
David Veeneman20-Dec-07 14:08
David Veeneman20-Dec-07 14:08 
GeneralRe: Vector-based icons in XAML menu items? Pin
David Veeneman21-Dec-07 12:12
David Veeneman21-Dec-07 12:12 
Here is the solution I finally implemented: I created a Resource Dictionary that contains the menu item icons I want to use. That gets all of the icons into one convenient container. Then I referenced the individual icon resources in my <MenuItem.Icon> markup. Here are the steps involved:

I used Expression Design to create my XAML icons, one icon per layer. I gave each layer the name of the icon it held. Then I exported the Design file as XAML, setting the Document Format options to:

-- Export as resource dictionary;
-- Group by layers; and
-- Output as drawing image.

I left the effects options as they were.

In VS 2008, I added the resource dictionary to my WPF project, and referenced the dictionary in App.xaml:

<Application.Resources>
<ResourceDictionary Source="MenuIcons.xaml" />
</Application.Resources>

With that done, I simply reference the resource in the <MenuItem.Icon> markup for the window that contains the menu:

<MenuItem Header="Open File">
<MenuItem.Icon>
<Image Source="{StaticResource iconOpenFile}" />
</MenuItem.Icon>
</MenuItem>
David Veeneman
www.veeneman.com

QuestionTreeView Question--Please help Pin
T4AMD20-Dec-07 13:53
T4AMD20-Dec-07 13:53 
GeneralRe: TreeView Question--Please help Pin
Anthony Mushrow20-Dec-07 14:05
professionalAnthony Mushrow20-Dec-07 14:05 
QuestionRe: TreeView Question--Please help Pin
T4AMD20-Dec-07 14:08
T4AMD20-Dec-07 14:08 
GeneralRe: TreeView Question--Please help Pin
Anthony Mushrow20-Dec-07 14:13
professionalAnthony Mushrow20-Dec-07 14:13 
QuestionRe: TreeView Question--Please help Pin
T4AMD20-Dec-07 14:17
T4AMD20-Dec-07 14:17 
GeneralRe: TreeView Question--Please help Pin
Anthony Mushrow20-Dec-07 14:37
professionalAnthony Mushrow20-Dec-07 14:37 
GeneralRe: TreeView Question--Please help Pin
T4AMD20-Dec-07 14:42
T4AMD20-Dec-07 14:42 
GeneralBeginner programming question Pin
cmh62320-Dec-07 13:34
cmh62320-Dec-07 13:34 
GeneralRe: Beginner programming question Pin
Jordanwb20-Dec-07 13:46
Jordanwb20-Dec-07 13:46 
GeneralRe: Beginner programming question PinPopular
Christian Graus20-Dec-07 14:12
protectorChristian Graus20-Dec-07 14:12 
GeneralRe: Beginner programming question Pin
Jordanwb20-Dec-07 14:23
Jordanwb20-Dec-07 14:23 
GeneralRe: Beginner programming question Pin
Christian Graus20-Dec-07 15:16
protectorChristian Graus20-Dec-07 15:16 
GeneralRe: Beginner programming question Pin
Paul Conrad23-Dec-07 7:23
professionalPaul Conrad23-Dec-07 7:23 
GeneralRe: Beginner programming question Pin
DavidNohejl20-Dec-07 23:55
DavidNohejl20-Dec-07 23:55 
GeneralRe: Beginner programming question Pin
Paul Conrad23-Dec-07 7:24
professionalPaul Conrad23-Dec-07 7:24 
GeneralRe: Beginner programming question Pin
Jordanwb23-Dec-07 9:14
Jordanwb23-Dec-07 9:14 
GeneralRe: Beginner programming question Pin
Paul Conrad23-Dec-07 9:41
professionalPaul Conrad23-Dec-07 9:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.