Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> in WPF
Bugmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> List 12 Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> we introduced a different WPFmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> XAMLmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> parse the relevant Bugmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">. Today we will introduce another. NET Framework 4 Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> for XAMLmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> resolution improvements.
Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> we know Buttonmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> belongs to ContentControlCalibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">, ContentControlCalibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; ContentCalibri in mso-hansi-theme-font: minor-latin ">; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> logically, it can be any other ControlCalibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">. So we can put Buttonmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> ContentCalibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> set it to Imagemso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">. This is also a common feature.
Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> the code is as follows:
<Button Height = "28">
<Image Width = "16" Height = "16" Source = "Green. PNG" Stretch = "Fill"/>
</Button>
Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> can we go to Buttonmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> Stylemso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> put ContentCalibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> set the attribute to Imagemso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">? Theoretically, there should be no problems. However, the fact is that in. NET Framework 4 Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> earlier versions of WPFmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">, as shown below:
Button Style With Content Stter <Style x: Key = "ImageButtonStyle" TargetType = "{x: Type Button}">
<Setter Property = "Content">
<Setter. Value>
<Image Width = "16" Height = "16" Source = "Green. PNG" Stretch = "Fill"/>
</Setter. Value>
</Setter>
<Setter Property = "ToolTip">
<Setter. Value>
<Image Width = "16" Height = "16" Source = "Green. PNG" Stretch = "Fill"/>
</Setter. Value>
</Setter>
</Style>
Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> In Stylemso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> set ContentCalibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> or ToolTipCalibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> or other Objectmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> attributes are other visual mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">. It can be compiled, but it will run abnormally, this Exception is thrown.
Unhandled Exception:
System. Windows. Markup. XamlParseException: Cannot add content of type
'System. Windows. Controls. image' to an object of type 'System. object'. Error at Object
'System. Windows. Controls. image' in markup file 'changebuttoncontent; component/mainwindow. xaml'
Line 19 Position 12.
Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> If in Blend3mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> open Stylemso-ascii-theme-font above: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> file. The following error is displayed:
"System. Windows. Controls. Image" is not a valid Value of "Setter. Value". Values Derived from Visual or ContentElement are not supported.
Blend3mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:
; Mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri;
Mso-hansi-theme-font: minor-latin "> the error may seem to have a different meaning. It seems that the following line is: this should be done, but it is" not supported "now ".
Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> the good news is :. NET Framework 4.0 Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> Start With Stylemso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> is completely running. Whether in VS2010mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> or a Blend4mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin ">.
Mso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> WPFmso-ascii-theme-font: minor-latin; mso-fareast-font-family:; mso-fareast-theme-font:
Minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin "> better and better.