diff --git a/source/CustomMessageBoxDemo/App.xaml b/source/CustomMessageBoxDemo/App.xaml
index bb1c7c0..6a30be5 100644
--- a/source/CustomMessageBoxDemo/App.xaml
+++ b/source/CustomMessageBoxDemo/App.xaml
@@ -1,8 +1,8 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/source/CustomMessageBoxDemo/App.xaml.cs b/source/CustomMessageBoxDemo/App.xaml.cs
index 877149a..7536b64 100644
--- a/source/CustomMessageBoxDemo/App.xaml.cs
+++ b/source/CustomMessageBoxDemo/App.xaml.cs
@@ -1,16 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Windows;
-
-namespace CustomMessageBoxDemo
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace CustomMessageBoxDemo
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj b/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj
index a11e280..b763ba4 100644
--- a/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj
+++ b/source/CustomMessageBoxDemo/CustomMessageBox Demo.csproj
@@ -1,110 +1,110 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {BEB8F894-9C79-4D30-8061-C5570C1B159D}
- WinExe
- Properties
- CustomMessageBoxDemo
- CustomMessageBoxDemo
- v4.0
- Client
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
-
- x86
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- x86
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
- {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}
- WPFCustomMessageBox
-
-
-
-
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {BEB8F894-9C79-4D30-8061-C5570C1B159D}
+ WinExe
+ Properties
+ CustomMessageBoxDemo
+ CustomMessageBoxDemo
+ v4.0
+ Client
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+
+
+ x86
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ x86
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+ {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}
+ WPFCustomMessageBox
+
+
+
+
\ No newline at end of file
diff --git a/source/CustomMessageBoxDemo/MainWindow.xaml b/source/CustomMessageBoxDemo/MainWindow.xaml
index 0043b31..6e87820 100644
--- a/source/CustomMessageBoxDemo/MainWindow.xaml
+++ b/source/CustomMessageBoxDemo/MainWindow.xaml
@@ -1,21 +1,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Standard
- Custom Version
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Standard
+ Custom Version
+
+
+
diff --git a/source/CustomMessageBoxDemo/MainWindow.xaml.cs b/source/CustomMessageBoxDemo/MainWindow.xaml.cs
index 826da51..3761d25 100644
--- a/source/CustomMessageBoxDemo/MainWindow.xaml.cs
+++ b/source/CustomMessageBoxDemo/MainWindow.xaml.cs
@@ -1,79 +1,79 @@
-using System;
-using System.Windows;
-using WPFCustomMessageBox;
-
-namespace CustomMessageBoxDemo
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
-
- private void button_StandardMessage_Click(object sender, RoutedEventArgs e)
- {
- MessageBox.Show("Hello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\n");
- }
-
- private void button_StandardMessageNew_Click(object sender, RoutedEventArgs e)
- {
- CustomMessageBox.Show("Hello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\n");
- }
-
- private void button_MessageWithCaption_Click(object sender, RoutedEventArgs e)
- {
- MessageBox.Show("Hello World!", "Hello World the title.");
- }
-
- private void button_MessageWithCaptionNew_Click(object sender, RoutedEventArgs e)
- {
- CustomMessageBox.Show("Hello world!", "Hello World the title.");
- }
-
- private void button_MessageWithCaptionAndButton_Click(object sender, RoutedEventArgs e)
- {
- MessageBox.Show("Hello World!", "Hello World the title.", MessageBoxButton.OKCancel);
- }
-
- private void button_MessageWithCaptionAndButtonNew_Click(object sender, RoutedEventArgs e)
- {
- CustomMessageBox.Show("Hello World!", "Hello World the title.", MessageBoxButton.OKCancel);
- }
-
- private void button_MessageWithCaptionButtonImage_Click(object sender, RoutedEventArgs e)
- {
- MessageBox.Show(
- "Are you sure you want to eject the nuclear fuel rods?",
- "Confirm Fuel Ejection",
- MessageBoxButton.OKCancel,
- MessageBoxImage.Exclamation);
- }
-
- private void button_MessageWithCaptionButtonImageNew_Click(object sender, RoutedEventArgs e)
- {
- CustomMessageBox.Show("This is a message.", "This is a caption", MessageBoxButton.YesNo, MessageBoxImage.Asterisk);
- }
-
- private void Window_Loaded(object sender, RoutedEventArgs e)
- {
-
- }
-
- private void button1_Click(object sender, RoutedEventArgs e)
- {
- MessageBoxResult result = CustomMessageBox.ShowYesNoCancel(
- "You have unsaved changes.",
- "Unsaved Changes!",
- "Evan Wondrasek",
- "Don't Save",
- "Cancel",
- MessageBoxImage.Exclamation);
-
- Console.WriteLine(result);
- }
- }
-}
+using System;
+using System.Windows;
+using WPFCustomMessageBox;
+
+namespace CustomMessageBoxDemo
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void button_StandardMessage_Click(object sender, RoutedEventArgs e)
+ {
+ MessageBox.Show("Hello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\n");
+ }
+
+ private void button_StandardMessageNew_Click(object sender, RoutedEventArgs e)
+ {
+ CustomMessageBox.Show("Hello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\nHello World!\nHello World\n");
+ }
+
+ private void button_MessageWithCaption_Click(object sender, RoutedEventArgs e)
+ {
+ MessageBox.Show("Hello World!", "Hello World the title.");
+ }
+
+ private void button_MessageWithCaptionNew_Click(object sender, RoutedEventArgs e)
+ {
+ CustomMessageBox.Show("Hello world!", "Hello World the title.");
+ }
+
+ private void button_MessageWithCaptionAndButton_Click(object sender, RoutedEventArgs e)
+ {
+ MessageBox.Show("Hello World!", "Hello World the title.", MessageBoxButton.OKCancel);
+ }
+
+ private void button_MessageWithCaptionAndButtonNew_Click(object sender, RoutedEventArgs e)
+ {
+ CustomMessageBox.Show("Hello World!", "Hello World the title.", MessageBoxButton.OKCancel);
+ }
+
+ private void button_MessageWithCaptionButtonImage_Click(object sender, RoutedEventArgs e)
+ {
+ MessageBox.Show(
+ "Are you sure you want to eject the nuclear fuel rods?",
+ "Confirm Fuel Ejection",
+ MessageBoxButton.OKCancel,
+ MessageBoxImage.Exclamation);
+ }
+
+ private void button_MessageWithCaptionButtonImageNew_Click(object sender, RoutedEventArgs e)
+ {
+ CustomMessageBox.Show("This is a message.", "This is a caption", MessageBoxButton.YesNo, MessageBoxImage.Asterisk);
+ }
+
+ private void Window_Loaded(object sender, RoutedEventArgs e)
+ {
+
+ }
+
+ private void button1_Click(object sender, RoutedEventArgs e)
+ {
+ MessageBoxResult result = CustomMessageBox.ShowYesNoCancel(
+ "You have unsaved changes.",
+ "Unsaved Changes!",
+ "Evan Wondrasek",
+ "Don't Save",
+ "Cancel",
+ MessageBoxImage.Exclamation);
+
+ Console.WriteLine(result);
+ }
+ }
+}
diff --git a/source/CustomMessageBoxDemo/Properties/AssemblyInfo.cs b/source/CustomMessageBoxDemo/Properties/AssemblyInfo.cs
index 85fdfd1..83be8e9 100644
--- a/source/CustomMessageBoxDemo/Properties/AssemblyInfo.cs
+++ b/source/CustomMessageBoxDemo/Properties/AssemblyInfo.cs
@@ -1,55 +1,55 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("WPF Custom MessageBox Demo")]
-[assembly: AssemblyDescription("Demonstrates the functionality and usage of the WPF Custom MessageBox library.")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CustomMessageBoxDemo")]
-[assembly: AssemblyCopyright("Copyright © 2012 Evan Wondrasek")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
-//in your source files, set the to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("WPF Custom MessageBox Demo")]
+[assembly: AssemblyDescription("Demonstrates the functionality and usage of the WPF Custom MessageBox library.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("CustomMessageBoxDemo")]
+[assembly: AssemblyCopyright("Copyright © 2012 Evan Wondrasek")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/source/CustomMessageBoxDemo/Properties/Resources.Designer.cs b/source/CustomMessageBoxDemo/Properties/Resources.Designer.cs
index 102bca9..4226781 100644
--- a/source/CustomMessageBoxDemo/Properties/Resources.Designer.cs
+++ b/source/CustomMessageBoxDemo/Properties/Resources.Designer.cs
@@ -1,63 +1,63 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.17379
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace CustomMessageBoxDemo.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CustomMessageBoxDemo.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17379
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace CustomMessageBoxDemo.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CustomMessageBoxDemo.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/source/CustomMessageBoxDemo/Properties/Resources.resx b/source/CustomMessageBoxDemo/Properties/Resources.resx
index ffecec8..af7dbeb 100644
--- a/source/CustomMessageBoxDemo/Properties/Resources.resx
+++ b/source/CustomMessageBoxDemo/Properties/Resources.resx
@@ -1,117 +1,117 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file
diff --git a/source/CustomMessageBoxDemo/Properties/Settings.Designer.cs b/source/CustomMessageBoxDemo/Properties/Settings.Designer.cs
index 25b424f..68f04e2 100644
--- a/source/CustomMessageBoxDemo/Properties/Settings.Designer.cs
+++ b/source/CustomMessageBoxDemo/Properties/Settings.Designer.cs
@@ -1,26 +1,26 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.17379
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace CustomMessageBoxDemo.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17379
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace CustomMessageBoxDemo.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/source/CustomMessageBoxDemo/Properties/Settings.settings b/source/CustomMessageBoxDemo/Properties/Settings.settings
index 8f2fd95..033d7a5 100644
--- a/source/CustomMessageBoxDemo/Properties/Settings.settings
+++ b/source/CustomMessageBoxDemo/Properties/Settings.settings
@@ -1,7 +1,7 @@
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/CustomMessageBoxDemo/app.config b/source/CustomMessageBoxDemo/app.config
index f76deb9..2f7cce7 100644
--- a/source/CustomMessageBoxDemo/app.config
+++ b/source/CustomMessageBoxDemo/app.config
@@ -1,3 +1,3 @@
-
-
-
+
+
+
diff --git a/source/WPFCustomMessageBox.sln b/source/WPFCustomMessageBox.sln
index e4fbe7a..8decb01 100644
--- a/source/WPFCustomMessageBox.sln
+++ b/source/WPFCustomMessageBox.sln
@@ -1,26 +1,26 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFCustomMessageBox", "WPFCustomMessageBox\WPFCustomMessageBox.csproj", "{ED02D418-7C0E-4E6C-99A9-BE4357122AE7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomMessageBox Demo", "CustomMessageBoxDemo\CustomMessageBox Demo.csproj", "{BEB8F894-9C79-4D30-8061-C5570C1B159D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|x86 = Debug|x86
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Debug|x86.ActiveCfg = Debug|x86
- {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Debug|x86.Build.0 = Debug|x86
- {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Release|x86.ActiveCfg = Release|x86
- {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Release|x86.Build.0 = Release|x86
- {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Debug|x86.ActiveCfg = Debug|x86
- {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Debug|x86.Build.0 = Debug|x86
- {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Release|x86.ActiveCfg = Release|x86
- {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFCustomMessageBox", "WPFCustomMessageBox\WPFCustomMessageBox.csproj", "{ED02D418-7C0E-4E6C-99A9-BE4357122AE7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomMessageBox Demo", "CustomMessageBoxDemo\CustomMessageBox Demo.csproj", "{BEB8F894-9C79-4D30-8061-C5570C1B159D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Debug|x86.ActiveCfg = Debug|x86
+ {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Debug|x86.Build.0 = Debug|x86
+ {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Release|x86.ActiveCfg = Release|x86
+ {ED02D418-7C0E-4E6C-99A9-BE4357122AE7}.Release|x86.Build.0 = Release|x86
+ {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Debug|x86.ActiveCfg = Debug|x86
+ {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Debug|x86.Build.0 = Debug|x86
+ {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Release|x86.ActiveCfg = Release|x86
+ {BEB8F894-9C79-4D30-8061-C5570C1B159D}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/source/WPFCustomMessageBox/App.xaml b/source/WPFCustomMessageBox/App.xaml
index 1d17a9b..ba8d890 100644
--- a/source/WPFCustomMessageBox/App.xaml
+++ b/source/WPFCustomMessageBox/App.xaml
@@ -1,8 +1,8 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/source/WPFCustomMessageBox/App.xaml.cs b/source/WPFCustomMessageBox/App.xaml.cs
index 0b6a6a6..2d21984 100644
--- a/source/WPFCustomMessageBox/App.xaml.cs
+++ b/source/WPFCustomMessageBox/App.xaml.cs
@@ -1,16 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Windows;
-
-namespace WPFCustomButtonDialogs
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Windows;
+
+namespace WPFCustomButtonDialogs
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/source/WPFCustomMessageBox/CustomMessageBox.cs b/source/WPFCustomMessageBox/CustomMessageBox.cs
index 9e9b638..88b4dbf 100644
--- a/source/WPFCustomMessageBox/CustomMessageBox.cs
+++ b/source/WPFCustomMessageBox/CustomMessageBox.cs
@@ -21,35 +21,38 @@ public static class CustomMessageBox
public static MessageBoxResult Show(string messageBoxText)
{
CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText);
+
msg.ShowDialog();
return msg.Result;
}
///
- /// Displays a message box that has a message and a title bar caption; and that returns a result.
+ /// Displays a message box in front of the specified window. The message box displays a message and returns a result.
///
+ /// A System.Windows.Window that represents the owner window of the message box.
/// A System.String that specifies the text to display.
- /// A System.String that specifies the title bar caption to display.
/// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show(string messageBoxText, string caption)
+ public static MessageBoxResult Show(Window owner, string messageBoxText)
{
- CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption);
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText);
+ msg.Owner = owner;
+
msg.ShowDialog();
return msg.Result;
}
///
- /// Displays a message box in front of the specified window. The message box displays a message and returns a result.
+ /// Displays a message box that has a message and a title bar caption; and that returns a result.
///
- /// A System.Windows.Window that represents the owner window of the message box.
/// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
/// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
- public static MessageBoxResult Show(Window owner, string messageBoxText)
+ public static MessageBoxResult Show(string messageBoxText, string caption)
{
- CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText);
- msg.Owner = owner;
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption);
+
msg.ShowDialog();
return msg.Result;
@@ -66,6 +69,7 @@ public static MessageBoxResult Show(Window owner, string messageBoxText, string
{
CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption);
msg.Owner = owner;
+
msg.ShowDialog();
return msg.Result;
@@ -81,6 +85,25 @@ public static MessageBoxResult Show(Window owner, string messageBoxText, string
public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button)
{
CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, button);
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
+ ///
+ /// Displays a message box that has a message, title bar caption, and button; and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, button);
+ msg.Owner = owner;
+
msg.ShowDialog();
return msg.Result;
@@ -97,6 +120,26 @@ public static MessageBoxResult Show(string messageBoxText, string caption, Messa
public static MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
{
CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, button, icon);
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
+ ///
+ /// Displays a message box that has a message, title bar caption, button, and icon; and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.Windows.MessageBoxButton value that specifies which button or buttons to display.
+ /// A System.Windows.MessageBoxImage value that specifies the icon to display.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, button, icon);
+ msg.Owner = owner;
+
msg.ShowDialog();
return msg.Result;
@@ -119,6 +162,25 @@ public static MessageBoxResult ShowOK(string messageBoxText, string caption, str
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, title bar caption, and OK button with a custom System.String value for the button's text; and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the OK button.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowOK(Window owner, string messageBoxText, string caption, string okButtonText)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.OK);
+ msg.Owner = owner;
+ msg.OkButtonText = okButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
///
/// Displays a message box that has a message, title bar caption, OK button with a custom System.String value for the button's text, and icon; and that returns a result.
///
@@ -137,6 +199,26 @@ public static MessageBoxResult ShowOK(string messageBoxText, string caption, str
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, title bar caption, OK button with a custom System.String value for the button's text, and icon; and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the OK button.
+ /// A System.Windows.MessageBoxImage value that specifies the icon to display.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowOK(Window owner, string messageBoxText, string caption, string okButtonText, MessageBoxImage icon)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.OK, icon);
+ msg.Owner = owner;
+ msg.OkButtonText = okButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
///
/// Displays a message box that has a message, caption, and OK/Cancel buttons with custom System.String values for the buttons' text;
/// and that returns a result.
@@ -157,6 +239,28 @@ public static MessageBoxResult ShowOKCancel(string messageBoxText, string captio
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, caption, and OK/Cancel buttons with custom System.String values for the buttons' text;
+ /// and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the OK button.
+ /// A System.String that specifies the text to display within the Cancel button.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowOKCancel(Window owner, string messageBoxText, string caption, string okButtonText, string cancelButtonText)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.OKCancel);
+ msg.Owner = owner;
+ msg.OkButtonText = okButtonText;
+ msg.CancelButtonText = cancelButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
///
/// Displays a message box that has a message, caption, OK/Cancel buttons with custom System.String values for the buttons' text, and icon;
/// and that returns a result.
@@ -178,6 +282,29 @@ public static MessageBoxResult ShowOKCancel(string messageBoxText, string captio
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, caption, OK/Cancel buttons with custom System.String values for the buttons' text, and icon;
+ /// and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the OK button.
+ /// A System.String that specifies the text to display within the Cancel button.
+ /// A System.Windows.MessageBoxImage value that specifies the icon to display.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowOKCancel(Window owner, string messageBoxText, string caption, string okButtonText, string cancelButtonText, MessageBoxImage icon)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.OKCancel, icon);
+ msg.Owner = owner;
+ msg.OkButtonText = okButtonText;
+ msg.CancelButtonText = cancelButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
///
/// Displays a message box that has a message, caption, and Yes/No buttons with custom System.String values for the buttons' text;
/// and that returns a result.
@@ -198,6 +325,28 @@ public static MessageBoxResult ShowYesNo(string messageBoxText, string caption,
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, caption, and Yes/No buttons with custom System.String values for the buttons' text;
+ /// and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the Yes button.
+ /// A System.String that specifies the text to display within the No button.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowYesNo(Window owner, string messageBoxText, string caption, string yesButtonText, string noButtonText)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.YesNo);
+ msg.Owner = owner;
+ msg.YesButtonText = yesButtonText;
+ msg.NoButtonText = noButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
///
/// Displays a message box that has a message, caption, Yes/No buttons with custom System.String values for the buttons' text, and icon;
/// and that returns a result.
@@ -219,6 +368,29 @@ public static MessageBoxResult ShowYesNo(string messageBoxText, string caption,
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, caption, Yes/No buttons with custom System.String values for the buttons' text, and icon;
+ /// and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the Yes button.
+ /// A System.String that specifies the text to display within the No button.
+ /// A System.Windows.MessageBoxImage value that specifies the icon to display.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowYesNo(Window owner, string messageBoxText, string caption, string yesButtonText, string noButtonText, MessageBoxImage icon)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.YesNo, icon);
+ msg.Owner = owner;
+ msg.YesButtonText = yesButtonText;
+ msg.NoButtonText = noButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
///
/// Displays a message box that has a message, caption, and Yes/No/Cancel buttons with custom System.String values for the buttons' text;
/// and that returns a result.
@@ -241,6 +413,30 @@ public static MessageBoxResult ShowYesNoCancel(string messageBoxText, string cap
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, caption, and Yes/No/Cancel buttons with custom System.String values for the buttons' text;
+ /// and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the Yes button.
+ /// A System.String that specifies the text to display within the No button.
+ /// A System.String that specifies the text to display within the Cancel button.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowYesNoCancel(Window owner, string messageBoxText, string caption, string yesButtonText, string noButtonText, string cancelButtonText)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.YesNoCancel);
+ msg.Owner = owner;
+ msg.YesButtonText = yesButtonText;
+ msg.NoButtonText = noButtonText;
+ msg.CancelButtonText = cancelButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
///
/// Displays a message box that has a message, caption, Yes/No/Cancel buttons with custom System.String values for the buttons' text, and icon;
/// and that returns a result.
@@ -264,5 +460,30 @@ public static MessageBoxResult ShowYesNoCancel(string messageBoxText, string cap
return msg.Result;
}
+ ///
+ /// Displays a message box that has a message, caption, Yes/No/Cancel buttons with custom System.String values for the buttons' text, and icon;
+ /// and that returns a result.
+ ///
+ /// A System.Windows.Window that represents the owner window of the message box.
+ /// A System.String that specifies the text to display.
+ /// A System.String that specifies the title bar caption to display.
+ /// A System.String that specifies the text to display within the Yes button.
+ /// A System.String that specifies the text to display within the No button.
+ /// A System.String that specifies the text to display within the Cancel button.
+ /// A System.Windows.MessageBoxImage value that specifies the icon to display.
+ /// A System.Windows.MessageBoxResult value that specifies which message box button is clicked by the user.
+ public static MessageBoxResult ShowYesNoCancel(Window owner, string messageBoxText, string caption, string yesButtonText, string noButtonText, string cancelButtonText, MessageBoxImage icon)
+ {
+ CustomMessageBoxWindow msg = new CustomMessageBoxWindow(messageBoxText, caption, MessageBoxButton.YesNoCancel, icon);
+ msg.Owner = owner;
+ msg.YesButtonText = yesButtonText;
+ msg.NoButtonText = noButtonText;
+ msg.CancelButtonText = cancelButtonText;
+
+ msg.ShowDialog();
+
+ return msg.Result;
+ }
+
}
}
diff --git a/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml b/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml
index 871cfbc..fb7ca68 100644
--- a/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml
+++ b/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml
@@ -2,10 +2,9 @@
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- WindowStartupLocation="CenterScreen"
+ WindowStartupLocation="CenterOwner"
WindowStyle="SingleBorderWindow"
- Icon="blankicon.ico"
- ShowInTaskbar="False" Topmost="True"
+ ShowInTaskbar="False"
ResizeMode="NoResize" SizeToContent="WidthAndHeight"
TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType" UseLayoutRounding="True"
Title="" MinHeight="155" MaxWidth="470" MinWidth="154">
diff --git a/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs b/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs
index c79ca18..423d726 100644
--- a/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs
+++ b/source/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs
@@ -1,4 +1,5 @@
-using System.Drawing;
+using System;
+using System.Drawing;
using System.Windows;
namespace WPFCustomMessageBox
@@ -82,6 +83,11 @@ internal string NoButtonText
public MessageBoxResult Result { get; set; }
+ protected override void OnSourceInitialized(EventArgs e)
+ {
+ IconHelper.RemoveIcon(this);
+ }
+
internal CustomMessageBoxWindow(string message)
{
InitializeComponent();
diff --git a/source/WPFCustomMessageBox/IconHelper.cs b/source/WPFCustomMessageBox/IconHelper.cs
new file mode 100644
index 0000000..4231c32
--- /dev/null
+++ b/source/WPFCustomMessageBox/IconHelper.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Windows;
+using System.Windows.Interop;
+
+namespace WPFCustomMessageBox
+{
+ ///
+ /// Taken from http://www.wpftutorial.net/RemoveIcon.html
+ ///
+ public static class IconHelper
+ {
+ [DllImport("user32.dll")]
+ static extern int GetWindowLong(IntPtr hwnd, int index);
+
+ [DllImport("user32.dll")]
+ static extern int SetWindowLong(IntPtr hwnd, int index, int newStyle);
+
+ [DllImport("user32.dll")]
+ static extern bool SetWindowPos(IntPtr hwnd, IntPtr hwndInsertAfter,
+ int x, int y, int width, int height, uint flags);
+
+ [DllImport("user32.dll")]
+ static extern IntPtr SendMessage(IntPtr hwnd, uint msg,
+ IntPtr wParam, IntPtr lParam);
+
+ const int GWL_EXSTYLE = -20;
+ const int WS_EX_DLGMODALFRAME = 0x0001;
+ const int SWP_NOSIZE = 0x0001;
+ const int SWP_NOMOVE = 0x0002;
+ const int SWP_NOZORDER = 0x0004;
+ const int SWP_FRAMECHANGED = 0x0020;
+ const uint WM_SETICON = 0x0080;
+
+ public static void RemoveIcon(Window window)
+ {
+ // Get this window's handle
+ IntPtr hwnd = new WindowInteropHelper(window).Handle;
+
+ // Change the extended window style to not show a window icon
+ int extendedStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
+ SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle | WS_EX_DLGMODALFRAME);
+
+ // Update the window's non-client area to reflect the changes
+ SetWindowPos(hwnd, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE |
+ SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
+ }
+
+ }
+}
diff --git a/source/WPFCustomMessageBox/Properties/Resources.resx b/source/WPFCustomMessageBox/Properties/Resources.resx
index ffecec8..af7dbeb 100644
--- a/source/WPFCustomMessageBox/Properties/Resources.resx
+++ b/source/WPFCustomMessageBox/Properties/Resources.resx
@@ -1,117 +1,117 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
\ No newline at end of file
diff --git a/source/WPFCustomMessageBox/Properties/Settings.settings b/source/WPFCustomMessageBox/Properties/Settings.settings
index 8f2fd95..033d7a5 100644
--- a/source/WPFCustomMessageBox/Properties/Settings.settings
+++ b/source/WPFCustomMessageBox/Properties/Settings.settings
@@ -1,7 +1,7 @@
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source/WPFCustomMessageBox/WPFCustomMessageBox.csproj b/source/WPFCustomMessageBox/WPFCustomMessageBox.csproj
index ee7ee33..ca55645 100644
--- a/source/WPFCustomMessageBox/WPFCustomMessageBox.csproj
+++ b/source/WPFCustomMessageBox/WPFCustomMessageBox.csproj
@@ -39,7 +39,8 @@
- blankicon.ico
+
+
@@ -62,6 +63,7 @@
CustomMessageBoxWindow.xaml
+
Designer
@@ -95,9 +97,6 @@
-
-
-