I'm trying to bind the visibility flags of a pair of grids, however they appear to be ignoring my attempts. Any help would be appreciated. Thanks!
This is in my screens xaml:
<Grid Name="grdNotifLogo" Style="{StaticResource insightLogoNotify}" Visibility="{Binding Path=_notifVisibility, Mode=OneWay}" MouseDown="grdNotifLogo_MouseDown"/>
<Grid Name="grdMainLogo" Style="{StaticResource insightLogo}" Visibility="{Binding Path=_logoVisibility, Mode=OneWay}"/>
The screens xaml.cs file inherits a window base class, which has this:
protected Visibility _logoVisibility = _ Visibility.Visible;
protected Visibility _notifVisibility = _ Visibility.Collapsed;
public bool NotificationIconEnabled
{
get { return _notifVisibility == Visibility.Visible; }
set
{
if (value)
{
_logoVisibility = Visibility.Collapsed;
_notifVisibility = Visibility.Visible;
}
else
{
_logoVisibility = Visibility.Visible;
_notifVisibility = Visibility.Collapsed;
}
}
}
The data context is also setup to the grid which holds my grids of interest:
ToolBar.DataContext = this;