<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rssdatehelper="urn:rssdatehelper"><channel><title>bpk.cc</title><link>http://www.bpk.cc</link><pubDate></pubDate><generator>umbraco</generator><description>Generic Collection Of .NET Stuff</description><language>en</language><item><title>compactRSS 1.5 is now available on Windows Marketplace for Mobile</title><link>http://www.bpk.cc/2010/8/14/compactrss-15-is-now-available-on-windows-marketplace-for-mobile.aspx</link><pubDate>Sat, 14 Aug 2010 13:45:48 GMT</pubDate><guid>http://www.bpk.cc/2010/8/14/compactrss-15-is-now-available-on-windows-marketplace-for-mobile.aspx</guid><description><![CDATA[ 
<p>compactRSS 1.5 has successfully completed the certification
process and is <a
href="https://marketplace.windowsphone.com/details.aspx?appId=e8398dc9-eca8-45bc-930f-544a10bdb5e3&amp;retURL=/Default.aspx">
now available</a> on Windows Marketplace for Mobile.</p>

<p>It has been released to most English and German-speaking markets
and is already available in the United States, Austria, Germany and
Switzerland. Within the next few days it should also pop up in the
UK, Canada and Australia while others will follow in the next
weeks.</p>

<p>If you do not live in one of those countries, you can still
switch to any of the above markets on your phone (go to Settings in
your Marketplace app) and buy it there.</p>

<p>As always, <strong>your feedback is very welcome.</strong>
Please use the support E-Mail address shown on marketplace or use
the contact form on this website (or leave a comment). There will
be frequent updates for compactRSS and your feedback will
absolutely be taken into account when developing bug fixes or new
features.</p>
]]></description></item><item><title>compactRSS 1.5 Beta available for download</title><link>http://www.bpk.cc/2010/8/9/compactrss-15-beta-available-for-download.aspx</link><pubDate>Mon, 09 Aug 2010 23:16:50 GMT</pubDate><guid>http://www.bpk.cc/2010/8/9/compactrss-15-beta-available-for-download.aspx</guid><description><![CDATA[ 
<p><strong>UPDATE: compactRSS 1.5 final has now&nbsp;been sent to
certification and the download links have been
removed.</strong></p>

<p>As mentioned in my <a
href="/2010/8/8/compactrss-goes-windows-marketplace-for-mobile.aspx">
previous post</a>, compactRSS will be soon available on Windows
Marketplace for Mobile and will come with some nice new
features.</p>

<p>One big part is localization. compactRSS 1.5 will come with 2
available languages, English and German. Also, some major code
refactoring has happened and the performance should be noticeably
better already now.</p>

<p>If you want to try it out, please feel free to download the 1.5
Beta from the <a href="/products/compactrss.aspx">product page</a>.
Please be aware that the localization to German is still in the
works and therefore not complete.</p>

<p>Feedback is very welcome - please use the contact form on this
website to send it to me.</p>
]]></description></item><item><title>compactRSS goes Windows Marketplace for Mobile</title><link>http://www.bpk.cc/2010/8/8/compactrss-goes-windows-marketplace-for-mobile.aspx</link><pubDate>Sun, 08 Aug 2010 23:16:38 GMT</pubDate><guid>http://www.bpk.cc/2010/8/8/compactrss-goes-windows-marketplace-for-mobile.aspx</guid><description><![CDATA[ 
<p>As you may have heard, Windows Phone 7 hits the store shelves
this fall. This will change the game in the Windows Mobile world
for the customers but even more for the developers. In both cases
this means huge improvements, but only in the case of the
developers this means also a lot of work.</p>

<p>compactRSS, as you know it by now, won't run on Windows Phone 7
devices and I'm currently working on its successor for Windows
Phone 7 (currently named "Vanilla" or "Feed Vanilla", but that is
just a working title), of course completely written from scratch.
It looks great but there's still a long road ahead … but I hope to
have this little tool up on the Marketplace already when the first
customers get their hands on WP7 devices.</p>

<p>Talking about Marketplace, you might also know that Microsoft
changes the game even here. On Windows Phone 7, you can't buy or
download your applications from anywhere else than the Marketplace.
This also means: no more free downloading and installing compactRSS
from this website.</p>

<p>I'm preparing now for all those changes. This includes that I
will also switch the current compactRSS for Windows Mobile 6.0, 6.1
and 6.5 to the Marketplace and remove the download from this
website within the next couple of days. If you want to get a free
copy, get it now :) …</p>

<p>Windows Marketplace for Mobile isn't free for me or any other
developer. There are annual membership fees as well as fees for
each and every application I want to publish. Thus, I can't offer
you my software for mobile devices for free anymore. Of course, the
price will be fair and I also hope everybody who likes compactRSS
will be fair to purchase it from there to support the ongoing
development of this software. "Fair price" means no more than € 5,-
- but you can expect it to be even lower than that.</p>

<p>Purchasing compactRSS will upgrade your compactRSS 1.0
installation to compactRSS 1.5 - so you will also get some
additional reward with a few additional features and changes that I
have implemented to prepare for a launch on the official Windows
Marketplace for Mobile. This includes:</p>

<ul>
<li><strong>Support for localization</strong>. Version 1.5 will
include two initial languages: <strong>English and German</strong>
(currently only English). Other languages may follow depending on
customer needs.</li>

<li>Removed currently implemented update functionality (wasn't
online for some time now anyhow) because the <strong>automatic
update process will be handled by the Marketplace in the
future</strong>.</li>

<li>Removed most of the tracing code from the standard release
binaries for performance and memory footprint improvements. When
launching to a broader audience, it makes no sense to deploy
tracing features to all users.</li>

<li>Additional <strong>performance and stability
improvements</strong>.</li>

<li>Implemented required features to support hosting this
application on Windows Marketplace for Mobile.</li>
</ul>

<p>FAQs (I will extend this section if additional FAQs pop up):</p>

<ul>
<li><strong>I don't want to purchase version 1.5 … will there be
updates and/or fixes for version 1.0?<br />
</strong> I will continue to support version 1.0 and fix any
serious bugs that might be encountered in the future. On the other
hand, new features are rather unlikely.</li>

<li><strong>How much will compactRSS cost on the Windows
Marketplace for Mobile?<br />
</strong> I am planning a fair price point of US-$ 3,95 - please
notice that this is subject to change until launch.</li>

<li><strong>When will it be available?<br />
</strong> Within the next weeks.</li>
</ul>
]]></description></item><item><title>WCF Error: An error occurred while loading attribute 'XmlSerializerFormatAttribute' on method x in type y</title><link>http://www.bpk.cc/2010/6/29/wcf-error-an-error-occurred-while-loading-attribute-'xmlserializerformatattribute'-on-method-x-in-type-y.aspx</link><pubDate>Tue, 29 Jun 2010 13:43:49 GMT</pubDate><guid>http://www.bpk.cc/2010/6/29/wcf-error-an-error-occurred-while-loading-attribute-'xmlserializerformatattribute'-on-method-x-in-type-y.aspx</guid><description><![CDATA[ 
<p>If you are developing a WCF service with .NET 3.5 and come
across the following error message:</p>

<p><strong>WCF Error: An error occurred while loading attribute
'XmlSerializerFormatAttribute' on method <em>x</em> in type
<em>y</em></strong></p>

<p>I have a very simple solution for you: make sure you have
installed .NET Framework 3.5 Service Pack 1 on all your
machines.</p>

<p>I have searched for hours for a solution to this error. It
appeared just on one single WCF call whereas all others were
working fine.</p>

<p>Finally I came across this <a
href="http://social.msdn.microsoft.com/Forums/en/wcf/thread/7d2b9c3b-61ff-443b-bee7-38d28f54c466?prof=required">
MSDN forums post</a> that pointed me in the right direction.</p>

<p>So If you develop your software on 3.5 SP1 systems and then
deploying it to 3.5 systems without SP1, it's very likely you will
fix your problem by installing SP1.</p>
]]></description></item><item><title>A very ugly (but working) alternative to ScriptErrorsSuppressed in WPF Browser Control</title><link>http://www.bpk.cc/2010/5/16/a-very-ugly-(but-working)-alternative-to-scripterrorssuppressed-in-wpf-browser-control.aspx</link><pubDate>Sun, 16 May 2010 01:08:26 GMT</pubDate><guid>http://www.bpk.cc/2010/5/16/a-very-ugly-(but-working)-alternative-to-scripterrorssuppressed-in-wpf-browser-control.aspx</guid><description><![CDATA[ 
<p>I recently worked on an application that needed to automate a
website in the background. It fills out some forms, invokes some
buttons and checks if all the navigation works fine.</p>

<p>Needless to say, the user of the application should not even
notice that there is a website in the background.</p>

<p>I needed to use the webbrowser control as the website is a
really fantastic example of how to NOT implement a web site.
Everything the user does causes JavaScripts to execute and it's a
nightmare (if not impossible) to solve this by sending custom POST
requests to the webserver.</p>

<p>So I went with the webbrowser control which works really fine
when used to fill out forms and invoke buttons in context of the
website. It's still a lot of spaghetti code that comes together but
it actually works.</p>

<p>For V2 of the application, i switchted from WinForms to WPF. The
first thing I've learned was that it is really no good idea to use
the WPF webbrowser control as it lacks some features of the
WinForms control. One of them was the
<strong>ScriptErrorsSuppressed</strong>-Property that prevents
webpages from displaying MessageBoxes (not only caused by
ScriptErros).</p>

<p>The solution is of course to use a WinFormsHost inside your WPF
window and place a WinForms webbrowser control inside of it. But
while you now have access to a much more complete API and can SET
the ScriptErrorsSuppressed property, this property has actually no
effect.</p>

<p>No matter what you are told in some dev forums (for example: it
only works when the application runs in full trust) - it never
works. Never ever. Don't waste your time. I spent hours trying
dozens of different "solutions" to get this working, still each and
every MessageBox popped up and remindet the user that there is some
browser automation happening in the background.</p>

<p>As there is no clean solution on this and everything looks like
Microsoft is not interested in changing this situation, I decided
to go the ugly way with a dirty hack - I use COM Interop to the
Win32 API call GetLastActivePopup that returns the window handle of
the last popup a given window has created. This also works for
MessageBoxes that are created by webbrowser control.</p>

<p>The trick now is to launch a worker thread every time you do
some browsing and let this thread check frequently if your browser
window raises any popups. If so, use another COM call to destroy
this popup immediately.</p>

<p>I have very good results using this technique. That means: it
works reliable and the end-user doesn't even notice that there's
something going one most of the time as the check happens every 10
ms in my configuration. This short interval does not cause any
performance issues or more than regular CPU load during
execution.</p>

<h3>Everything you need is here</h3>

<p>The good news is: it is possible to use this out-of-the-box and
you can use my code 1:1 in your project.</p>

<p>Firstly, here's the class that contains all the logic. Include
it just like below in your project:</p>

<pre class="brush: csharp;">
private class PopupHandler
{
    #region Interop

    [DllImport("user32.dll")]
    static extern IntPtr GetLastActivePopup(IntPtr hWnd);

    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);

    static uint WM_CLOSE = 0x10;

    #endregion

    public IntPtr OriginalWindowHandle { get; private set; }

    private bool isCanceled = false;

    public PopupHandler(IntPtr originalWindowHandle)
    {
        this.OriginalWindowHandle = originalWindowHandle;
    }

    public void Cancel()
    {
        isCanceled = true;
    }

    public void Execute(object windowHandle)
    {
        while (!isCanceled)
        {
            // Find a possible open IE popups/alert and close it
            IntPtr lastPopupHandle = GetLastActivePopup(OriginalWindowHandle);
            
            if (lastPopupHandle.ToString() != "0" &amp; OriginalWindowHandle != lastPopupHandle)
                SendMessage(lastPopupHandle, WM_CLOSE, IntPtr.Zero, IntPtr.Zero);   // Sends close Message to popup

            // Sleep a little to prevent full CPU load
            Thread.Sleep(10);
        }
    }
}
</pre>

<p>&nbsp;</p>

<p>Next, here is an example how to call this class in a
multithreaded way:</p>

<pre class="brush: csharp;">
// Launch Popup Handler Thread
WindowInteropHelper wih = new WindowInteropHelper(this);

PopupHandler popupHandler = new PopupHandler(wih.Handle);
Thread popupHandlerThread = new Thread(popupHandler.Execute);
popupHandlerThread.Start();

// Now do your navigation
// this.browser.Navigate(@"http://www.google.at");
</pre>

<p>&nbsp;</p>

<p>And that's it. This will do all the work.</p>

<p>Short explanation: this in the above context is the WPF window.
To get the window handle of a WPF window, we need to use the
WindowInteropHelper class. And with wih.Handle we pass the window
handle to the PopupHandler class, and actually this information is
all the PopupHandler class needs to do its job.</p>

<p><strong>Just one important notice: a WPF window does not get a
window handle until it was showed at least one time. So you *will*
have to call myWindow.Show() at least once before using this class.
It's ok if you call myWindow.Hide() immediately after that.
Consider setting the default window state to minimized to prevent
the user seeing some flickering on the screen.</strong></p>

<p>What is left for you to do? Of course, you want to stop this
thread after you have completed browsing. The PopupHandler class
has a handy Cancel-Method for that. Just call it when you are
finished.</p>

<p>I hope this helps some fellow developers to save many valuable
hours of their lives :)</p>

<p>Of course if anyone out there can come up with a cleaner
solution, please let me know!</p>
]]></description></item><item><title>New compactRSS release – Live Search is now working again</title><link>http://www.bpk.cc/2010/5/6/new-compactrss-release-–-live-search-is-now-working-again.aspx</link><pubDate>Thu, 06 May 2010 23:36:09 GMT</pubDate><guid>http://www.bpk.cc/2010/5/6/new-compactrss-release-–-live-search-is-now-working-again.aspx</guid><description><![CDATA[ 
<p>Just as I was not able to take care of bpk.cc in the last
months, I was also not able to take care of compactRSS as much as I
wanted.</p>

<p>But as bpk.cc is now up and alive again, it's also time to push
out a new release of compactRSS with a few bugfixes.</p>

<p>The most important fix of course is that Live Search works again
now (and is now rebranded to the new "Bing" brand). While Microsoft
seemed to have fixed the issue with empty results for a couple of
months, the problem popped up again (and was never fixed).</p>

<p>Now I digged deeper into the Bing API and found a solution that
brings you a permanent fix. At least I hope so (seriously,
Redmond!).</p>

<p>Here's the complete list what have been fixed in release
<strong>1.0.12.26</strong>:</p>

<ul>
<li><strong>Web search for feeds&nbsp;is now&nbsp;working
again<br />
</strong>Searching by using Live Search returned no result over the
last couple of months</li>

<li><strong>Rebranded "Live Search" to "Bing"</strong></li>

<li><strong>Dropped support for Live Search 1.x API<br />
</strong>You cannot fallback to the 1.x API in compactRSS now by
setting the relevant flag in the config file. Live Search / Bing
API 2.0 is now the only supported version.</li>

<li>"<strong>Trace" menu entry is now removed completely if tracing
is not enabled<br />
</strong>Until now, it was just disabled ("grayed out"). In fact,
this menu entry was never meant to be seen by the end-user.</li>

<li><strong>Fixed wrong header text in OPML Import explorer
window</strong></li>

<li><strong>A few other small fixes or optimizations</strong></li>
</ul>

<p>As the update service is currently still not available, you will
have to manually download the setup (cab) file to your phone from
this website and execute it. It will update the old version
automatically so you won't have to remove your current installation
of compactRSS at least.</p>

<p>Version 1.0.12.26 will be available shortly for download from
the <a href="/products/compactrss.aspx">product page</a> and the <a
href="/downloads.aspx">download section</a> of
this website.</p>
]]></description></item><item><title>Simple Solution for ToObservableCollection() for LINQ Queries</title><link>http://www.bpk.cc/2010/4/14/simple-solution-for-toobservablecollection()-for-linq-queries.aspx</link><pubDate>Wed, 14 Apr 2010 00:53:19 GMT</pubDate><guid>http://www.bpk.cc/2010/4/14/simple-solution-for-toobservablecollection()-for-linq-queries.aspx</guid><description><![CDATA[ 
<p>When working with Windows Presentation Foundation and MVVM, you
will have to deal a lot with ObservableCollections. And if you also
love LINQ, like I do, you will soon come over a very annoying
limitation:</p>

<p>LINQ queries always return an IEnumerable which can be very
easily "converted" to a generic List:</p>

<pre class="brush: csharp;">
var result = from x in y
             select x;

return result.ToList();
</pre>

<p>Sadly, there isn't anything like ToList() for an generic
Observable Collection - something like ToObservableCollection() as
you might expect.</p>

<p>Luckily, there is such cool stuff like Extension Methods in .NET
and it is very easy for us to extend the type IEnumerable with an
ToObservableCollection() method that just works as simple as
ToList():</p>

<pre class="brush: csharp;">
public static ObservableCollection&lt;TSource&gt; ToObservableCollection&lt;TSource&gt;
    (this IEnumerable&lt;TSource&gt; source)
{
    ObservableCollection&lt;TSource&gt; collection = 
        new ObservableCollection&lt;TSource&gt;();

    if (source != null)
    {
        foreach (var item in source)
            collection.Add(item);
    }
    else
        collection = null;

    return collection;
}
</pre>

<p>Just put this class into your project and IEnumerable will be
extended with this method immediately. Now we can write:</p>

<pre class="brush: csharp;">
var result = from x in y
             select x;

return result.ToObservableCollection();
</pre>

<p>If this doesn't work for you, just make sure that you put this
class in the same namespace where you want to use this extension
method (or that you import this namespace).</p>
]]></description></item><item><title>compactRSS finally available for download again</title><link>http://www.bpk.cc/2010/4/6/compactrss-finally-available-for-download-again.aspx</link><pubDate>Tue, 06 Apr 2010 02:06:59 GMT</pubDate><guid>http://www.bpk.cc/2010/4/6/compactrss-finally-available-for-download-again.aspx</guid><description><![CDATA[ 
<p>I'd like to drop a short note that <strong>compactRSS</strong>
is now available for download again in the freshly unlocked <a
href="/downloads.aspx">download section</a> of this website. You
find also a direct link to this page in the top menu.</p>

<p>It's the same version as on the old website, so nothing has
changed since then.</p>

<p>The product/info page to compactRSS will also return soon. In
the meantime, this should keep you served, no matter if you're new
to compactRSS or if you used it already and just need the latest
update (as unfortunately the bpk Update Service went down with the
shutdown of the old website, too, and won't return in the near
future).</p>

<p>To install or update, just download the file from the download
page directly with your phone.</p>
]]></description></item><item><title>Welcome back to bpk.cc!</title><link>http://www.bpk.cc/2010/3/28/welcome-back-to-bpkcc!.aspx</link><pubDate>Sun, 28 Mar 2010 20:14:22 GMT</pubDate><guid>http://www.bpk.cc/2010/3/28/welcome-back-to-bpkcc!.aspx</guid><description><![CDATA[ 
<p>For a serious amount of time, bpk.cc hasn't offered a public
website. While all relevant services that you might have been
consuming here (like E-Mail services) were always available, I
decided to completely re-design the main web presence of this
site.</p>

<p>The reason for this was that the formerly used software to run
this site, <a
href="http://www.dotnetblogengine.net/">BlogEngine.NET</a>, didn't
satisfy all my needs. While this .NET based blogging platform was
absolutely fine for blogging, it lacked the power of a
fully-featured CMS.</p>

<p>But besides blogging, bpk.cc should also serve its visitors with
information's and download possibilities to products (or services)
that I want to offer here, like compactRSS that some of you might
still use on their good old Windows <strong>Mobile</strong> devices
(although Windows <strong>Phone</strong> is now the next best thing
out there, served as <strong>7 series</strong>, please).</p>

<p>So for all those pretty things (and more) I searched for
something more suitable out there. Namely a fully-featured CMS.</p>

<p>As it turned out, that is pretty hard in .NET land. There are
great products available, but most of them cost a ton of money
which I just can't afford. Even the lower-priced ones are not
really an option for a private, non-commercial site.</p>

<p>For sure, there are also a ton of .NET-based, free or/and open
source CMS out there. While some were never an option (I never
liked DotNetNuke and its sisters which are powerful but somehow
old-fashioned and over-modularized), some looked really interesting
- like <strong>Umbraco</strong>.</p>

<p>Umbraco really shines with a fresh approach to content
management. Mainly, it appealed to my because <strong>there just
aren't any modules</strong> like in probably 99 % of each and every
other CMS out there. It gives you a nice framework, some
out-of-the-box functionality ... but at the end ... its completely
up to the developer and/or designer what you pull out of it.</p>

<p>The flexibility is just unbelievable, but for sure you cant just
click a website together in 1 or 2 hours like you might know this
from hyped CMS software like Joomla.</p>

<p>Anyhow, as a .NET developer the decision to switch to Umbraco is
hard. Because you will mainly use XSLT to inject functionality into
your site. You can use ASP.NET user controls too, but it's not the
best practice for most of the tasks.</p>

<p>While XSLT is something that you <strong>will</strong> starting
to love while learning it, the tool support for writing XSLT is
inferior compared to core code development. Stepping away from most
of the ASP.NET concepts is also a tough step to take.</p>

<p>Anyhow, I'm glad my decision was Umbraco. It really redefines
the way I look at CMS systems.</p>

<p>Modules for a CMS is just the same thing as Apps for a phone: it
looks so good when you first see it, but you just can't stand that
stuff anymore in a very short amount of time.</p>

<p>That said, I will fill up this site with content over the next
weeks. Everyone who missed a download link for compactRSS over the
last months will be pleased to know that also this little, free
feed reader tool for your Windows Smartphone will return. And of
course there are exciting announcements to make regarding the
future of Windows Mobile (Phone) and the future of compactRSS.</p>

<p>Windows Phone 7 Series along with Silverlight and MVVM will be a
big topic here even beside compactRSS. I have written a lot of code
already for this toy and will share some of my code and earned
knowledge here.</p>

<p>So stay tuned, glad to be back online in blogosphere.</p>
]]></description></item></channel></rss>
