Users Pricing

forum

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

Want to show/hide control from ViewModel in wpf

Anonymous User 3116 29 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

0 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md