forum

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

Want to show/hide control from ViewModel in wpf

Anonymous User265329-Jan-2014

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"/>

ViewModel

    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

Updated on 29-Jan-2014
I am a content writter !

Can you answer this question?


Answer

0 Answers

Liked By