If I create a new project in Visual Studio 2010 SP1 and select “WPF Application” and tries to build the generated application, I get the error The name ‘InitializeComponent’...
I’ve got an enum like this: public enum MyLovelyEnum { FirstSelection, TheOtherSelection, YetAnotherOne }; I got a property in my DataContext: public MyLovelyEnum VeryLovelyEnum { get; set; } And...
When using resources such as brushes, templates and styles in WPF, they can be specified either as StaticResources <Rectangle Fill="{StaticResource MyBrush}" /> or as a DynamicResource <ItemsControl ItemTemplate="{DynamicResource MyItemTemplate}"...
How is one supposed to exit an application such as when the user clicks on the Exit menu item from the File menu? I have tried: this.Dispose(); this.Exit(); Application.ShutDown();...
How do I use RelativeSource with WPF bindings and what are the different use-cases? 14 s 14 If you want to bind to another property on the object: {Binding...
Sometimes it seems that the Name and x:Name attributes are interchangeable. So, what are the definitive differences between them, and when is it preferable to use one over the...
How can I get a color from a hexadecimal color code (e.g. #FFDFD991)? I am reading a file and am getting a hexadecimal color code. I need to create...
Using C# and WPF under .NET (rather than Windows Forms or console), what is the correct way to create an application that can only be run as a single...
I am working on a WPF, C# 3.0 project, and I get this error: Error 1 Metadata file 'WORK=- \Tools\VersionManagementSystem\BusinessLogicLayer\bin\Debug \BusinessLogicLayer.dll' could not be found C:\-=WORK=- \Tools \VersionManagementSystem\VersionManagementSystem\CSC VersionManagementSystem...