Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0wpf@3375 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
6 changed files with 68 additions and 42 deletions
@ -1,21 +0,0 @@
@@ -1,21 +0,0 @@
|
||||
using System; |
||||
using System.Windows.Markup; |
||||
using ICSharpCode.Core.Presentation; |
||||
|
||||
namespace ICSharpCode.WpfDesign.AddIn |
||||
{ |
||||
class GetBitmapExtension : MarkupExtension |
||||
{ |
||||
public GetBitmapExtension(string key) |
||||
{ |
||||
this.key = key; |
||||
} |
||||
|
||||
protected string key; |
||||
|
||||
public override object ProvideValue(IServiceProvider sp) |
||||
{ |
||||
return PresentationResourceService.GetBitmapSource(key); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Windows.Markup; |
||||
|
||||
namespace ICSharpCode.Core.Presentation |
||||
{ |
||||
/// <summary>
|
||||
/// Markup extension that gets a BitmapSource object for a ResourceService bitmap.
|
||||
/// </summary>
|
||||
public class GetBitmapExtension : MarkupExtension |
||||
{ |
||||
public GetBitmapExtension(string key) |
||||
{ |
||||
this.key = key; |
||||
} |
||||
|
||||
protected string key; |
||||
|
||||
public override object ProvideValue(IServiceProvider sp) |
||||
{ |
||||
return PresentationResourceService.GetBitmapSource(key); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue