private void UserControl_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (!File.Exists(((ImageNote)DataContext).FileName)) { ((ImageNote)DataContext).TryRootingPath(); } }
private void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (IsVisible) { DiscordHelper.SetDiscordRPCStatus("Animation Exporter"); } }
private void DataWindow_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (this.IsVisible && IsLoaded) { DiscordRPCHelper.WhatAmIDoing("Update Dialog"); } }
private void OnDataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (this.posMem != null) { this.posMem.Dispose(); } if (this.rotMem != null) { this.rotMem.Dispose(); } this.actor = this.DataContext as Actor; System.Windows.Application.Current.Dispatcher.Invoke(() => { this.IsEnabled = this.actor != null; }); if (this.actor == null) { return; } this.posMem = this.actor.GetMemory(Offsets.Main.Position); this.posMem.Bind(this, nameof(this.Position)); this.rotMem = this.actor.GetMemory(Offsets.Main.Rotation); this.rotMem.Bind(this, nameof(this.Rotation)); }
private void TabList_IsSelectionEnabledChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { var viewModel = DataContext as CollectionViewModel; viewModel.SetIsSelectionEnabled.Execute(sender); }
private async void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (this.Visibility == System.Windows.Visibility.Visible) { await((GanttRealViewModel)this.DataContext).Inicializar(); } }
private void SimpleSpardEditor_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { _spardViewModel = DataContext as SpardTemplateViewModel; if (_spardViewModel == null && DataContext != null) { System.Windows.FrameworkElement parent = this; do { parent = VisualTreeHelper.GetParent(parent) as System.Windows.FrameworkElement; if (parent == null) { return; } _spardViewModel = parent.DataContext as SpardTemplateViewModel; if (_spardViewModel != null) { break; } } while (true); } if (_spardViewModel != null) { _spardViewModel.AliasInserted += SpardViewModel_AliasInserted; _spardViewModel.OptionalInserted += SpardViewModel_OptionalInserted; } }
private void ButtonFinish_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (ButtonFinish.IsVisible) { ButtonFinish.Focus(); } }
private void ButtonBack_IsEnabledChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (!ButtonBack.IsEnabled) { ButtonNext.Focus(); } }
private async void OnIsVisibleChangedAsync(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (DataContext is ComposeControlViewModel vm) { await vm.GetUserInfoAsync().ConfigureAwait(false); } }
private void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (IsVisible) { ((LancementCombatViewModel)DataContext).RechercherInvitations(); } }
private void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (IsVisible) { DiscordHelper.SetDiscordRPCStatus("CyberCAT Save Editor"); } }
private void CancelButton_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if ((bool)e.NewValue) { this.CancelButton.Focus(); } }
/// <summary> /// Fires whenever the Data contex changes /// </summary> /// <param name="sender">the sender</param> /// <param name="e">the arguments <see cref="System.Windows.DependencyPropertyChangedEventArgs"/></param> private void OnDataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (e.NewValue is IUpdateDownloaderInstallerViewModel viewModel) { viewModel.Behavior = this; } }
private void ItemEditor_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (this.DataContext is ItemEditorViewModel vm) { vm.ViewportControl = viewport; } }
private void UserControl_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (DataContext is ViewModels.MainWindowVM) { (DataContext as ViewModels.MainWindowVM).CurrentSession.LittleTimeRemaining += CurrentSession_LittleTimeRemaining; } }
private void AssociatedObject_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { AssociatedObject.Dispatcher.BeginInvoke(new Action(() => { Keyboard.Focus(AssociatedObject); }), System.Windows.Threading.DispatcherPriority.Render); }
void LineStatusControl_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (this.DataContext != null && this.DataContext is ObservableCollection <StationTroubleStatus> ) { UpdateStation(this.DataContext as ObservableCollection <StationTroubleStatus>, StationCount); } }
private void GroupBox_IsVisibleChanged_2(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (((Control)sender).IsVisible) { FreeTag.BackgroundFocus(); } }
private void FieldMappingView_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (Visibility == System.Windows.Visibility.Visible) { m_part.Warning = m_part.Warning; } }
private async void OverlayItemControl_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (this.IsLoaded && this.ViewModel != null) { await this.ViewModel.OnLoaded(); } }
void EnumMenu_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (!(DataContext is EnumSetting)) { return; } EnumSetting ES = DataContext as EnumSetting; string[] values = ES.FriendlyOptions; int count = values.Length; if (count == 0) { return; } string friendlyValue = ES.FriendlyValue; for (int i = 0; i < count; i++) { MenuItem MI = new MenuItem() { Header = values[i], IsChecked = friendlyValue == values[i] }; MI.Click += MenuItem_Click; Items.Add(MI); } ES.ValueChanged += ES_ValueChanged; }
private void buttonPanel_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (buttonPanel.IsVisible) { BringIntoView(); } }
private void GraphTilesControl_DataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (DataContext is GraphTilesVm dc) { dc.ImageSize = new TT.Sz2 <double>(TilesControl.ActualWidth, TilesControl.ActualHeight); } }
private void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (IsVisible) { // DiscordHelper.SetDiscordRPCStatus("BackStage - Recently Used"); } }
private void DataWindow_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (IsVisible) { DiscordHelper.SetDiscordRPCStatus("Journal Editor"); } }
private void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (IsVisible) { DiscordHelper.SetDiscordRPCStatus("Setting - General"); } }
private void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (IsVisible) { ((InventaireViewModel)DataContext).Rechercher(); } }
private void UserControl_IsVisibleChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (this.IsVisible) { DiscordRPCHelper.WhatAmIDoing("Radio Player"); } }
private void lbNPCs_IsEnabledChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (!lbNPCs.IsEnabled) { lbNPCs.SelectedItem = null; } }