Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

DelegateCommand

$
0
0
        private DelegateCommand<object> _GuncelleCommand;
        public ICommand GuncelleCommand
        {
            get
            {
                if (_GuncelleCommand == null)
                {
                    _GuncelleCommand = new DelegateCommand<object>(new Action<object>(this.BelgeGuncelle), new Func<bool>(() => this.IsGuncellemeTrue));
                }
                return _GuncelleCommand;
            }
        }
        public bool IsGuncellemeTrue
        {
            get { return true; }
        }

and

       public void BelgeGuncelle(object parameter)
        {
            MessageBox.Show("Test");

        }

How Can I use with the following Treeviewitem of thepart DelegateCommand;

<TreeView.ItemContainerStyle><Style TargetType="{x:Type TreeViewItem}"><EventSetter Event="UIElement.PreviewMouseLeftButtonDown" Handler="SelectedTreeView"/><Style.Triggers><Trigger Property="IsSelected" Value="True"><Setter Property="IsExpanded" Value="False"/><Setter Property="FontWeight" Value="Bold"/><Setter Property="FontStyle" Value="Italic"/><Setter Property="Foreground" Value="Red"/></Trigger></Style.Triggers></Style></TreeView.ItemContainerStyle>
Thanks;




Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>