<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3672303154647969479</id><updated>2011-04-21T15:06:10.542-07:00</updated><title type='text'>Tschaena's Blog</title><subtitle type='html'>This blog is about .NET Technologies.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tschaena.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3672303154647969479/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tschaena.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jan</name><uri>http://www.blogger.com/profile/12034105152151421316</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3672303154647969479.post-5506704968575313791</id><published>2008-09-08T23:11:00.000-07:00</published><updated>2008-09-08T23:25:02.635-07:00</updated><title type='text'>Workaround to avoid WPF Designer Error in VS 2008 SP1</title><content type='html'>&lt;span style="font-family:arial;"&gt;If you are working with the WPF designer of Visual Studio 2008 SP1 you might get the following error message:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(255, 102, 102);font-family:courier new;" &gt;Object reference not set to an instance of an object.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);font-family:courier new;" &gt;   at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String identity, AssemblyReferenceProvider assemblyReferences, IEnumerable`1 assemblyFolders)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 102, 102);font-family:courier new;" &gt;   at MS.Internal.Providers.VSDesignerContext.GetIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy, AssemblyReferenceProvider assemblyReferences)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;   at MS.Internal.Providers.VSDesignerContext.Initialize(IServiceProvider provider, IVsHierarchy hierarchy, UInt32 itemid, Object docDataObj)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;If you get this error, make sure your startup project is a managed .NET project. The WPF designer seems to have a problem with C++ projects selected as startup project of your solution.&lt;br /&gt;You can still start the win32 application for debugging by configuring the debug options of your managed .NET project ("Start external program" setting).&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3672303154647969479-5506704968575313791?l=tschaena.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tschaena.blogspot.com/feeds/5506704968575313791/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3672303154647969479&amp;postID=5506704968575313791' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3672303154647969479/posts/default/5506704968575313791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3672303154647969479/posts/default/5506704968575313791'/><link rel='alternate' type='text/html' href='http://tschaena.blogspot.com/2008/09/workaround-to-avoid-wpf-designer-error.html' title='Workaround to avoid WPF Designer Error in VS 2008 SP1'/><author><name>Jan</name><uri>http://www.blogger.com/profile/12034105152151421316</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3672303154647969479.post-756140269593636247</id><published>2008-09-04T00:29:00.000-07:00</published><updated>2008-09-04T00:33:55.451-07:00</updated><title type='text'>Using Application resources within Win32 hosted WPF application</title><content type='html'>&lt;span style="font-family:arial;"&gt;Hosting a WPF application within a Win32 application can be very cumbersome when it comes to application wide resources. By default there is no Application.Current set when a WPF application is hosted and the dispatcher thread is part of the Win32 world. In an &lt;a href="http://www.drwpf.com/blog/Home/tabid/36/EntryID/10/Default.aspx"&gt;article of Dr. WPF&lt;/a&gt; he describes, how such an Application.Current can be created by your own.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;His method works very well but when it comes to replace a merged dictionary (e.g. for doing some kind of “skin” change during runtime), the following tweak seems to be required:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;// This window is required that Resource changes (like new skin)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;// are propagated to all windows and controls&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;var window = new Window();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;window.Content = shell;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;IntPtr hwndParent = new IntPtr(1); // Here you need the window handle of the parent window&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;HwndSourceParameters parameters = new HwndSourceParameters();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;parameters.WindowStyle = (int)(WS_VISIBLE | WS_CHILD);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;parameters.ParentWindow = hwndParent;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hwndSource = new HwndSource(parameters);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hwndSource.RootVisual = shell;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;hwndSource.SizeToContent = System.Windows.SizeToContent.Manual;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3672303154647969479-756140269593636247?l=tschaena.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tschaena.blogspot.com/feeds/756140269593636247/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3672303154647969479&amp;postID=756140269593636247' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3672303154647969479/posts/default/756140269593636247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3672303154647969479/posts/default/756140269593636247'/><link rel='alternate' type='text/html' href='http://tschaena.blogspot.com/2008/09/using-application-resources-within.html' title='Using Application resources within Win32 hosted WPF application'/><author><name>Jan</name><uri>http://www.blogger.com/profile/12034105152151421316</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
