为什么我的可见性绑定不起作用? [英] Why is my visibility binding not working?
问题描述
大家好,
我的一个可见性绑定有问题。
在我的应用程序中,我有一个文本框和一个组合框几乎在同一个地方。
它们是重叠的,所以我在背景中有两个变量用于它们的可见性。它们位于Datagrid中,因此可以从列表中提供Visibility Source。
我的Combobox的绑定工作得非常好,但是我的Textbox之一没有' t b / b
这是我的代码:
Hello everyone,
I have a problem with one of my Visibility Bindings.
In my application I have a Textbox and a combobox at nearly the same place.
They are overlapping so I have two Variables in the background for their Visibility. They are in a Datagrid, so the Visibility Source will be provided from the list.
The Binding of my Combobox works absolutely fine, but the one of my Textbox doesn't
Here is my Code:
<TextBox x:Name="Textvalue" HorizontalAlignment="Left" VerticalAlignment="Center" Width="150" BorderBrush="#FF383F55" BorderThickness="0" Foreground="White" removed="#FF232734"
Text="{Binding Path=Value, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding Path=IsPath}"/>
<ComboBox x:Name="Combobox" VerticalAlignment="Center" Foreground="White" Margin="3,3,3,3" Height="23"
ItemsSource="{Binding Path=ValueArray}"
SelectedValue="{Binding Path=Value, UpdateSourceTrigger=PropertyChanged}"
Style="{DynamicResource ComboBoxStyle1}"
Visibility="{Binding Path=IsCombobox}"/>
T hese是我的Get属性(两者都只有Get Proberty):
These are my Get Property for both (Both only have the Get Proberty):
public System.Windows.Visibility isPath
{
get
{
return _IsPath;
}
}
public System.Windows.Visibility IsCombobox
{
get
{
return _IsCombobox;
}
}
我希望你能帮助我,因为我不知道这里有什么问题:/
提前致谢
我的尝试:
尝试将绑定更改为其他变量。
I hope you can help me because I don't know what's wrong here :/
Thanks in advance
What I have tried:
Tried to change the binding to a different Variable.
推荐答案
请检查外壳..代码Path = IsPath,但您的Property = isPath
Please check the casing.. in code "Path=IsPath", but your Property = isPath
这篇关于为什么我的可见性绑定不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!