Shadows Draws a shadow of any HTML element. The first is the shadow distance on the Y axis, the second on the X axis. The…
A DropShadowEffect can be used to make any WPF control cast a shadow. In order to use this on a text, we can simply assign…
Enumerations are often used in applications to enable the user to select an item from a list of predefined values. This can be handled in…
This post gives you an overview of the MVVM (Model-View-ViewModel) pattern. There are many similar very good articles like this, giving you a rough overview,…
In this post I will show how to create a spinning progress control in WPF. This is often used to notify the user that a…
Here I’d like to describe some approaches how .NET applications can be localized. General In general the texts that are supposed to be localized should…
The following code removes the BOM (Byte Order Mark) from texts. Some text editors add that while saving files. Sometimes this leads to problems while…
Sometimes it is important to prevent certain code being executed at design time. public static bool IsDesignTime { get { return (System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime); }…
Path of the executing assembly: public static string GetExecutingAssemblyPath() { string codeBase = Assembly.GetExecutingAssembly().CodeBase; UriBuilder uri = new UriBuilder(codeBase); string path = Uri.UnescapeDataString(uri.Path); return Path.GetDirectoryName(path);…
<ComboBox ItemsSource=“{Binding Source={x:Static Fonts.SystemFontFamilies}}“ SelectedItem=“{Binding SelectedFont, UpdateSourceTrigger=PropertyChanged}“ /> The ComboBox is bound to the System Fonts enumeration. The SelectedItem DependencyProperty is bound to a SelectedFont…