Click here to Skip to main content
15,905,414 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with previleges with fileInfo/directoryInfo objects for moving a file Pin
Raheem MA20-Dec-07 19:07
Raheem MA20-Dec-07 19:07 
QuestionInternational Keyboard Input Pin
rcollina20-Dec-07 17:20
rcollina20-Dec-07 17:20 
GeneralRe: International Keyboard Input Pin
Paul Conrad22-Dec-07 9:17
professionalPaul Conrad22-Dec-07 9:17 
GeneralRe: International Keyboard Input Pin
rcollina24-Dec-07 4:46
rcollina24-Dec-07 4:46 
GeneralRe: International Keyboard Input Pin
Paul Conrad24-Dec-07 4:51
professionalPaul Conrad24-Dec-07 4:51 
GeneralRe: International Keyboard Input Pin
rcollina24-Dec-07 12:15
rcollina24-Dec-07 12:15 
GeneralLINQ to XML Pin
Edmundisme20-Dec-07 16:19
Edmundisme20-Dec-07 16:19 
GeneralRe: LINQ to XML Pin
Judah Gabriel Himango20-Dec-07 16:24
sponsorJudah Gabriel Himango20-Dec-07 16:24 
GeneralRe: LINQ to XML Pin
CKnig20-Dec-07 18:21
CKnig20-Dec-07 18:21 
GeneralRe: LINQ to XML Pin
Edmundisme21-Dec-07 9:59
Edmundisme21-Dec-07 9:59 
Questionhow to get user-submitted info from BBS pages? Pin
sduhd20-Dec-07 16:09
sduhd20-Dec-07 16:09 
QuestionWindows Explorer Hooking Pin
sundarprashanth20-Dec-07 15:43
sundarprashanth20-Dec-07 15:43 
GeneralRe: Windows Explorer Hooking Pin
CKnig20-Dec-07 18:24
CKnig20-Dec-07 18:24 
GeneralGeneral C# question Pin
cmh62320-Dec-07 14:46
cmh62320-Dec-07 14:46 
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 

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.