Ejemplo n.º 1
0
 private void RegisterEvents()
 {
     CreateItemButton.RegisterClickEvent(CreateItemButtonClick);
     CreateFolderButton.RegisterClickEvent(CreateFolderButtonClick);
     CopyItemButton.RegisterClickEvent(CopyItemButtonClick);
     RemoveItemButton.RegisterClickEvent(RemoveItemButtonClick);
 }
Ejemplo n.º 2
0
        private void InitBindings()
        {
            BoolToVisibilityConverter boolToVisibilityConverter = new BoolToVisibilityConverter();

            CreateItemButton.SetBinding(Button.VisibilityProperty, new Binding(nameof(CreateItemButtonVisible))
            {
                Source = this, Mode = BindingMode.OneWay, Converter = boolToVisibilityConverter
            });
            CreateFolderButton.SetBinding(Button.VisibilityProperty, new Binding(nameof(CreateFolderButtonVisible))
            {
                Source = this, Mode = BindingMode.OneWay, Converter = boolToVisibilityConverter
            });
            CopyItemButton.SetBinding(Button.VisibilityProperty, new Binding(nameof(CopyItemButtonVisible))
            {
                Source = this, Mode = BindingMode.OneWay, Converter = boolToVisibilityConverter
            });
            RemoveItemButton.SetBinding(Button.VisibilityProperty, new Binding(nameof(RemoveItemButtonVisible))
            {
                Source = this, Mode = BindingMode.OneWay, Converter = boolToVisibilityConverter
            });
        }