Skip to content

fix: Fix BorderBrush of TabControl binding#1648

Open
KaedeKami wants to merge 1 commit intoHandyOrg:masterfrom
KaedeKami:master
Open

fix: Fix BorderBrush of TabControl binding#1648
KaedeKami wants to merge 1 commit intoHandyOrg:masterfrom
KaedeKami:master

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

2 participants