1) Using MVVM Light, I have an xCeed datagrid which I only want visible only after the user has opened a file.
So I've created a boolean property in the ViewModel and use the booleantoVisibilityConverter to parse that property
<Window.Resources>
<BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
So in the (lengthy so I'm cutting off the beginning it) xaml I put on the datagrid, I added this to the end:
Visibility="{Binding Path=FileOpened, Converter={StaticResource booleanToVisibilityConverter}}">
The moment I put that to use though, the grid disappears from the designtime view, which I do not want.
Checking to see if I'm in Design View inside the property's accessor doesn't seem to help.
public bool FileOpened
{
get
{
if (IsInDesignMode)
return true;
return fileOpened;
}
set => fileOpened = value;
}
EDIT: I've also tried to call RaisePropertyChanged on the mutator. Didn't expect it to help and, sure enough, it didn't.