diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index fd5204b..4e7f7b5 100644 --- a/.gitignore +++ b/.gitignore @@ -181,3 +181,7 @@ UpgradeLog*.htm # Microsoft Fakes FakesAssemblies/ + + +!**/before/dependencies/*.dll +!**/after/dependencies/*.dll \ No newline at end of file diff --git a/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo.sln b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo.sln new file mode 100644 index 0000000..e6ec079 --- /dev/null +++ b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LayoutDemo", "LayoutDemo\LayoutDemo.csproj", "{C5AB1F19-78EF-4BE1-B000-D74035100AB3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C5AB1F19-78EF-4BE1-B000-D74035100AB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C5AB1F19-78EF-4BE1-B000-D74035100AB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C5AB1F19-78EF-4BE1-B000-D74035100AB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C5AB1F19-78EF-4BE1-B000-D74035100AB3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.config b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.xaml b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.xaml new file mode 100644 index 0000000..3280e4d --- /dev/null +++ b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.xaml.cs b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.xaml.cs new file mode 100644 index 0000000..033941f --- /dev/null +++ b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace LayoutDemo +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/LayoutDemo.csproj b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/LayoutDemo.csproj new file mode 100644 index 0000000..7b2a56c --- /dev/null +++ b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/LayoutDemo.csproj @@ -0,0 +1,106 @@ + + + + + Debug + AnyCPU + {C5AB1F19-78EF-4BE1-B000-D74035100AB3} + WinExe + Properties + LayoutDemo + LayoutDemo + v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + 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 + + + + + + + + + \ No newline at end of file diff --git a/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/MainWindow.xaml b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/MainWindow.xaml new file mode 100644 index 0000000..87da8a7 --- /dev/null +++ b/Day1/Demos/LayoutDemo/LayoutDemo/LayoutDemo/MainWindow.xaml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + diff --git a/Day1/Demos/XAMLDemo/XAMLDemo/MainWindow.xaml.cs b/Day1/Demos/XAMLDemo/XAMLDemo/MainWindow.xaml.cs new file mode 100644 index 0000000..14a8d67 --- /dev/null +++ b/Day1/Demos/XAMLDemo/XAMLDemo/MainWindow.xaml.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace XAMLDemo +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + + private void ButtonBase_OnClick(object sender, RoutedEventArgs e) + { + MessageBox.Show("Hello World"); + Console.WriteLine("I am the console"); + } + } +} diff --git a/Day1/Demos/XAMLDemo/XAMLDemo/Properties/AssemblyInfo.cs b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e47da5f --- /dev/null +++ b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/AssemblyInfo.cs @@ -0,0 +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("XAMLDemo")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("XAMLDemo")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[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/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Resources.Designer.cs b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Resources.Designer.cs new file mode 100644 index 0000000..e016505 --- /dev/null +++ b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace XAMLDemo.Properties +{ + + + /// + /// 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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("XAMLDemo.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/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Resources.resx b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Resources.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Settings.Designer.cs b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Settings.Designer.cs new file mode 100644 index 0000000..f944b04 --- /dev/null +++ b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace XAMLDemo.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Settings.settings b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Day1/Demos/XAMLDemo/XAMLDemo/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day1/Demos/XAMLDemo/XAMLDemo/XAMLDemo.csproj b/Day1/Demos/XAMLDemo/XAMLDemo/XAMLDemo.csproj new file mode 100644 index 0000000..79828dd --- /dev/null +++ b/Day1/Demos/XAMLDemo/XAMLDemo/XAMLDemo.csproj @@ -0,0 +1,115 @@ + + + + + Debug + AnyCPU + {A7C84A11-95CC-46E7-81CD-D7CBEEB37AD4} + Exe + Properties + XAMLDemo + XAMLDemo + v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + 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 + + + + + + + + + {11758696-5186-4dff-bbc4-a12a0d57b131} + WpfControlLibrary1 + + + + + \ No newline at end of file diff --git a/Day1/Student Content/01_Introduction.pdf b/Day1/Student Content/01_Introduction.pdf new file mode 100644 index 0000000..54d6939 Binary files /dev/null and b/Day1/Student Content/01_Introduction.pdf differ diff --git a/Day1/Student Content/02_XAML.pdf b/Day1/Student Content/02_XAML.pdf new file mode 100644 index 0000000..5f578d2 Binary files /dev/null and b/Day1/Student Content/02_XAML.pdf differ diff --git a/Day1/Student Content/03_Layout.pdf b/Day1/Student Content/03_Layout.pdf new file mode 100644 index 0000000..e98eba1 Binary files /dev/null and b/Day1/Student Content/03_Layout.pdf differ diff --git a/Day1/Student Content/Labs/Introduction.pdf b/Day1/Student Content/Labs/Introduction.pdf new file mode 100644 index 0000000..109a1d3 Binary files /dev/null and b/Day1/Student Content/Labs/Introduction.pdf differ diff --git a/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp.sln b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp.sln new file mode 100644 index 0000000..7e81b97 --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleWpfApp", "SimpleWpfApp\SimpleWpfApp.csproj", "{A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/Program.cs b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/Program.cs new file mode 100644 index 0000000..140bc7a --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/Program.cs @@ -0,0 +1,80 @@ +using System; +using System.Media; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Effects; +using System.Windows.Shapes; +using System.Windows.Controls; + +namespace SimpleWpfApp +{ + class Program + { + [STAThread] + static void Main() + { + Window w = new Window + { + Title = "Hello, Wpf", + Width = 480, + Height = 384, + Background = new LinearGradientBrush(Colors.LightSeaGreen, Colors.Yellow, 45.0) + }; + + w.Loaded += w_Loaded; + + Application app = new Application(); + app.Run(w); + } + + static void w_Loaded(object sender, EventArgs e) + { + Ellipse ellipse = new Ellipse {Stroke = Brushes.Red, StrokeThickness = 1}; + + ImageBrush brush = new ImageBrush(); + ImageSourceConverter isc = new ImageSourceConverter(); + brush.ImageSource = (ImageSource) isc.ConvertFrom(@".\img1.jpg"); + + ellipse.Fill = brush; + ellipse.MouseEnter += ellipse_MouseEnter; + ellipse.MouseLeave += ellipse_MouseLeave; + + ellipse.Width = 200; + ellipse.Height = 200; + + ListBox listBox = new ListBox(); + listBox.Items.Add(ellipse); + + listBox.Background = null; + + Button button = new Button(); + button.Width = 200; + button.Height = 50; + button.Content = "I Dare You to Click Me"; + button.Click += OnClick; + + listBox.Items.Add(button); + + Window win = (Window)sender; + win.Content = listBox; + } + + static void ellipse_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) + { + Ellipse ellipse = (Ellipse)sender; + ellipse.Effect = null; + } + + static void ellipse_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) + { + Ellipse ellipse = (Ellipse)sender; + ellipse.Effect = new DropShadowEffect { Color = Colors.DeepPink, BlurRadius = 30, ShadowDepth = 0 }; + } + + static void OnClick(object sender, RoutedEventArgs e) + { + SoundPlayer sp = new SoundPlayer(@".\tada.wav"); + sp.Play(); + } + } +} diff --git a/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4821f35 --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("SimpleWpfApp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("SimpleWpfApp")] +[assembly: AssemblyCopyright("Copyright © JulMar Technology, Inc. 2007")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cc6c0839-5342-477f-a2f0-ff40b0c89c46")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/SimpleWpfApp.csproj b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/SimpleWpfApp.csproj new file mode 100644 index 0000000..f3e168a --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/SimpleWpfApp.csproj @@ -0,0 +1,69 @@ + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538} + WinExe + Properties + SimpleWpfApp + SimpleWpfApp + + + + + 2.0 + + + v3.5 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + 3.5 + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/img1.jpg b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/img1.jpg new file mode 100644 index 0000000..4564c17 Binary files /dev/null and b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/img1.jpg differ diff --git a/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/tada.wav b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/tada.wav new file mode 100644 index 0000000..1c2c23c Binary files /dev/null and b/Day1/Student Content/Labs/Introduction/VS2008/after/SimpleWpfApp/tada.wav differ diff --git a/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp.sln b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp.sln new file mode 100644 index 0000000..b3f1f66 --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleWpfApp", "SimpleWpfApp\SimpleWpfApp.csproj", "{A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/Program.cs b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/Program.cs new file mode 100644 index 0000000..140bc7a --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/Program.cs @@ -0,0 +1,80 @@ +using System; +using System.Media; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Effects; +using System.Windows.Shapes; +using System.Windows.Controls; + +namespace SimpleWpfApp +{ + class Program + { + [STAThread] + static void Main() + { + Window w = new Window + { + Title = "Hello, Wpf", + Width = 480, + Height = 384, + Background = new LinearGradientBrush(Colors.LightSeaGreen, Colors.Yellow, 45.0) + }; + + w.Loaded += w_Loaded; + + Application app = new Application(); + app.Run(w); + } + + static void w_Loaded(object sender, EventArgs e) + { + Ellipse ellipse = new Ellipse {Stroke = Brushes.Red, StrokeThickness = 1}; + + ImageBrush brush = new ImageBrush(); + ImageSourceConverter isc = new ImageSourceConverter(); + brush.ImageSource = (ImageSource) isc.ConvertFrom(@".\img1.jpg"); + + ellipse.Fill = brush; + ellipse.MouseEnter += ellipse_MouseEnter; + ellipse.MouseLeave += ellipse_MouseLeave; + + ellipse.Width = 200; + ellipse.Height = 200; + + ListBox listBox = new ListBox(); + listBox.Items.Add(ellipse); + + listBox.Background = null; + + Button button = new Button(); + button.Width = 200; + button.Height = 50; + button.Content = "I Dare You to Click Me"; + button.Click += OnClick; + + listBox.Items.Add(button); + + Window win = (Window)sender; + win.Content = listBox; + } + + static void ellipse_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) + { + Ellipse ellipse = (Ellipse)sender; + ellipse.Effect = null; + } + + static void ellipse_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) + { + Ellipse ellipse = (Ellipse)sender; + ellipse.Effect = new DropShadowEffect { Color = Colors.DeepPink, BlurRadius = 30, ShadowDepth = 0 }; + } + + static void OnClick(object sender, RoutedEventArgs e) + { + SoundPlayer sp = new SoundPlayer(@".\tada.wav"); + sp.Play(); + } + } +} diff --git a/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4821f35 --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("SimpleWpfApp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("SimpleWpfApp")] +[assembly: AssemblyCopyright("Copyright © JulMar Technology, Inc. 2007")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cc6c0839-5342-477f-a2f0-ff40b0c89c46")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/SimpleWpfApp.csproj b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/SimpleWpfApp.csproj new file mode 100644 index 0000000..550c60b --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/SimpleWpfApp.csproj @@ -0,0 +1,72 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538} + WinExe + Properties + SimpleWpfApp + SimpleWpfApp + + + + + 3.5 + + + v3.5 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + + + + 3.5 + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/img1.jpg b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/img1.jpg new file mode 100644 index 0000000..4564c17 Binary files /dev/null and b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/img1.jpg differ diff --git a/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/tada.wav b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/tada.wav new file mode 100644 index 0000000..1c2c23c Binary files /dev/null and b/Day1/Student Content/Labs/Introduction/VS2010/after/SimpleWpfApp/tada.wav differ diff --git a/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp.sln b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp.sln new file mode 100644 index 0000000..b3f1f66 --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleWpfApp", "SimpleWpfApp\SimpleWpfApp.csproj", "{A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/Program.cs b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/Program.cs new file mode 100644 index 0000000..140bc7a --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/Program.cs @@ -0,0 +1,80 @@ +using System; +using System.Media; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Effects; +using System.Windows.Shapes; +using System.Windows.Controls; + +namespace SimpleWpfApp +{ + class Program + { + [STAThread] + static void Main() + { + Window w = new Window + { + Title = "Hello, Wpf", + Width = 480, + Height = 384, + Background = new LinearGradientBrush(Colors.LightSeaGreen, Colors.Yellow, 45.0) + }; + + w.Loaded += w_Loaded; + + Application app = new Application(); + app.Run(w); + } + + static void w_Loaded(object sender, EventArgs e) + { + Ellipse ellipse = new Ellipse {Stroke = Brushes.Red, StrokeThickness = 1}; + + ImageBrush brush = new ImageBrush(); + ImageSourceConverter isc = new ImageSourceConverter(); + brush.ImageSource = (ImageSource) isc.ConvertFrom(@".\img1.jpg"); + + ellipse.Fill = brush; + ellipse.MouseEnter += ellipse_MouseEnter; + ellipse.MouseLeave += ellipse_MouseLeave; + + ellipse.Width = 200; + ellipse.Height = 200; + + ListBox listBox = new ListBox(); + listBox.Items.Add(ellipse); + + listBox.Background = null; + + Button button = new Button(); + button.Width = 200; + button.Height = 50; + button.Content = "I Dare You to Click Me"; + button.Click += OnClick; + + listBox.Items.Add(button); + + Window win = (Window)sender; + win.Content = listBox; + } + + static void ellipse_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) + { + Ellipse ellipse = (Ellipse)sender; + ellipse.Effect = null; + } + + static void ellipse_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) + { + Ellipse ellipse = (Ellipse)sender; + ellipse.Effect = new DropShadowEffect { Color = Colors.DeepPink, BlurRadius = 30, ShadowDepth = 0 }; + } + + static void OnClick(object sender, RoutedEventArgs e) + { + SoundPlayer sp = new SoundPlayer(@".\tada.wav"); + sp.Play(); + } + } +} diff --git a/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4821f35 --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("SimpleWpfApp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("SimpleWpfApp")] +[assembly: AssemblyCopyright("Copyright © JulMar Technology, Inc. 2007")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cc6c0839-5342-477f-a2f0-ff40b0c89c46")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/SimpleWpfApp.csproj b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/SimpleWpfApp.csproj new file mode 100644 index 0000000..c57f4f9 --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/SimpleWpfApp.csproj @@ -0,0 +1,79 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {A5FEF17E-32E0-47D3-91FE-AE6D76DCF538} + WinExe + Properties + SimpleWpfApp + SimpleWpfApp + + + + + 3.5 + + + v4.5 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + false + + + + + + + 3.5 + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/app.config b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/app.config new file mode 100644 index 0000000..c5e1dae --- /dev/null +++ b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/img1.jpg b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/img1.jpg new file mode 100644 index 0000000..4564c17 Binary files /dev/null and b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/img1.jpg differ diff --git a/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/tada.wav b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/tada.wav new file mode 100644 index 0000000..1c2c23c Binary files /dev/null and b/Day1/Student Content/Labs/Introduction/VS2012/after/SimpleWpfApp/tada.wav differ diff --git a/Day1/Student Content/Labs/Layout.pdf b/Day1/Student Content/Labs/Layout.pdf new file mode 100644 index 0000000..5365300 Binary files /dev/null and b/Day1/Student Content/Labs/Layout.pdf differ diff --git a/Day1/Student Content/Labs/Transforms.pdf b/Day1/Student Content/Labs/Transforms.pdf new file mode 100644 index 0000000..3dbd08e Binary files /dev/null and b/Day1/Student Content/Labs/Transforms.pdf differ diff --git a/Day1/Student Content/Labs/XAML.pdf b/Day1/Student Content/Labs/XAML.pdf new file mode 100644 index 0000000..cbcee36 Binary files /dev/null and b/Day1/Student Content/Labs/XAML.pdf differ diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/App.xaml b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/App.xaml new file mode 100644 index 0000000..2219e58 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/App.xaml.cs b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/App.xaml.cs new file mode 100644 index 0000000..8f8f0e6 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/App.xaml.cs @@ -0,0 +1,19 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + Window2 secondWindow = new Window2(); + secondWindow.Show(); + } + + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/HelloWpf.csproj b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/HelloWpf.csproj new file mode 100644 index 0000000..116884e --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/HelloWpf.csproj @@ -0,0 +1,105 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B22E2D91-FCE9-4395-8D4D-80C8147C2183} + WinExe + Properties + HelloWpf + HelloWpf + v3.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + 3.0 + + + 3.0 + + + 3.0 + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + App.xaml + Code + + + Window1.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + Window2.xaml + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/HelloWpf.sln b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/HelloWpf.sln new file mode 100644 index 0000000..c29a4fb --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/HelloWpf.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWpf", "HelloWpf.csproj", "{B22E2D91-FCE9-4395-8D4D-80C8147C2183}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5f049da --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/AssemblyInfo.cs @@ -0,0 +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("HelloWpf")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("HelloWpf")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[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/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Resources.Designer.cs b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Resources.Designer.cs new file mode 100644 index 0000000..3382302 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4918 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HelloWpf.Properties +{ + + + /// + /// 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", "2.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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HelloWpf.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/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Resources.resx b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Resources.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Settings.Designer.cs b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Settings.Designer.cs new file mode 100644 index 0000000..de17173 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4918 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HelloWpf.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.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/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Settings.settings b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window1.xaml b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window1.xaml new file mode 100644 index 0000000..9ec9d9a --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window1.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window1.xaml.cs b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window1.xaml.cs new file mode 100644 index 0000000..55e6c27 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window1.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : Window + { + public Window1() + { + InitializeComponent(); + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window2.xaml b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window2.xaml new file mode 100644 index 0000000..2abc191 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window2.xaml @@ -0,0 +1,21 @@ + + + + 80 + + + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window2.xaml.cs b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window2.xaml.cs new file mode 100644 index 0000000..a44ce37 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/HelloWpf/Window2.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for Window2.xaml + /// + public partial class Window2 : Window + { + public Window2() + { + InitializeComponent(); + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyApp.xaml b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyApp.xaml new file mode 100644 index 0000000..9ab48a8 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyApp.xaml @@ -0,0 +1,9 @@ + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyApp.xaml.cs b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyApp.xaml.cs new file mode 100644 index 0000000..c9cdf70 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyApp.xaml.cs @@ -0,0 +1,11 @@ +using System.Windows; + +namespace MyWindowsApplication +{ + /// + /// Interaction logic for MyApp.xaml + /// + public partial class MyApp : Application + { + } +} \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyWindowsApplication.csproj b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyWindowsApplication.csproj new file mode 100644 index 0000000..03fd373 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyWindowsApplication.csproj @@ -0,0 +1,84 @@ + + + Debug + AnyCPU + {18014D59-740E-4688-A54C-811A08177AF2} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + MyWindowsApplication + MyWindowsAppliaction + 4 + winexe + 1.0.0.* + + false + v3.5 + + + + + 2.0 + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + + + false + true + .\bin\Release\ + TRACE + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MyApp.xaml + Code + + + Window1.xaml + Code + + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyWindowsApplication.sln b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyWindowsApplication.sln new file mode 100644 index 0000000..8a52a43 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/MyWindowsApplication.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyWindowsApplication", "MyWindowsApplication.csproj", "{18014D59-740E-4688-A54C-811A08177AF2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {18014D59-740E-4688-A54C-811A08177AF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Person.cs b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Person.cs new file mode 100644 index 0000000..bdf9797 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Person.cs @@ -0,0 +1,13 @@ +namespace MyWindowsApplication +{ + public class Person + { + public string Name { get; set; } + public int Age { get; set; } + + public override string ToString() + { + return Name + " is " + Age + " years old."; + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..99157ba --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("MyWindowsApplication")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("laptop")] +[assembly: AssemblyProduct("MyWindowsApplication")] +[assembly: AssemblyCopyright("Copyright @ laptop 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Resources.Designer.cs b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0c2b5e1 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MyWindowsApplication.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", "2.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("MyWindowsApplication.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/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Resources.resx b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Settings.Designer.cs b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Settings.Designer.cs new file mode 100644 index 0000000..90986f5 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4927 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MyWindowsApplication.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.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/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Settings.settings b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Window1.xaml b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Window1.xaml new file mode 100644 index 0000000..46f3b92 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Window1.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Window1.xaml.cs b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Window1.xaml.cs new file mode 100644 index 0000000..3bead7b --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2008/after/MyWindowsApplication/Window1.xaml.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows; +using System.Windows.Input; +using System.Windows.Media; + +namespace MyWindowsApplication +{ + /// + /// Interaction logic for Window1.xaml + /// + + public partial class Window1 : Window + { + public Window1() + { + InitializeComponent(); + } + + void OnRectangleMouseDown(object sender, MouseButtonEventArgs args) + { + Color c = new Color(); + Random r = new Random(); + + c.A = (byte)r.Next(256); + c.R = (byte)r.Next(256); + c.G = (byte)r.Next(256); + c.B = (byte)r.Next(256); + myRectangle.Fill = new SolidColorBrush(c); + } + } +} \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/App.xaml b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/App.xaml new file mode 100644 index 0000000..2219e58 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/App.xaml.cs b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/App.xaml.cs new file mode 100644 index 0000000..8f8f0e6 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/App.xaml.cs @@ -0,0 +1,19 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + Window2 secondWindow = new Window2(); + secondWindow.Show(); + } + + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/HelloWpf.csproj b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/HelloWpf.csproj new file mode 100644 index 0000000..73ad0b2 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/HelloWpf.csproj @@ -0,0 +1,118 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B22E2D91-FCE9-4395-8D4D-80C8147C2183} + WinExe + Properties + HelloWpf + HelloWpf + v3.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + + + 3.5 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + + + 3.0 + + + 3.0 + + + 3.0 + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + MSBuild:Compile + Designer + + + App.xaml + Code + + + Window1.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + Window2.xaml + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/HelloWpf.sln b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/HelloWpf.sln new file mode 100644 index 0000000..0b06777 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/HelloWpf.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWpf", "HelloWpf.csproj", "{B22E2D91-FCE9-4395-8D4D-80C8147C2183}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5f049da --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/AssemblyInfo.cs @@ -0,0 +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("HelloWpf")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("HelloWpf")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[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/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Resources.Designer.cs b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Resources.Designer.cs new file mode 100644 index 0000000..16ca1a7 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HelloWpf.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("HelloWpf.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/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Resources.resx b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Resources.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Settings.Designer.cs b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Settings.Designer.cs new file mode 100644 index 0000000..4a92a16 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HelloWpf.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/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Settings.settings b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window1.xaml b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window1.xaml new file mode 100644 index 0000000..9ec9d9a --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window1.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window1.xaml.cs b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window1.xaml.cs new file mode 100644 index 0000000..55e6c27 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window1.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : Window + { + public Window1() + { + InitializeComponent(); + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window2.xaml b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window2.xaml new file mode 100644 index 0000000..2abc191 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window2.xaml @@ -0,0 +1,21 @@ + + + + 80 + + + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window2.xaml.cs b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window2.xaml.cs new file mode 100644 index 0000000..a44ce37 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/HelloWpf/Window2.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for Window2.xaml + /// + public partial class Window2 : Window + { + public Window2() + { + InitializeComponent(); + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyApp.xaml b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyApp.xaml new file mode 100644 index 0000000..9ab48a8 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyApp.xaml @@ -0,0 +1,9 @@ + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyApp.xaml.cs b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyApp.xaml.cs new file mode 100644 index 0000000..c9cdf70 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyApp.xaml.cs @@ -0,0 +1,11 @@ +using System.Windows; + +namespace MyWindowsApplication +{ + /// + /// Interaction logic for MyApp.xaml + /// + public partial class MyApp : Application + { + } +} \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyWindowsApplication.csproj b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyWindowsApplication.csproj new file mode 100644 index 0000000..22b79d7 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyWindowsApplication.csproj @@ -0,0 +1,91 @@ + + + + Debug + AnyCPU + {18014D59-740E-4688-A54C-811A08177AF2} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + MyWindowsApplication + MyWindowsAppliaction + 4 + winexe + 1.0.0.* + + false + v3.5 + + + + + 3.5 + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + AllRules.ruleset + + + false + true + .\bin\Release\ + TRACE + AllRules.ruleset + + + + + + + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MyApp.xaml + Code + + + Window1.xaml + Code + + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyWindowsApplication.sln b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyWindowsApplication.sln new file mode 100644 index 0000000..9acc920 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/MyWindowsApplication.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyWindowsApplication", "MyWindowsApplication.csproj", "{18014D59-740E-4688-A54C-811A08177AF2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {18014D59-740E-4688-A54C-811A08177AF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Person.cs b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Person.cs new file mode 100644 index 0000000..bdf9797 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Person.cs @@ -0,0 +1,13 @@ +namespace MyWindowsApplication +{ + public class Person + { + public string Name { get; set; } + public int Age { get; set; } + + public override string ToString() + { + return Name + " is " + Age + " years old."; + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..99157ba --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("MyWindowsApplication")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("laptop")] +[assembly: AssemblyProduct("MyWindowsApplication")] +[assembly: AssemblyCopyright("Copyright @ laptop 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Resources.Designer.cs b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Resources.Designer.cs new file mode 100644 index 0000000..9d24b03 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MyWindowsApplication.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("MyWindowsApplication.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/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Resources.resx b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Settings.Designer.cs b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Settings.Designer.cs new file mode 100644 index 0000000..448f562 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MyWindowsApplication.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/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Settings.settings b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Window1.xaml b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Window1.xaml new file mode 100644 index 0000000..46f3b92 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Window1.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Window1.xaml.cs b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Window1.xaml.cs new file mode 100644 index 0000000..3bead7b --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2010/after/MyWindowsApplication/Window1.xaml.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows; +using System.Windows.Input; +using System.Windows.Media; + +namespace MyWindowsApplication +{ + /// + /// Interaction logic for Window1.xaml + /// + + public partial class Window1 : Window + { + public Window1() + { + InitializeComponent(); + } + + void OnRectangleMouseDown(object sender, MouseButtonEventArgs args) + { + Color c = new Color(); + Random r = new Random(); + + c.A = (byte)r.Next(256); + c.R = (byte)r.Next(256); + c.G = (byte)r.Next(256); + c.B = (byte)r.Next(256); + myRectangle.Fill = new SolidColorBrush(c); + } + } +} \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/App.xaml b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/App.xaml new file mode 100644 index 0000000..2219e58 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/App.xaml.cs b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/App.xaml.cs new file mode 100644 index 0000000..8f8f0e6 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/App.xaml.cs @@ -0,0 +1,19 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + Window2 secondWindow = new Window2(); + secondWindow.Show(); + } + + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/HelloWpf.csproj b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/HelloWpf.csproj new file mode 100644 index 0000000..a54b216 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/HelloWpf.csproj @@ -0,0 +1,123 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B22E2D91-FCE9-4395-8D4D-80C8147C2183} + WinExe + Properties + HelloWpf + HelloWpf + v4.5 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + + + 3.5 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + false + + + + + + + 3.0 + + + 3.0 + + + 3.0 + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + MSBuild:Compile + Designer + + + App.xaml + Code + + + Window1.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + Window2.xaml + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/HelloWpf.sln b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/HelloWpf.sln new file mode 100644 index 0000000..0b06777 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/HelloWpf.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWpf", "HelloWpf.csproj", "{B22E2D91-FCE9-4395-8D4D-80C8147C2183}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B22E2D91-FCE9-4395-8D4D-80C8147C2183}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5f049da --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/AssemblyInfo.cs @@ -0,0 +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("HelloWpf")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("HelloWpf")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[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/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Resources.Designer.cs b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Resources.Designer.cs new file mode 100644 index 0000000..616374c --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HelloWpf.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("HelloWpf.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/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Resources.resx b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Resources.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Settings.Designer.cs b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Settings.Designer.cs new file mode 100644 index 0000000..07b3ca5 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HelloWpf.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Settings.settings b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window1.xaml b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window1.xaml new file mode 100644 index 0000000..9ec9d9a --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window1.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window1.xaml.cs b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window1.xaml.cs new file mode 100644 index 0000000..55e6c27 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window1.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : Window + { + public Window1() + { + InitializeComponent(); + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window2.xaml b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window2.xaml new file mode 100644 index 0000000..2abc191 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window2.xaml @@ -0,0 +1,21 @@ + + + + 80 + + + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window2.xaml.cs b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window2.xaml.cs new file mode 100644 index 0000000..a44ce37 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/Window2.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows; + +namespace HelloWpf +{ + /// + /// Interaction logic for Window2.xaml + /// + public partial class Window2 : Window + { + public Window2() + { + InitializeComponent(); + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/app.config b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/app.config new file mode 100644 index 0000000..c5e1dae --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/HelloWpf/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyApp.xaml b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyApp.xaml new file mode 100644 index 0000000..9ab48a8 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyApp.xaml @@ -0,0 +1,9 @@ + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyApp.xaml.cs b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyApp.xaml.cs new file mode 100644 index 0000000..c9cdf70 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyApp.xaml.cs @@ -0,0 +1,11 @@ +using System.Windows; + +namespace MyWindowsApplication +{ + /// + /// Interaction logic for MyApp.xaml + /// + public partial class MyApp : Application + { + } +} \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyWindowsApplication.csproj b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyWindowsApplication.csproj new file mode 100644 index 0000000..02028a4 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyWindowsApplication.csproj @@ -0,0 +1,96 @@ + + + + Debug + AnyCPU + {18014D59-740E-4688-A54C-811A08177AF2} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + MyWindowsApplication + MyWindowsAppliaction + 4 + winexe + 1.0.0.* + + false + v4.5 + + + + + 3.5 + + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + AllRules.ruleset + false + + + false + true + .\bin\Release\ + TRACE + AllRules.ruleset + false + + + + + + + + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MyApp.xaml + Code + + + Window1.xaml + Code + + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyWindowsApplication.sln b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyWindowsApplication.sln new file mode 100644 index 0000000..9acc920 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/MyWindowsApplication.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyWindowsApplication", "MyWindowsApplication.csproj", "{18014D59-740E-4688-A54C-811A08177AF2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {18014D59-740E-4688-A54C-811A08177AF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18014D59-740E-4688-A54C-811A08177AF2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Person.cs b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Person.cs new file mode 100644 index 0000000..bdf9797 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Person.cs @@ -0,0 +1,13 @@ +namespace MyWindowsApplication +{ + public class Person + { + public string Name { get; set; } + public int Age { get; set; } + + public override string ToString() + { + return Name + " is " + Age + " years old."; + } + } +} diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/AssemblyInfo.cs b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..99157ba --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("MyWindowsApplication")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("laptop")] +[assembly: AssemblyProduct("MyWindowsApplication")] +[assembly: AssemblyCopyright("Copyright @ laptop 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Resources.Designer.cs b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Resources.Designer.cs new file mode 100644 index 0000000..dff0343 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MyWindowsApplication.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("MyWindowsApplication.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/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Resources.resx b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Settings.Designer.cs b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Settings.Designer.cs new file mode 100644 index 0000000..7956544 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MyWindowsApplication.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Settings.settings b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Window1.xaml b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Window1.xaml new file mode 100644 index 0000000..46f3b92 --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Window1.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Window1.xaml.cs b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Window1.xaml.cs new file mode 100644 index 0000000..3bead7b --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/Window1.xaml.cs @@ -0,0 +1,31 @@ +using System; +using System.Windows; +using System.Windows.Input; +using System.Windows.Media; + +namespace MyWindowsApplication +{ + /// + /// Interaction logic for Window1.xaml + /// + + public partial class Window1 : Window + { + public Window1() + { + InitializeComponent(); + } + + void OnRectangleMouseDown(object sender, MouseButtonEventArgs args) + { + Color c = new Color(); + Random r = new Random(); + + c.A = (byte)r.Next(256); + c.R = (byte)r.Next(256); + c.G = (byte)r.Next(256); + c.B = (byte)r.Next(256); + myRectangle.Fill = new SolidColorBrush(c); + } + } +} \ No newline at end of file diff --git a/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/app.config b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/app.config new file mode 100644 index 0000000..c5e1dae --- /dev/null +++ b/Day1/Student Content/Labs/XAML/VS2012/after/MyWindowsApplication/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Day1/Summary.txt b/Day1/Summary.txt new file mode 100644 index 0000000..dd54c34 --- /dev/null +++ b/Day1/Summary.txt @@ -0,0 +1,98 @@ +Day 1 Summary: + +Intro: + +Seperation between layout and code. +partial class (one half is XAML and one half is C#) + +Customize controls. Mostly makes 3rd party control vendors useless + +eXtensible Application Markup Language + +XAML is used in multiple places in the Windows ecosystem. +Windows universal, Windows Phone, WPF, Silverlight, XBOX 360 +Windows Workflow + +Visual studio is a WPF app +New features in 4.5 and 4.6 for WPF + +XAML: + +XML based +Anything you do in XAML can be done in C# + == var win = new Window(); + +//Attribute syntax + + +Namespaces +xmlns:x="" == x is the alias for this namespace +xmlns="" this is the default + +XAML is compiled into BAML +And MainWindow.g.cs file is generated + +Still one root HWND +Can't remove the window chrome but you can hide it. + +Developer + Designer = Deseloper (Hybrid person that knows a little of both sides) +AKA Devigner + +Layout: + +Vector vs Raster +Vector == Scalable. Declarative, telling the runtime what you want +not how you want it +Adobe Illustator - Can export XAML +Exprssion Design = Vector base design tool generates native XAML + +Raster == Fixed size. Tell the runtime how you want something drawn +Adobe Photoshop - Jpegs and PNG + +Panels: + + StackPanel = One after another + DockPanel = Menu bar up top status on bottom + WrapPanel = flowing elements + Grid = Row and Column + UniformGrid == Tic Tac Toe board + Canvas == Absolute position + + +Only one root element as a child of the Window +From there you nest layout panels + +Rule for Grids: + 4 rows and/or Columns. More than that next panels. + +2 Pass system + 1. Measure + 2. Arrange + +Transforms: + +2 Types: + Render - Parent panel doesn't account for transformed size + Layout - Parent panel DOES account for transformed size + +Pre made transforms: + + Scale + Rotate + Translate + Skew + +Full control + Matrix + +Can combine transforms but: +Multiple transforms must be in a + + diff --git a/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1.sln b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1.sln new file mode 100644 index 0000000..77489ba --- /dev/null +++ b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApplication1", "WpfApplication1\WpfApplication1.csproj", "{4048B907-DADD-465D-852A-5EAE0E4503DE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4048B907-DADD-465D-852A-5EAE0E4503DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4048B907-DADD-465D-852A-5EAE0E4503DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4048B907-DADD-465D-852A-5EAE0E4503DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4048B907-DADD-465D-852A-5EAE0E4503DE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.config b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.xaml b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.xaml new file mode 100644 index 0000000..7d80047 --- /dev/null +++ b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.xaml.cs b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.xaml.cs new file mode 100644 index 0000000..78dad49 --- /dev/null +++ b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/App.xaml.cs @@ -0,0 +1,11 @@ +using System.Windows; + +namespace WpfApplication1 +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/FormatCommands.cs b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/FormatCommands.cs new file mode 100644 index 0000000..24ac393 --- /dev/null +++ b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/FormatCommands.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using System.Windows.Input; + +namespace WpfApplication1 +{ + public static class FormatCommands + { + static RoutedUICommand setBackground = new RoutedUICommand("Set the Background", + "SetBackground",typeof(FormatCommands),new InputGestureCollection( + new List + { + new KeyGesture(Key.D,ModifierKeys.Alt) + })); + + public static RoutedUICommand SetBackground { get { return setBackground;} } + } +} diff --git a/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/MainWindow.xaml b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/MainWindow.xaml new file mode 100644 index 0000000..8f41061 --- /dev/null +++ b/Day2/Demos/CommandDemo/WpfApplication1/WpfApplication1/MainWindow.xaml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + This is a check box + + Turn on Advanced settings! + + + + + + + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2008/after/Window1.xaml.cs b/Day2/Student Content/Labs/Styles/VS2008/after/Window1.xaml.cs new file mode 100644 index 0000000..65901a9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/after/Window1.xaml.cs @@ -0,0 +1,23 @@ +using System.Windows; +using System.Windows.Controls; + +namespace StyleSwitch +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : System.Windows.Window + { + public Window1() + { + InitializeComponent(); + } + + void OnThemeChanged(object sender, RoutedEventArgs e) + { + ComboBox cb = (ComboBox)sender; + string skinName = (string)((ComboBoxItem)cb.SelectedItem).Tag; + ((App)Application.Current).SkinTheApp(skinName); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/App.xaml b/Day2/Student Content/Labs/Styles/VS2008/before/App.xaml new file mode 100644 index 0000000..6efb232 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/App.xaml.cs b/Day2/Student Content/Labs/Styles/VS2008/before/App.xaml.cs new file mode 100644 index 0000000..04ddf1c --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/App.xaml.cs @@ -0,0 +1,9 @@ +namespace StyleSwitch +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : System.Windows.Application + { + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/Properties/AssemblyInfo.cs b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c65cdcd --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/AssemblyInfo.cs @@ -0,0 +1,62 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("StyleSwitch")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("StyleSwitch")] +[assembly: AssemblyCopyright("Copyright @ JulMar Technology, Inc. 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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)] + + +// Specifies the location in which theme dictionaries are stored for types in an assembly. +[assembly: ThemeInfo( + // Specifies the location of system theme-specific resource dictionaries for this project. + // The default setting in this project is "None" since this default project does not + // include these user-defined theme files: + // Themes\Aero.NormalColor.xaml + // Themes\Classic.xaml + // Themes\Luna.Homestead.xaml + // Themes\Luna.Metallic.xaml + // Themes\Luna.NormalColor.xaml + // Themes\Royale.NormalColor.xaml + ResourceDictionaryLocation.None, + + // Specifies the location of the system non-theme specific resource dictionary: + // Themes\generic.xaml + ResourceDictionaryLocation.SourceAssembly)] + + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Resources.Designer.cs b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1129973 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3031 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.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", "2.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("StyleSwitch.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/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Resources.resx b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Settings.Designer.cs b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Settings.Designer.cs new file mode 100644 index 0000000..978b219 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3031 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.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/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Settings.settings b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/StyleSwitch.csproj b/Day2/Student Content/Labs/Styles/VS2008/before/StyleSwitch.csproj new file mode 100644 index 0000000..c13b7c6 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/StyleSwitch.csproj @@ -0,0 +1,96 @@ + + + Debug + AnyCPU + {64519097-C1D4-43CA-B3B8-C35FED56380C} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + StyleSwitch + StyleSwitch + 4 + winexe + 3.0 + true + Web + true + Foreground + 7 + Days + false + false + false + 1.0.0.* + true + true + Publish\ + v3.5 + + + 2.0 + + + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + + + false + true + .\bin\Release\ + TRACE + + + + + 3.5 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + Window1.xaml + Code + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/StyleSwitch.sln b/Day2/Student Content/Labs/Styles/VS2008/before/StyleSwitch.sln new file mode 100644 index 0000000..9a947a9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/StyleSwitch.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StyleSwitch", "StyleSwitch.csproj", "{64519097-C1D4-43CA-B3B8-C35FED56380C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/Window1.xaml b/Day2/Student Content/Labs/Styles/VS2008/before/Window1.xaml new file mode 100644 index 0000000..7ceec6a --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/Window1.xaml @@ -0,0 +1,19 @@ + + + + + + This is some text + + This is a check box + + Turn on Advanced settings! + + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2008/before/Window1.xaml.cs b/Day2/Student Content/Labs/Styles/VS2008/before/Window1.xaml.cs new file mode 100644 index 0000000..a141bf3 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2008/before/Window1.xaml.cs @@ -0,0 +1,13 @@ +namespace StyleSwitch +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : System.Windows.Window + { + public Window1() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/App.xaml b/Day2/Student Content/Labs/Styles/VS2010/after/App.xaml new file mode 100644 index 0000000..f94a424 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/App.xaml.cs b/Day2/Student Content/Labs/Styles/VS2010/after/App.xaml.cs new file mode 100644 index 0000000..830671f --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/App.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Windows; + +namespace StyleSwitch +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : System.Windows.Application + { + public App() + { + //SkinTheApp("bluetheme.xaml"); + } + + public void SkinTheApp(string skinName) + { + // Load the skin + ResourceDictionary rd = new ResourceDictionary(); + rd.Source = new Uri(skinName, UriKind.Relative); + + // Remove the old skin + if (Resources.MergedDictionaries.Count > 0) + Resources.MergedDictionaries.Remove(Resources.MergedDictionaries[0]); + + // Add the new skin + Resources.MergedDictionaries.Add(rd); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/BlueTheme.xaml b/Day2/Student Content/Labs/Styles/VS2010/after/BlueTheme.xaml new file mode 100644 index 0000000..2f17e34 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/BlueTheme.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/Properties/AssemblyInfo.cs b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c65cdcd --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/AssemblyInfo.cs @@ -0,0 +1,62 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("StyleSwitch")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("StyleSwitch")] +[assembly: AssemblyCopyright("Copyright @ JulMar Technology, Inc. 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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)] + + +// Specifies the location in which theme dictionaries are stored for types in an assembly. +[assembly: ThemeInfo( + // Specifies the location of system theme-specific resource dictionaries for this project. + // The default setting in this project is "None" since this default project does not + // include these user-defined theme files: + // Themes\Aero.NormalColor.xaml + // Themes\Classic.xaml + // Themes\Luna.Homestead.xaml + // Themes\Luna.Metallic.xaml + // Themes\Luna.NormalColor.xaml + // Themes\Royale.NormalColor.xaml + ResourceDictionaryLocation.None, + + // Specifies the location of the system non-theme specific resource dictionary: + // Themes\generic.xaml + ResourceDictionaryLocation.SourceAssembly)] + + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Resources.Designer.cs b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ebf5c8f --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.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("StyleSwitch.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/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Resources.resx b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Settings.Designer.cs b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Settings.Designer.cs new file mode 100644 index 0000000..e17471d --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.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/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Settings.settings b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/RedTheme.xaml b/Day2/Student Content/Labs/Styles/VS2010/after/RedTheme.xaml new file mode 100644 index 0000000..0bee53f --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/RedTheme.xaml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/StyleSwitch.csproj b/Day2/Student Content/Labs/Styles/VS2010/after/StyleSwitch.csproj new file mode 100644 index 0000000..5d8dfaa --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/StyleSwitch.csproj @@ -0,0 +1,115 @@ + + + + Debug + AnyCPU + {64519097-C1D4-43CA-B3B8-C35FED56380C} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + StyleSwitch + StyleSwitch + 4 + winexe + 3.0 + true + Web + true + Foreground + 7 + Days + false + false + false + 1.0.0.* + true + true + Publish\ + v3.5 + + + 3.5 + + + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + AllRules.ruleset + + + false + true + .\bin\Release\ + TRACE + AllRules.ruleset + + + + + 3.5 + + + + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + App.xaml + Code + + + Window1.xaml + Code + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/StyleSwitch.sln b/Day2/Student Content/Labs/Styles/VS2010/after/StyleSwitch.sln new file mode 100644 index 0000000..ce019e2 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/StyleSwitch.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StyleSwitch", "StyleSwitch.csproj", "{64519097-C1D4-43CA-B3B8-C35FED56380C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/Window1.xaml b/Day2/Student Content/Labs/Styles/VS2010/after/Window1.xaml new file mode 100644 index 0000000..729e2b1 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/Window1.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + This is some text + + This is a check box + + Turn on Advanced settings! + + + + + + + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2010/after/Window1.xaml.cs b/Day2/Student Content/Labs/Styles/VS2010/after/Window1.xaml.cs new file mode 100644 index 0000000..65901a9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/after/Window1.xaml.cs @@ -0,0 +1,23 @@ +using System.Windows; +using System.Windows.Controls; + +namespace StyleSwitch +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : System.Windows.Window + { + public Window1() + { + InitializeComponent(); + } + + void OnThemeChanged(object sender, RoutedEventArgs e) + { + ComboBox cb = (ComboBox)sender; + string skinName = (string)((ComboBoxItem)cb.SelectedItem).Tag; + ((App)Application.Current).SkinTheApp(skinName); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/App.xaml b/Day2/Student Content/Labs/Styles/VS2010/before/App.xaml new file mode 100644 index 0000000..6efb232 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/App.xaml.cs b/Day2/Student Content/Labs/Styles/VS2010/before/App.xaml.cs new file mode 100644 index 0000000..04ddf1c --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/App.xaml.cs @@ -0,0 +1,9 @@ +namespace StyleSwitch +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : System.Windows.Application + { + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/Properties/AssemblyInfo.cs b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c65cdcd --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/AssemblyInfo.cs @@ -0,0 +1,62 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("StyleSwitch")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("StyleSwitch")] +[assembly: AssemblyCopyright("Copyright @ JulMar Technology, Inc. 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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)] + + +// Specifies the location in which theme dictionaries are stored for types in an assembly. +[assembly: ThemeInfo( + // Specifies the location of system theme-specific resource dictionaries for this project. + // The default setting in this project is "None" since this default project does not + // include these user-defined theme files: + // Themes\Aero.NormalColor.xaml + // Themes\Classic.xaml + // Themes\Luna.Homestead.xaml + // Themes\Luna.Metallic.xaml + // Themes\Luna.NormalColor.xaml + // Themes\Royale.NormalColor.xaml + ResourceDictionaryLocation.None, + + // Specifies the location of the system non-theme specific resource dictionary: + // Themes\generic.xaml + ResourceDictionaryLocation.SourceAssembly)] + + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Resources.Designer.cs b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ebf5c8f --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.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("StyleSwitch.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/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Resources.resx b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Settings.Designer.cs b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Settings.Designer.cs new file mode 100644 index 0000000..e17471d --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.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/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Settings.settings b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/StyleSwitch.csproj b/Day2/Student Content/Labs/Styles/VS2010/before/StyleSwitch.csproj new file mode 100644 index 0000000..eaad68b --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/StyleSwitch.csproj @@ -0,0 +1,103 @@ + + + + Debug + AnyCPU + {64519097-C1D4-43CA-B3B8-C35FED56380C} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + StyleSwitch + StyleSwitch + 4 + winexe + 3.0 + true + Web + true + Foreground + 7 + Days + false + false + false + 1.0.0.* + true + true + Publish\ + v3.5 + + + 3.5 + + + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + AllRules.ruleset + + + false + true + .\bin\Release\ + TRACE + AllRules.ruleset + + + + + 3.5 + + + + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + App.xaml + Code + + + Window1.xaml + Code + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/StyleSwitch.sln b/Day2/Student Content/Labs/Styles/VS2010/before/StyleSwitch.sln new file mode 100644 index 0000000..ce019e2 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/StyleSwitch.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StyleSwitch", "StyleSwitch.csproj", "{64519097-C1D4-43CA-B3B8-C35FED56380C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/Window1.xaml b/Day2/Student Content/Labs/Styles/VS2010/before/Window1.xaml new file mode 100644 index 0000000..7ceec6a --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/Window1.xaml @@ -0,0 +1,19 @@ + + + + + + This is some text + + This is a check box + + Turn on Advanced settings! + + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2010/before/Window1.xaml.cs b/Day2/Student Content/Labs/Styles/VS2010/before/Window1.xaml.cs new file mode 100644 index 0000000..a141bf3 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2010/before/Window1.xaml.cs @@ -0,0 +1,13 @@ +namespace StyleSwitch +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : System.Windows.Window + { + public Window1() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/App.xaml b/Day2/Student Content/Labs/Styles/VS2012/after/App.xaml new file mode 100644 index 0000000..f94a424 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/App.xaml.cs b/Day2/Student Content/Labs/Styles/VS2012/after/App.xaml.cs new file mode 100644 index 0000000..830671f --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/App.xaml.cs @@ -0,0 +1,30 @@ +using System; +using System.Windows; + +namespace StyleSwitch +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : System.Windows.Application + { + public App() + { + //SkinTheApp("bluetheme.xaml"); + } + + public void SkinTheApp(string skinName) + { + // Load the skin + ResourceDictionary rd = new ResourceDictionary(); + rd.Source = new Uri(skinName, UriKind.Relative); + + // Remove the old skin + if (Resources.MergedDictionaries.Count > 0) + Resources.MergedDictionaries.Remove(Resources.MergedDictionaries[0]); + + // Add the new skin + Resources.MergedDictionaries.Add(rd); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/BlueTheme.xaml b/Day2/Student Content/Labs/Styles/VS2012/after/BlueTheme.xaml new file mode 100644 index 0000000..2f17e34 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/BlueTheme.xaml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/Properties/AssemblyInfo.cs b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c65cdcd --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/AssemblyInfo.cs @@ -0,0 +1,62 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("StyleSwitch")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("StyleSwitch")] +[assembly: AssemblyCopyright("Copyright @ JulMar Technology, Inc. 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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)] + + +// Specifies the location in which theme dictionaries are stored for types in an assembly. +[assembly: ThemeInfo( + // Specifies the location of system theme-specific resource dictionaries for this project. + // The default setting in this project is "None" since this default project does not + // include these user-defined theme files: + // Themes\Aero.NormalColor.xaml + // Themes\Classic.xaml + // Themes\Luna.Homestead.xaml + // Themes\Luna.Metallic.xaml + // Themes\Luna.NormalColor.xaml + // Themes\Royale.NormalColor.xaml + ResourceDictionaryLocation.None, + + // Specifies the location of the system non-theme specific resource dictionary: + // Themes\generic.xaml + ResourceDictionaryLocation.SourceAssembly)] + + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Resources.Designer.cs b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Resources.Designer.cs new file mode 100644 index 0000000..e910982 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.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("StyleSwitch.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/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Resources.resx b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Settings.Designer.cs b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Settings.Designer.cs new file mode 100644 index 0000000..37fc2a8 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.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/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Settings.settings b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/RedTheme.xaml b/Day2/Student Content/Labs/Styles/VS2012/after/RedTheme.xaml new file mode 100644 index 0000000..0bee53f --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/RedTheme.xaml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/StyleSwitch.csproj b/Day2/Student Content/Labs/Styles/VS2012/after/StyleSwitch.csproj new file mode 100644 index 0000000..1782492 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/StyleSwitch.csproj @@ -0,0 +1,120 @@ + + + + Debug + AnyCPU + {64519097-C1D4-43CA-B3B8-C35FED56380C} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + StyleSwitch + StyleSwitch + 4 + winexe + 3.0 + true + Web + true + Foreground + 7 + Days + false + false + false + 1.0.0.* + true + true + Publish\ + v4.5 + + + 3.5 + + + + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + AllRules.ruleset + false + + + false + true + .\bin\Release\ + TRACE + AllRules.ruleset + false + + + + + 3.5 + + + + + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + App.xaml + Code + + + Window1.xaml + Code + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/StyleSwitch.sln b/Day2/Student Content/Labs/Styles/VS2012/after/StyleSwitch.sln new file mode 100644 index 0000000..ce019e2 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/StyleSwitch.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StyleSwitch", "StyleSwitch.csproj", "{64519097-C1D4-43CA-B3B8-C35FED56380C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/Window1.xaml b/Day2/Student Content/Labs/Styles/VS2012/after/Window1.xaml new file mode 100644 index 0000000..729e2b1 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/Window1.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + This is some text + + This is a check box + + Turn on Advanced settings! + + + + + + + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/Window1.xaml.cs b/Day2/Student Content/Labs/Styles/VS2012/after/Window1.xaml.cs new file mode 100644 index 0000000..65901a9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/Window1.xaml.cs @@ -0,0 +1,23 @@ +using System.Windows; +using System.Windows.Controls; + +namespace StyleSwitch +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : System.Windows.Window + { + public Window1() + { + InitializeComponent(); + } + + void OnThemeChanged(object sender, RoutedEventArgs e) + { + ComboBox cb = (ComboBox)sender; + string skinName = (string)((ComboBoxItem)cb.SelectedItem).Tag; + ((App)Application.Current).SkinTheApp(skinName); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/after/app.config b/Day2/Student Content/Labs/Styles/VS2012/after/app.config new file mode 100644 index 0000000..51278a4 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/after/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/App.xaml b/Day2/Student Content/Labs/Styles/VS2012/before/App.xaml new file mode 100644 index 0000000..6efb232 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/App.xaml.cs b/Day2/Student Content/Labs/Styles/VS2012/before/App.xaml.cs new file mode 100644 index 0000000..04ddf1c --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/App.xaml.cs @@ -0,0 +1,9 @@ +namespace StyleSwitch +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : System.Windows.Application + { + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/Properties/AssemblyInfo.cs b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c65cdcd --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/AssemblyInfo.cs @@ -0,0 +1,62 @@ +#region Using directives + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Resources; +using System.Globalization; +using System.Windows; +using System.Runtime.InteropServices; + +#endregion + +// 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("StyleSwitch")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("JulMar Technology, Inc.")] +[assembly: AssemblyProduct("StyleSwitch")] +[assembly: AssemblyCopyright("Copyright @ JulMar Technology, Inc. 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[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)] + + +// Specifies the location in which theme dictionaries are stored for types in an assembly. +[assembly: ThemeInfo( + // Specifies the location of system theme-specific resource dictionaries for this project. + // The default setting in this project is "None" since this default project does not + // include these user-defined theme files: + // Themes\Aero.NormalColor.xaml + // Themes\Classic.xaml + // Themes\Luna.Homestead.xaml + // Themes\Luna.Metallic.xaml + // Themes\Luna.NormalColor.xaml + // Themes\Royale.NormalColor.xaml + ResourceDictionaryLocation.None, + + // Specifies the location of the system non-theme specific resource dictionary: + // Themes\generic.xaml + ResourceDictionaryLocation.SourceAssembly)] + + +// 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 Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Resources.Designer.cs b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Resources.Designer.cs new file mode 100644 index 0000000..e910982 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.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("StyleSwitch.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/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Resources.resx b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Settings.Designer.cs b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Settings.Designer.cs new file mode 100644 index 0000000..37fc2a8 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace StyleSwitch.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.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/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Settings.settings b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/StyleSwitch.csproj b/Day2/Student Content/Labs/Styles/VS2012/before/StyleSwitch.csproj new file mode 100644 index 0000000..368b2d9 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/StyleSwitch.csproj @@ -0,0 +1,108 @@ + + + + Debug + AnyCPU + {64519097-C1D4-43CA-B3B8-C35FED56380C} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + StyleSwitch + StyleSwitch + 4 + winexe + 3.0 + true + Web + true + Foreground + 7 + Days + false + false + false + 1.0.0.* + true + true + Publish\ + v4.5 + + + 3.5 + + + + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + AllRules.ruleset + false + + + false + true + .\bin\Release\ + TRACE + AllRules.ruleset + false + + + + + 3.5 + + + + + + + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile + Designer + + + App.xaml + Code + + + Window1.xaml + Code + + + + + + ResXFileCodeGenerator + Designer + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + True + Resources.resx + + + True + True + Settings.settings + + + + + \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/StyleSwitch.sln b/Day2/Student Content/Labs/Styles/VS2012/before/StyleSwitch.sln new file mode 100644 index 0000000..ce019e2 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/StyleSwitch.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StyleSwitch", "StyleSwitch.csproj", "{64519097-C1D4-43CA-B3B8-C35FED56380C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {64519097-C1D4-43CA-B3B8-C35FED56380C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/Window1.xaml b/Day2/Student Content/Labs/Styles/VS2012/before/Window1.xaml new file mode 100644 index 0000000..7ceec6a --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/Window1.xaml @@ -0,0 +1,19 @@ + + + + + + This is some text + + This is a check box + + Turn on Advanced settings! + + + + + + diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/Window1.xaml.cs b/Day2/Student Content/Labs/Styles/VS2012/before/Window1.xaml.cs new file mode 100644 index 0000000..a141bf3 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/Window1.xaml.cs @@ -0,0 +1,13 @@ +namespace StyleSwitch +{ + /// + /// Interaction logic for Window1.xaml + /// + public partial class Window1 : System.Windows.Window + { + public Window1() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Day2/Student Content/Labs/Styles/VS2012/before/app.config b/Day2/Student Content/Labs/Styles/VS2012/before/app.config new file mode 100644 index 0000000..51278a4 --- /dev/null +++ b/Day2/Student Content/Labs/Styles/VS2012/before/app.config @@ -0,0 +1,3 @@ + + + diff --git a/Day2/Summary.txt b/Day2/Summary.txt new file mode 100644 index 0000000..453efd3 --- /dev/null +++ b/Day2/Summary.txt @@ -0,0 +1,86 @@ +DAY 2 Summary: + +Framework Architecture: +Changes to the UI only can happen on the UI Thread. +If you aren't the UI thread dispatch the changes using the Dispatcher + bool CheckAccess + VerifyAccess throws if not on the UI thread +WPF caches property values. If they change you have to let WPF know + +Doesn't render non visible items +Uses DirectX +Is a retained graphics as opposed to immediate mode (think WinForms and OnPaint) + +Logical tree (what you type in XAML) +Visual tree (what is actually rendered) + +VS 2015 +Snoop +Mole project (likely dead) + +Input: + +new event model RoutedEvent +Tunneling - Goes from the parent to the child that actually raised the event + +uses prefix of Preview + +Bubbling - Goes from the lowest child to the parent + +Stop propagation of events set e.handled = true + +Hide an element from HitTesting set IsHitTestVisible = false + +ICommand + Two methods: + bool CanExecute(object p) + Execute(object p) + + +Resources: + + Solves the sharing problem. Avoid repeated XAML + + StaticResource - If it doesn't exist throws. It's only looked up once. + DynamicResource - Doesn't throw if it doesn't exist. Looks up first time and then registers a change handler. Main use case if to support runtime themeing + +Styles: + Solve setter problem. Extract property setters to a common style and simplfy your xaml + +