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: Fix BorderBrush of TabControl binding #1648

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

Conversation

KaedeKami
Copy link

No description provided.

@L-MAX6
Copy link

L-MAX6 commented Dec 18, 2024

是修复这个绑定的TabControl切换时,会自动加上红色BorderBrush吗?为啥我的还会这样,版本是3.5.1
image

@L-MAX6
Copy link

L-MAX6 commented Dec 18, 2024

是修复这个绑定的TabControl切换时,会自动加上红色BorderBrush吗?为啥我的还会这样,版本是3.5.1 图像

我知道问题在哪里了,我使用了绑定转换器 <TabControl.SelectedItem>




</TabControl.SelectedItem>

//转换器的ConvertBack
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
{
return null; //是这里有问题,如果我返回Null的话,绑定源没有处理null值,控件会自动给我加上红色边框,return new object[0];这样就正常了 // return new object[0];
}

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

Successfully merging this pull request may close these issues.

2 participants