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

False report of RCS1163 #1067

Closed
wmjordan opened this issue Apr 7, 2023 · 0 comments · Fixed by #1068
Closed

False report of RCS1163 #1067

wmjordan opened this issue Apr 7, 2023 · 0 comments · Fixed by #1068

Comments

@wmjordan
Copy link

wmjordan commented Apr 7, 2023

Product and Version Used:
Last released

Steps to Reproduce:
The following code triggers this issue on parameter DependencyPropertyChangedEventArgs e.

public static TextBox SetOnVisibleSelectAll(this TextBox textBox) {
	textBox.IsVisibleChanged -= TextBox_VisibleSelectAll;
	textBox.IsVisibleChanged += TextBox_VisibleSelectAll;
	return textBox;

	void TextBox_VisibleSelectAll(object sender, DependencyPropertyChangedEventArgs e) {
		var b = sender as TextBox;
		if (b.IsVisible) {
			b.Focus();
			b.SelectAll();
		}
	}
}

Expected Behavior:
The parameter e is necessary since the containing method is used in an event handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants