英文:
How to hide radio buttons in c#
问题
I want to hide some radio buttons based on a value.
How to do that?
I was trying this.
if (ArbeitsplatzId == 400)
{
//RbAmWartungRbRüstenRbRPMWartungRbSchichtwechsel
RbAmWartung.Visibility = false;
RbAmWartung.Visibility = "Hidden";
}
in xaml code it's working with this: Visibility="Hidden"
英文:
I want to hide some radio buttons based on a value.
How to do that?
I was trying this.
if(ArbeitsplatzId==400)
{
//RbAmWartungRbRüstenRbRPMWartungRbSchichtwechsel
RbAmWartung.Visibility = false;
RbAmWartung.Visibility = "Hidden";
}
in xaml code it's wotking with this: Visibility="Hidden"
答案1
得分: 1
你应该尝试以下内容:
if (ArbeitsplatzId == 400)
{
RbAmWartung.Visibility = Visibility.Hidden;
}
这里使用了 Visibility
属性。可以在这里了解更多信息。
英文:
You should Try the following:
if (ArbeitsplatzId == 400)
{
RbAmWartung.Visibility = Visibility.Hidden;
}
The Visibilty
property is used here. Learn more about it here.
答案2
得分: -1
if (ArbeitsplatzId >= 400 && ArbeitsplatzId <= 499)
{
//btnSap.Visibility = lib.Visibility.Hidden;
RbAmWartung.Visibility = lib.Visibility.Hidden;
RbRüsten.Visibility = lib.Visibility.Hidden;
RbRPMWartung.Visibility = lib.Visibility.Hidden;
RbSchichtwechsel.Visibility = lib.Visibility.Hidden;
}
英文:
if (ArbeitsplatzId >= 400 && ArbeitsplatzId <= 499)
{
//btnSap.Visibility = lib.Visibility.Hidden;
RbAmWartung.Visibility = lib.Visibility.Hidden;
RbRüsten.Visibility = lib.Visibility.Hidden;
RbRPMWartung.Visibility = lib.Visibility.Hidden;
RbSchichtwechsel.Visibility = lib.Visibility.Hidden;
}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论