Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0-preview7] Revert setter.value changes #9587

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'S
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.ResourceDictionary.DeferrableContent' changed from '[DesignerSerializationVisibilityAttribute(0)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]' in the implementation.
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.ResourceDictionary.Source' changed from '[DesignerSerializationVisibilityAttribute(0)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Setter.Property' changed from '[LocalizabilityAttribute(0, Modifiability=0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Modifiability=Modifiability.Unmodifiable, Readability=Readability.Unreadable)]' in the implementation.
CannotRemoveAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' exists on 'System.Windows.Setter.Value' in the contract but not the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Setter.Value' changed from '[LocalizabilityAttribute(0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.SetterBase' changed from '[LocalizabilityAttribute(16)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.Ignore)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.StaticResourceExtension' changed from '[LocalizabilityAttribute(17)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]' in the implementation.
Expand Down Expand Up @@ -262,4 +261,4 @@ CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVi
CannotChangeAttribute : Attribute 'System.Windows.Markup.DesignerSerializationOptionsAttribute' on 'System.Windows.Markup.XmlAttributeProperties.GetXmlSpace(System.Windows.DependencyObject)' changed from '[DesignerSerializationOptionsAttribute(1)]' in the contract to '[DesignerSerializationOptionsAttribute(DesignerSerializationOptions.SerializeAsAttribute)]' in the implementation.
CannotChangeAttribute : Attribute 'System.ComponentModel.DesignerSerializationVisibilityAttribute' on 'System.Windows.Media.Animation.Storyboard.GetTarget(System.Windows.DependencyObject)' changed from '[DesignerSerializationVisibilityAttribute(0)]' in the contract to '[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]' in the implementation.
CannotChangeAttribute : Attribute 'System.Windows.LocalizabilityAttribute' on 'System.Windows.Shapes.Shape' changed from '[LocalizabilityAttribute(0, Readability=0)]' in the contract to '[LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)]' in the implementation.
Total Issues: 263
Total Issues: 262
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Compat issues with assembly System.Windows.Controls.Ribbon:
Total Issues: 0
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeA
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderFragment' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderFragmentRoot' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderHwndOverride' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderSimple' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IScrollItemProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IScrollProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ISelectionItemProvider' in the contract but not the implementation.
Expand All @@ -19,9 +20,10 @@ CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeA
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITableItemProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITableProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITextProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITextRangeProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IToggleProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITransformProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IValueProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IVirtualizedItemProvider' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IWindowProvider' in the contract but not the implementation.
Total Issues: 25
Total Issues: 27
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace System.Windows.Baml2006
{
partial class WpfSharedBamlSchemaContext: XamlSchemaContext
{
const int KnownPropertyCount = 272;
const int KnownPropertyCount = 270;


private WpfKnownMember CreateKnownMember(short bamlNumber)
Expand Down Expand Up @@ -286,7 +286,6 @@ private WpfKnownMember CreateKnownMember(short bamlNumber)
case 268: return Create_BamlProperty_XmlDataProvider_XmlSerializer();
case 269: return Create_BamlProperty_TextBox_IsReadOnly();
case 270: return Create_BamlProperty_RichTextBox_IsReadOnly();
case 272: return Create_BamlProperty_Setter_Value();
default:
throw new InvalidOperationException("Invalid BAML number");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8844,7 +8844,6 @@ private WpfKnownType Create_BamlType_Setter(bool isBamlType, bool useV3Rules)
typeof(System.Windows.Setter),
isBamlType, useV3Rules);
bamlType.DefaultConstructor = delegate() { return new System.Windows.Setter(); };
bamlType.ContentPropertyName = "Value";
bamlType.Freeze();
return bamlType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1107,8 +1107,7 @@ internal enum KnownProperties : short
XmlDataProvider_XmlSerializer,
MaxProperty,
TextBox_IsReadOnly,
RichTextBox_IsReadOnly,
Setter_Value
RichTextBox_IsReadOnly
}

#if !BAMLDASM
Expand Down Expand Up @@ -2787,9 +2786,6 @@ internal static string GetContentPropertyName(KnownElements knownElement)
case KnownElements.ToolBarTray:
name = "ToolBars";
break;
case KnownElements.Setter:
name = "Value";
break;
case KnownElements.ControlTemplate:
case KnownElements.DataTemplate:
case KnownElements.FrameworkTemplate:
Expand Down Expand Up @@ -3680,10 +3676,6 @@ internal static short GetKnownPropertyAttributeId(KnownElements typeID, string f
if (string.Equals(fieldName, "XmlSerializer", StringComparison.Ordinal))
return (short)KnownProperties.XmlDataProvider_XmlSerializer;
break;
case KnownElements.Setter:
if (string.Equals(fieldName, "Value", StringComparison.Ordinal))
return (short)KnownProperties.Setter_Value;
break;
}
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,14 @@ public override void WriteElementStart(XamlElementStartNode xamlElementStartNode
_inEventSetter = true;
#endif
}
else if ((depth == 2 && _setterElementEncountered) ||
(depth == 3 && _setterPropertyEncountered))
{
ThrowException(nameof(SR.ParserNoSetterChild),
xamlElementStartNode.TypeFullName,
xamlElementStartNode.LineNumber,
xamlElementStartNode.LinePosition);
}
}

// Handle custom serializers within the style section by creating an instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ namespace System.Windows
/// </summary>
[XamlSetMarkupExtensionAttribute("ReceiveMarkupExtension")]
[XamlSetTypeConverterAttribute("ReceiveTypeConverter")]
[ContentProperty("Value")]
public class Setter : SetterBase, ISupportInitialize
{
/// <summary>
Expand Down Expand Up @@ -161,7 +160,6 @@ public DependencyProperty Property
/// </summary>
[System.Windows.Markup.DependsOn("Property")]
[System.Windows.Markup.DependsOn("TargetName")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // Not localizable by-default
[TypeConverter(typeof(System.Windows.Markup.SetterTriggerConditionValueConverter))]
public object Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,6 @@ internal SessionEndingCancelEventArgs() { }
public delegate void SessionEndingCancelEventHandler(object sender, System.Windows.SessionEndingCancelEventArgs e);
[System.Windows.Markup.XamlSetMarkupExtensionAttribute("ReceiveMarkupExtension")]
[System.Windows.Markup.XamlSetTypeConverterAttribute("ReceiveTypeConverter")]
[System.Windows.Markup.ContentPropertyAttribute("Value")]
public partial class Setter : System.Windows.SetterBase, System.ComponentModel.ISupportInitialize
{
public Setter() { }
Expand Down
Loading