Home > DeveloperSection > Forums > Want to show/hide control from ViewModel in wpf
Ankit Singh

Total Post:341

Posted on    January-29-2014 11:15 PM


 0 Reply(s)
 1039  View(s)
Rate this:

I want to show/hide control from ViewModel in wpf. But NotifyingProperty not working fine here is my code.

This is my control on design View

<ZuneWithCtrls_UserControls:SmallClock Visibility="{Binding IsProcessStart, Converter={StaticResource BooleanToVisibilityConverter}}"

                Height="Auto" Width="Auto" VerticalAlignment="Center" HorizontalAlignment="Center" Canvas.Top="150"/>


    private readonly NotifyingProperty IsProcessStartProperty =

      new NotifyingProperty("IsProcessStart", typeof(bool), default(bool));

    public bool IsProcessStart


        get { return (bool)GetValue(IsProcessStartProperty); }

        set { SetValue(IsProcessStartProperty, value); }


On Constructor of ViewModel I set

public AdvanceSearchViewModel()


       IsProcessStart = false;


And I am changing this property on button click command but it's not working. 
Please help

Don't want to miss updates? Please click the below button!

Follow MindStick