background preloader

WPF

Facebook Twitter

Dynamic Site as fast as a Static Generated One with Raptor. If you ask what's the best way to do a fast content site, many people will point you to Jekyll or a similar tool.

Dynamic Site as fast as a Static Generated One with Raptor

The concept is simple: nothing will be faster than a statically generated website. But writing a complete website statically is not viable because you will be repeating HTML code for headers, footers, sidebars, and more across all pages. But current tools such as Markdown, SASS, Sprockets (or Gulp/Grunt tasks if you're using a Javascript clone of Jekyll) will make it a whole lot easier to properly structure, organize and separate concerns on what are reusable snippets and what is just content.

Then it will "compile" the content and the snippets into complete HTML pages ready to just transfer to any web server. Because it's already static files, the web server doesn't need to reverse proxy to an application server or have any other kind of dynamic processing, just serve the files as it would serve any other asset. Problem is: what if I want more from my content web site? WPF: Supporting command line arguments and file extensions - Yet Another Coding Blog. Traditionally, handling command-line args in an app has been a simple case of reading arguments from the “int main()” function (or equivalent).

WPF: Supporting command line arguments and file extensions - Yet Another Coding Blog

In WPF this changes somewhat. The usual setup is that you have your App.xaml.cs, which loads your initial window. While it’s the former that has access to the arguments, it’s the latter that is likely to use them. So the steps are: In App.xaml.cs, catch the event that gives you the args. Here’s one way to do it (demonstrating a single argument). WPF/MVVM Quick Start Tutorial. Introduction Assuming that you have a decent understanding of C#, getting started in WPF isn't too difficult.

WPF/MVVM Quick Start Tutorial

I started looking at WPF a while ago, and didn't find many helpful MVVM tutorials. Hopefully this article addresses that. As with learning any new technology, you get the benefit of hindsight. From my perspective, almost every tutorial on WPF I've come across is inadequate for one of several reasons: Extended WPF Toolkit 2.3.0. Extended WPF Toolkit is the number one collection of WPF controls, components and utilities for creating next generation Windows applications.

Extended WPF Toolkit 2.3.0

Provides 40+ controls, all offered under the Microsoft Public License for maximum freedom. Community Edition v2.3 provides 25 bug fixes and improvements. Documentation, source, and discussions are hosted on CodePlex at Plus Edition at To install Extended WPF Toolkit, run the following command in the Package Manager Console PM> Install-Package Extended.Wpf.Toolkit. Simpler WPF Binding. If I may offer some suggestions re license terms: 1) Default license: By posting the code in the blog entry you did “release it under a license” ;-) – the default license for any (c) work under the law – which is probably not what you intended (or you’d have not posted it to begin with).

Simpler WPF Binding

By default, you as the author retain all rights, and publishing it in the blog gives readers the ability to read it, but does not give the various rights needed to actually use the code. Readers of the post technically can’t copy it, make derivative works, distribute it etc without your permission. It could be argued that everyone using the code from the blog entry is technically committing a (c) violation. This “legal default” is why when I see a nifty little piece of code that doesn’t have explicit terms of use, I ask. Fluent Ribbon Control Suite - Home. Howto: (Almost) Everything In Active Directory via C# Table of Contents Introduction When it comes to programmatically accessing Microsoft's Active Directory a lot of people seem to have quite a difficult time tying all the pieces together to accomplish exactly what they want to.

Howto: (Almost) Everything In Active Directory via C#

There are so many technologies available for communicating with LDAP that many programmers end up with a mix between COM+ ADSI calls and .NET class calls mixed into their code. ADSI code is so difficult to understand and follow that the creator of that code usually owns it for the entirety of it's lifecycle since no one else wants to support it. This article attempts to tie together the most commonly used elements involved in Active Directory Management in the simplest, most clean manner possible. Background. WPF Windows Authentication against Active Directory. Thanks for the suggestion.

WPF Windows Authentication against Active Directory

I didn't try it, as I found something which appears to be extremely simple. First, add a call to SetPrincipalPolicy in the WPF app.xaml.cs: protected override void OnStartup(StartupEventArgs e){ base.OnStartup(e); AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);} And then you can add some code to check if the Thread.CurrentPrincipal IsAuthenticated and IsInRole.

So we could shutdown the application if they weren't valid like this: private void AuthenticateUser(){ if (! And you can also markup methods with attributes to restrict access to only users which are in a certain AD group, eg: