门。
- 4
478
12'16
53
35
項。
717
24 36
中
14
05 बटा 3 प्लस 3 बटे 5 हल करो
Answers
Answer:
have a WPF 4.0 application that utilizes some custom 16x16 icons in things like menu commands and the like. I'd like to have (for now) two sets of icons, the default Vista/7-ish ones and some XP-ish ones. What I want is to have the current OS determine which icons to use.
Right now, I've got BitmapImage resources defined in theme resource dictionaries (i.e. Aero.NormalColor.xaml, etc.) that point to a specific PNG resource.
<!-- Aero.NormalColor.xaml -->
<BitmapImage x:Key="IconSave" UriSource="/MyWPFApp;component/Resources/Icons16/Aero/disk.png"/>
<!-- Luna.NormalColor.xaml -->
<BitmapImage x:Key="IconSave" UriSource="/MyWPFApp;component/Resources/Icons16/Luna/disk.png"/>
Anywhere in my app that wants to show an icon sets the Image/Icon's source property as a StaticResource to one of these BitmapImages.