Skip to content

AppContext and *CompatibilityPreferences infrastructure #787

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

Merged
merged 5 commits into from
May 30, 2019

Conversation

vatsan-madhavan
Copy link
Member

@vatsan-madhavan vatsan-madhavan commented May 30, 2019

This PR brings up a functioning infrastructure for AppContext and *CompatibilityPreferences infrastructure.

  • AppContext based quirks would be set in runtimeconfig.template.json
  • I haven't tested to verify whether these support registry.
  • *CompatibilityPreferences would continue being set in App.config

The new defaults for various quirks are so:

{
  "configProperties": {
    /*
    // BuildTasksAppContextSwitches
    "Switch.System.Windows.Markup.DoNotUseSha256ForMarkupCompilerChecksumAlgorithm": false,

    // CoreAppContextSwitches
    "Switch.System.Windows.DoNotScaleForDpiChanges": false,
    "Switch.System.Windows.Media.ImageSourceConverter.OverrideExceptionWithNullReferenceException": false,
    "Switch.System.Windows.DoNotUsePresentationDpiCapabilityTier2OrGreater": false,
    "Switch.System.Windows.Input.Stylus.DisableStylusAndTouchSupport": false,
    "Switch.System.Windows.Input.Stylus.EnablePointerSupport": false,
    "Switch.System.Windows.Diagnostics.DisableDiagnostics": false,
    "Switch.System.Windows.Diagnostics.AllowChangesDuringVisualTreeChanged": false,
    "Switch.System.Windows.Input.Stylus.DisableImplicitTouchKeyboardInvocation": false,
    "Switch.System.Windows.Media.ShouldRenderEvenWhenNoDisplayDevicesAreAvailable": false,
    "Switch.System.Windows.Media.ShouldNotRenderInNonInteractiveWindowStation": false,
    "Switch.System.Windows.DoNotUsePresentationDpiCapabilityTier3OrGreater": false, // Reserved for future use
    "Switch.System.Windows.AllowExternalProcessToBlockAccessToTemporaryFiles": false,
    "Switch.System.Windows.EnableLegacyDangerousClipboardDeserializationMode": false,

    // FrameworkAppContextSwitches
    "Switch.System.Windows.Controls.Text.UseAdornerForTextboxSelectionRendering": true,
    "Switch.MS.Internal.DoNotApplyLayoutRoundingToMarginsAndBorderThickness": false,
    "Switch.System.Windows.Controls.Grid.StarDefinitionsCanExceedAvailableSpace": false,
    "Switch.System.Windows.Controls.TabControl.SelectionPropertiesCanLagBehindSelectionChangedEvent": false,
    "Switch.System.Windows.Data.DoNotUseFollowParentWhenBindingToADODataRelation": false,
    "Switch.System.Windows.Data.Binding.IListIndexerHidesCustomIndexer": false,
    "Switch.System.Windows.Baml2006.AppendLocalAssemblyVersionForSourceUri": false,
    "Switch.System.Windows.Controls.KeyboardNavigationFromHyperlinkInItemsControlIsNotRelativeToFocusedElement": false,
    "Switch.System.Windows.Automation.Peers.ItemAutomationPeerKeepsItsItemAlive": false,

    // BaseAppContextSwitches
    "Switch.MS.Internal.DoNotUseCulturePreservingDispatcherOperations": false,
    "Switch.MS.Internal.UseSha1AsDefaultHashAlgorithmForDigitalSignatures": false,
    "Switch.MS.Internal.DoNotInvokeInWeakEventTableShutdownListener": false,
    "Switch.MS.Internal.EnableCleanupSchedulingImprovements": false,
    "Switch.MS.Internal.EnableWeakEventMemoryImprovements": false,

    // AccessibilitySwitches
    "Switch.UseLegacyAccessibilityFeatures": false,
    "Switch.UseLegacyAccessibilityFeatures.2": false,
    "Switch.UseLegacyAccessibilityFeatures.3": false,
    "Switch.UseLegacyToolTipDisplay": false,
    "Switch.System.Windows.Controls.ItemsControlDoesNotSupportAutomation": false
  */
  }
}
<configuration>
  <appSettings>
    <!-- Defined in CoreCompatibilityPreferences -->
    <!-- 
    <add key="IsAltKeyRequiredInAccessKeyDefaultScope" value="false"/>
    <add key="EnableMultiMonitorDisplayClipping" value="null"/>
    <add key="IncludeAllInkInBoundingBox" value="true"/>
    -->
    
    
    <!-- Defined in BaseCompatibilityPreferences -->
    <!-- 
    <add key="ReuseDispatcherSynchronizationContextInstance" value="false"/>
    <add key="FlowDispatcherSynchronizationContextPriority" value="true"/>
    <add key="InlineDispatcherSynchronizationContextSend" value="true"/>
    <add key="HandleDispatcherRequestProcessingFailure" value="Continue"/>
    <add key="MatchPackageSignatureMethodToPackagePartDigestMethod" value="true"/>
    -->
    
    <!-- Defined in FrameworkCompatibilityPreferenes -->
    <!-- 
    <add key="AreInactiveSelectionHighlightBrushKeysSupported" value="true"/>
    <add key="KeepTextBoxDisplaySynchronizedWithTextProperty" value="true"/>
    <add key="ShouldThrowOnCopyOrCutFailure" value="false"/>
    <add key="HandleTwoWayBindingToPropertyWithNonPublicSetter" value="Allow"/>
    <add key="UseSetWindowPosForTopmostWindows" value="false"/>
    <add key="VSP45Compat" value="false"/>
    -->
  </appSettings>
</configuration>

Also see microsoft/WPF-Samples#87

@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label May 30, 2019
@vatsan-madhavan vatsan-madhavan requested a review from rladuca May 30, 2019 09:24
@vatsan-madhavan vatsan-madhavan added this to the Preview milestone May 30, 2019
@vatsan-madhavan vatsan-madhavan self-assigned this May 30, 2019
@vatsan-madhavan vatsan-madhavan changed the title AppContext and yyyCompatibilityPreferences infrastructure AppContext and *CompatibilityPreferences infrastructure May 30, 2019
Copy link
Member

@rladuca rladuca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. All the defaults seem correct.

@vatsan-madhavan vatsan-madhavan merged commit 52f9126 into master May 30, 2019
@vatsan-madhavan vatsan-madhavan deleted the dev/vatsan/appcontext2 branch June 4, 2019 23:49
@ghost ghost locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants