From e6ad60b3cf9bd7d391e10a3bb88b6578df77de22 Mon Sep 17 00:00:00 2001 From: Beatriz Stollnitz Date: Mon, 5 Aug 2019 18:09:55 -0700 Subject: [PATCH] Added 30th post. --- .../Images/30MultiBindingConverter.png | Bin 0 -> 13567 bytes .../MultiBindingConverter/App.xaml | 9 ++ .../MultiBindingConverter/App.xaml.cs | 17 +++ .../MultiBindingConverter.csproj | 89 +++++++++++++ .../MultiBindingConverter.sln | 20 +++ .../MultiBindingConverter.suo | Bin 0 -> 18944 bytes .../Properties/AssemblyInfo.cs | 54 ++++++++ .../Properties/Resources.cs | 70 +++++++++++ .../Properties/Resources.resx | 117 ++++++++++++++++++ .../Properties/Settings.cs | 42 +++++++ .../Properties/Settings.settings | 7 ++ .../MultiBindingConverter/Window1.xaml | 74 +++++++++++ .../MultiBindingConverter/Window1.xaml.cs | 49 ++++++++ 30-MultiBindingConverter/README.md | 62 ++++++++++ 14 files changed, 610 insertions(+) create mode 100644 30-MultiBindingConverter/Images/30MultiBindingConverter.png create mode 100644 30-MultiBindingConverter/MultiBindingConverter/App.xaml create mode 100644 30-MultiBindingConverter/MultiBindingConverter/App.xaml.cs create mode 100644 30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.csproj create mode 100644 30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.sln create mode 100644 30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.suo create mode 100644 30-MultiBindingConverter/MultiBindingConverter/Properties/AssemblyInfo.cs create mode 100644 30-MultiBindingConverter/MultiBindingConverter/Properties/Resources.cs create mode 100644 30-MultiBindingConverter/MultiBindingConverter/Properties/Resources.resx create mode 100644 30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.cs create mode 100644 30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.settings create mode 100644 30-MultiBindingConverter/MultiBindingConverter/Window1.xaml create mode 100644 30-MultiBindingConverter/MultiBindingConverter/Window1.xaml.cs create mode 100644 30-MultiBindingConverter/README.md diff --git a/30-MultiBindingConverter/Images/30MultiBindingConverter.png b/30-MultiBindingConverter/Images/30MultiBindingConverter.png new file mode 100644 index 0000000000000000000000000000000000000000..9e4655ea269e3c816562113ac49833e17fb9149b GIT binary patch literal 13567 zcmcI~WmKEZ7A{VL26t<5*Wwn6yB8@GEmEA~T0$vM+?^oB-Mz)3xI4wQxa$qycg{M0 z?w|YPW>(gkch+QP?`J<-X7YxrsmNlYk)pxD!C}hFz14t&gJ*?(qX7u8ku;(~*aIBW zM@eN#IJl}P^am4UI5^&V`L~i<9!7sNP<`;Huli75NoU>pt7eL*A>l~Am5{(k2FDcR zTSM_uYsZkZ!T^jqNXWl-y3qD(Si%6C@|qF~USN6Z{OHl zJIz9zbjv3?5;{8-$`c)RpVpamx0zj*jPr{Oq2jEUYdsbTs`H{cU`7S z4JyI7Qd7+eievreuuh5#paZI9eGJqNd(V@Y>}+ZU2(%A-Hn&j%d}l(NwlvEBiP_d) zr)YU`3UbcCc7CjG4D4f87ElgMyAVc4GM~fno*ViNq2u4NnLETqJ4}5du&+jUtJyE@ zkc+8izyYfwB>Z@^$dDM8O|THnx^yIDmVRF@vZgV&*;xtPVTq`6$>nhD%6N`!l<;pp z`hFW^X0l20WPJB#9iRV#mueR)SaRMl37=i$J(5XPpfsTewFSa6 zTY@|QZ$$GJL>;IW_w$Cw1iv@4oc9V}FA~3T&2wqYQ0(oTVc@Q*$sc*Ki{E)_MXEyA zjKNyved=Ok$T)NKUrR0%T-1L|k3P&It^G7B|7qpw%$U8a5v9rQ2xinyz95JyA@=QU z)&|4#)1o#v@-L3hN8>84Hp5of@ErJifjXif$Kdq7a{)L>3sESG^zn+00KoC4$ zU7g)91doGrQjsYrI*GpAngpX;n(pDym$SjB7Yn~ywmvtS??y}v<5SFhfsc3B)-zUA*^+W8&=cTE(1)Ml;@2NiRWN8Drk(ZfUJuHlUmxl9r|*X5@%qBM zhlSrzzvgrzJc~g5(&+SiLpVc+9HZ%ChOE(S-h!e7E4Q+}L!z(~J2i-OP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nTA*VWQ{e&aSyh)*B} zF~{L$qO~IRi?5%liXS%YRJlES7j9u+ubeB#ea%|&ybt+o+o67NM3lFt({2te`$KfVJRKZhc;yRY#~!Ssyb3A&|1t9C z%gLJu!}`56TmsG#Bsi#^0oE242@tL`+FC)YyA+l;E$sy3h0S3{cc~vt>NqtDaG=z> zEw!WQ7&vN-lpk-UhnV3dtY#9Wnxtf4M|ty9Tmr8D+d?OBYs!e9_;Q~LDV=f_%nFte zso>#p1CSmV15aGb=dn~;-7mgU_C1L)ZZykIl<%eQQ#N8Th@dLSnPpS4ToQMxI#Pa7 zo%d9bWEYMixG1s_3+-<>6bS<#{jkLGEd3mv7V6+NOmGS{9cNVxNK6~~I gD^sHbRB&(ncP{e_aEP&{;9wtlX_dF-;16H^4}Sl~l>h($ literal 0 HcmV?d00001 diff --git a/30-MultiBindingConverter/MultiBindingConverter/App.xaml b/30-MultiBindingConverter/MultiBindingConverter/App.xaml new file mode 100644 index 0000000..04447a2 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/30-MultiBindingConverter/MultiBindingConverter/App.xaml.cs b/30-MultiBindingConverter/MultiBindingConverter/App.xaml.cs new file mode 100644 index 0000000..9b929f3 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Windows; +using System.Data; +using System.Xml; +using System.Configuration; + +namespace MultiBindingConverter +{ + /// + /// Interaction logic for App.xaml + /// + + public partial class App : Application + { + + } +} \ No newline at end of file diff --git a/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.csproj b/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.csproj new file mode 100644 index 0000000..637c463 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.csproj @@ -0,0 +1,89 @@ + + + Debug + AnyCPU + {5A9A4A97-2C8D-43E4-ACA5-B865DD2B38DE} + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + MultiBindingConverter + MultiBindingConverter + 4 + winexe + 3.0 + true + Web + true + Foreground + 7 + Days + false + false + true + 1.0.0.* + true + true + Publish\ + + + true + full + false + .\bin\Debug\ + DEBUG;TRACE + + + false + true + .\bin\Release\ + TRACE + + + + + + + + + + + + + + + + + + + + + App.xaml + Code + + + Window1.xaml + Code + + + + + + ResXFileCodeGenerator + Resources.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.cs + + + True + Settings.settings + + + + + + \ No newline at end of file diff --git a/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.sln b/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.sln new file mode 100644 index 0000000..8104b76 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiBindingConverter", "MultiBindingConverter.csproj", "{5A9A4A97-2C8D-43E4-ACA5-B865DD2B38DE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5A9A4A97-2C8D-43E4-ACA5-B865DD2B38DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A9A4A97-2C8D-43E4-ACA5-B865DD2B38DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A9A4A97-2C8D-43E4-ACA5-B865DD2B38DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A9A4A97-2C8D-43E4-ACA5-B865DD2B38DE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.suo b/30-MultiBindingConverter/MultiBindingConverter/MultiBindingConverter.suo new file mode 100644 index 0000000000000000000000000000000000000000..e4842414bca433201a6342004c6b38e511172ad6 GIT binary patch literal 18944 zcmeHPU2Ggz6~3Fap`}1bQbI{fx(y+uBwqiespB-I`(ryUcAaMZ2dqTb>+xpe_0DQ% z*LKoWJkpo+p)W;9NFY&xs;W?gPyqFzeTd2nDFvhosTD{?st}^^fIy(eeBZq@-kF`5 z-PyI{jZLq0=5O!ZbMC$8eD~aQ@A!>tyZ-pSm-qci)TD>Sc5!{>cCo|uJcMhKOrI2D z8!mW%ePv}uJrn|$AEr&z0v|xuTg*PZ73YtD*yp!_J_@=WbO-2TppSz-0YcY{ognu6 zy*Td%?E&2h`V?p{=+mIPK%W8a1Kka}2lQFceoz>6ABbff!1;6L^(Jb%Eg|Yzq2sTN z{umGioJ-;YdLnq*D{fu2dFn~M)b-ze@9lp3YG^w$JwhcxIs=ZnI4_35eGXRxVp;tV z@VFN!WbcT8uSp$d-f@u@hL{&4B8PKXOyH%v_e{BAVpea!F@~=AxRFcQGhh{6Zw-b?KUWX;`Z+-1QP9!MEQHod)hzC>o@O- z1GN}H`zH?UGV{>>S|^xFz7yzW&b0%{ygXq=nJ63p!-2z1RVh#1$BTT zAWLqZnRq^i=MR7$1f2r)flh#|ybs~}5zxb+FM;?xit`{S4oZLqKzu%g^J(+?QS;2_ zqvka(ebXfJOo65YNiKd1K!=?*j7Uv|Mm8D%5VC4pK$M7VLCnebWMcj`9d&3@OFlQbmXOX8@ zbRk~__e6*oh^6zGg$zWDMU+~?uROBM`gs$`H-kJ`{PB$`DN#n8!(AinVXK8(z+d_s z^c9$D`NtpwTV);?sLOhl>&kH${E27OLYfTAY?SEdylG~t<#L z8byuFp;jFA4bU7kH7q9a%s_q9$VE#jy=DZbQHIiXO4mz-0Tpc5VFk5Y~E1@UhdPL!FM8z?A zeh{uo57f2~5Z8fcy>Km#;VOz}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P{GD_dTn^G2b~D+-$o)>{ez6LpAWJ|J-18O7rLck3H%?x%;jE Rtj~U<=3Dr~H*RDL{0~BRrw{-D literal 0 HcmV?d00001 diff --git a/30-MultiBindingConverter/MultiBindingConverter/Properties/AssemblyInfo.cs b/30-MultiBindingConverter/MultiBindingConverter/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3132a2e --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/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("MultiBindingConverter")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("MultiBindingConverter")] +[assembly: AssemblyCopyright("Copyright @ Microsoft 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/30-MultiBindingConverter/MultiBindingConverter/Properties/Resources.cs b/30-MultiBindingConverter/MultiBindingConverter/Properties/Resources.cs new file mode 100644 index 0000000..c91de7e --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/Properties/Resources.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MultiBindingConverter.Properties +{ + using System; + using System.IO; + using System.Resources; + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the Strongly Typed Resource Builder + // class via a tool like ResGen or Visual Studio.NET. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + class Resources + { + + private static System.Resources.ResourceManager _resMgr; + + private static System.Globalization.CultureInfo _resCulture; + + /*FamANDAssem*/ + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Resources.ResourceManager ResourceManager + { + get + { + if ((_resMgr == null)) + { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Resources", typeof(Resources).Assembly); + _resMgr = temp; + } + return _resMgr; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Globalization.CultureInfo Culture + { + get + { + return _resCulture; + } + set + { + _resCulture = value; + } + } + } +} diff --git a/30-MultiBindingConverter/MultiBindingConverter/Properties/Resources.resx b/30-MultiBindingConverter/MultiBindingConverter/Properties/Resources.resx new file mode 100644 index 0000000..3e18af9 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/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/30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.cs b/30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.cs new file mode 100644 index 0000000..5c32aff --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.42 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MultiBindingConverter.Properties +{ + public partial class Settings : System.Configuration.ApplicationSettingsBase + { + private static Settings m_Value; + + private static object m_SyncObject = new object(); + + public static Settings Value + { + get + { + if ((Settings.m_Value == null)) + { + System.Threading.Monitor.Enter(Settings.m_SyncObject); + if ((Settings.m_Value == null)) + { + try + { + Settings.m_Value = new Settings(); + } + finally + { + System.Threading.Monitor.Exit(Settings.m_SyncObject); + } + } + } + return Settings.m_Value; + } + } + } +} diff --git a/30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.settings b/30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.settings new file mode 100644 index 0000000..4024694 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/30-MultiBindingConverter/MultiBindingConverter/Window1.xaml b/30-MultiBindingConverter/MultiBindingConverter/Window1.xaml new file mode 100644 index 0000000..a328406 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/Window1.xaml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/30-MultiBindingConverter/MultiBindingConverter/Window1.xaml.cs b/30-MultiBindingConverter/MultiBindingConverter/Window1.xaml.cs new file mode 100644 index 0000000..5353005 --- /dev/null +++ b/30-MultiBindingConverter/MultiBindingConverter/Window1.xaml.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Text; +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.Shapes; + + +namespace MultiBindingConverter +{ + /// + /// Interaction logic for Window1.xaml + /// + + public partial class Window1 : Window + { + + public Window1() + { + InitializeComponent(); + } + + } + + public class Conv : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + // Note that we have to downcast each of the values (an object) to its actual + // type (double) before converting it to a float. + float alpha = (float)(double)(values[0]); + float red = (float)(double)(values[1]); + float green = (float)(double)(values[2]); + float blue = (float)(double)(values[3]); + + return Color.FromScRgb(alpha, red, green, blue); + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotSupportedException("ConvertBack should never be called"); + } + } +} \ No newline at end of file diff --git a/30-MultiBindingConverter/README.md b/30-MultiBindingConverter/README.md new file mode 100644 index 0000000..1e1e6d9 --- /dev/null +++ b/30-MultiBindingConverter/README.md @@ -0,0 +1,62 @@ +# How to control a color using Sliders + +I will show you today how you can use four sliders (alpha, red, green, blue) to control the background color of a rectangle. This simple app allows the user to change the opacity and color of the rectangle by sliding each of the sliders. + +I started by defining a Rectangle with its Background set to a SolidColorBrush. The target of the Binding will be the Color property of this brush. The source is a little more complicated, since we have four sources for the same Binding. The Binding needs to know the value from each of the four sliders in order to produce an output value (the color) with that information. Anytime you need to combine several sources and bind them to a single target, you need a MultiBinding. You can think of a MultiBinding as a black box that accepts several Bindings as input, combines all those inputs with the help of a Converter and produces one single value which will be set to the target property. + +You need two pieces of important information when you define a MultiBinding: you need to know all the individual bindings and you need to know the logic that combines them. In this sample, the individual bindings use ElementName to target each of the Sliders and bind to their Value property: + + + + (...) + + + + + + + + + + + + + + + + + + + + + + + + +A MultiBinding's Converter is very similar to a Binding's Converter. The main difference here is that instead of receiving one single object value as the first parameter of the Convert method, it receives an array of objects. Those items contain the result produced by each of the Bindings that are part of the MultiBinding, in the order they are defined. In this particular app, I am getting the alpha, red, green and blue values that I need to create a Color. Here is my implementation of this Converter: + + public class Conv : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + // Note that we have to downcast each of the values (an object) to its actual + // type (double) before converting it to a float. + float alpha = (float)(double)(values[0]); + float red = (float)(double)(values[1]); + float green = (float)(double)(values[2]); + float blue = (float)(double)(values[3]); + + return Color.FromScRgb(alpha, red, green, blue); + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotSupportedException("ConvertBack should never be called"); + } + } + +Many thanks to Adam Smith (dev lead for the 2D and 3D teams) for giving me the idea for this sample, for coding it with me, and for always being fun to chat with. + +Here is a screenshot of the completed project: + +![](Images/30MultiBindingConverter.png)