public TopicViewModel(PubsubSourceRootViewModel owner, Topic topic, IEnumerable <Subscription> subscriptions) : base(owner, new TopicItem(topic), subscriptions) { Icon = s_topicIcon.Value; ContextMenu = new ContextMenu { ItemsSource = new List <MenuItem> { new MenuItem { Header = Resources.CloudExplorerPubSubNewSubscriptionMenuHeader, Command = new ProtectedCommand(OnNewSubscriptionCommand) }, new MenuItem { Header = Resources.CloudExplorerPubSubDeleteTopicMenuHeader, Command = new ProtectedCommand(OnDeleteTopicCommand) }, new MenuItem { Header = Resources.UiPropertiesMenuHeader, Command = new ProtectedCommand(OnPropertiesWindowCommand) } } }; }
protected TopicViewModelBase( PubsubSourceRootViewModel owner, ITopicItem topicItem, IEnumerable <Subscription> subscriptions) { Owner = owner; TopicItem = topicItem; Caption = TopicItem.DisplayName; AddSubscriptonsOfTopic(subscriptions); }
public OrphanedSubscriptionsViewModel(PubsubSourceRootViewModel owner, IEnumerable <Subscription> subscriptions) : base(owner, new OrphanedSubscriptionsItem(), subscriptions) { Icon = s_orphanedSubscriptionIcon.Value; // Include an invisible context menu so child context menus continue to show up. ContextMenu = new ContextMenu { Visibility = Visibility.Hidden }; }