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

Fix missing XamlRoot in Samples/Windowing/WindowBasicsPage.xaml.cs #298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on May 25, 2023

  1. There was a problem with Samples/Windowing/cs-winui when using the Ti…

    …tleTextBox.Text.Contains method to find a match.
    
    Instead of displaying the expected error dialog, an exception was thrown with the error messages:
    
    "Value does not fall within the expected range."
    "The parameter is incorrect."
    "This element is already associated with a XamlRoot, it cannot be associated with a different one until it is removed from the previous XamlRoot."
    
    To fix this issue, the solution was to assign XamlRoot to this.XamlRoot. By making this assignment, the problem was resolved, and the exception was no longer thrown.
    
    Since you cannot paste the "\n" into the text box as it is not a multiline input, this code is unreachable and not tested.
    colhountech committed May 25, 2023
    Configuration menu
    Copy the full SHA
    d6f6dd3 View commit details
    Browse the repository at this point in the history