Hello. When I set RadPane.IsHidden to 'false' after it has been set to 'true' the RadPain remains invisible. Below is XAML markup:
Initially (after application loading) the RadPain is visible and the CheckBox is unchecked. When I check the CheckBox first then the RadPain become invisible. But when I uncheck the CheckBox after it then the RadPain remains invisible (but the command is fired). How to have the command display the RadPain each time the CheckBox is unchecked? What I'm doing wrong?
<UserControl x:Class="DeviceReading.Views.DeviceReadingView" xmlns:prism="http://prismlibrary.com/" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" prism:ViewModelLocator.AutoWireViewModel="True">. . . . . . . . . . . . . . . . . . .<StackPanel Grid.Row="0" Grid.Column="0" HorizontalAlignment="Stretch" Margin="0 5 0 3" Orientation="Horizontal"> <CheckBox Content="Gas Velocity" Command="{Binding Path=ShowHideGasVelocityChartViewCommand}" CommandParameter="{Binding Path=IsChecked, RelativeSource={RelativeSource Self}}"/></StackPanel><telerik:RadDocking Grid.Row="1" Grid.Column="0" x:Name="Docking">. . . . . . . . . . . . . . . . . . . <telerik:RadSplitContainer> <telerik:RadPaneGroup> <telerik:RadPane Header="Gas Velocity" IsHidden="{Binding IsGasVelocityChartHidden, Mode=TwoWay}" prism:RegionManager.RegionName="GasVelocityChartRegion" /> </telerik:RadPaneGroup> </telerik:RadSplitContainer>. . . . . . . . . . . . . . . . . . .</telerik:RadDocking>. . . . . . . . . . . . . . . . . . .</UserControl>Where UserControl is Prism UserControl. Below is ViewModel code.
public class DeviceReadingViewModel : BindableBase, IConfirmNavigationRequest{ . . . . . . . . . . public DeviceReadingViewModel(IEventAggregator eventAggregator) { this._eventAggregator = eventAggregator; this.ShowHideGasVelocityChartViewCommand = new DelegateCommand<object>(this.showHideGasVelocityChartView); } // Field and property controlling of the RadPain status (Visible / Hidden) private bool _isGasVelocityChartHidden; public bool IsGasVelocityChartHidden { get { return this._isGasVelocityChartHidden; } set { this.SetProperty(ref this._isGasVelocityChartHidden, value); } } // The command of hidding / visualizing of the RadPain. public DelegateCommand<object> ShowHideGasVelocityChartViewCommand { get; private set; } private void showHideGasVelocityChartView(object parameter) { if ((bool)parameter == true) this.IsGasVelocityChartHidden = false; else this.IsGasVelocityChartHidden = true; }}