Blog Home  Home Feed your aggregator (RSS 2.0)  
kevin Mocha - Resouces and Path in WPF
Bookmarks collected from web.
 
 Tuesday, April 08, 2008

First, make sure the OpenHandCursor.cur file is marked as Resource (not EmbeddedResource) in the referenced assembly.

 

Code Block

 

// use resource in local assembly

// new Uri("pack://application:,,,/folder/filename.cur")

// use resource in referenced assembly

// new Uri("yourAssemblyName;component/folder/filename.cur"
// ,UriKind.Relative)

Stream cursorStream =

Application.GetResourceStream(new Uri    ("CursorLib;component/cursors/help.cur",
UriKind.Relative)).Stream;

this.Cursor = new Cursor(cursorStream);

Tuesday, April 08, 2008 6:11:08 PM UTC  #    Comments [0]    |  Trackback
Copyright © 2009 Kevin Mocha. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: