Beispiel #1
0
 private void MenuControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     var propertyChanged = PropertyChanged;
     if (propertyChanged != null) {
         propertyChanged(this, new PropertyChangedEventArgs(nameof(ConcreteDataContext)));
     }
 }
 private void UserControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     if (args.NewValue is IPinViewModel)
     {
         (args.NewValue as IPinViewModel).PropertyChanged += ViewModel_PropertyChanged;
     }
 }
        private void UserControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            Graph.ClearSeries();

            var item = DataContext as ChartSong;
            if (item == null) return;

            var color = Colors.White;

            switch (item.ChangeDirection)
            {
                case ChartSong.Direction.Up:
                    color = Colors.Green;
                    break;
                case ChartSong.Direction.Down:
                    color = Colors.Red;
                    break;
            }

            ChangePercentBlock.Foreground = new SolidColorBrush(color);

            var data = item.Signals.Select((p, i) => new Point(i, p)).ToList();

            var serie = new Serie("Signals") {ShiftSize = 100};
            serie.SetData(data);

            Graph.AutoRedraw = true;
            Graph.AddSerie(serie);
        }
Beispiel #4
0
        private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {

            var m = this.DataContext as MessageRecord;
            if (m != null)
            {
                this.MessageRecord = m;
                VisualStateManager.GoToState(this, m.IsOutgoing ? "Outgoing" : "Incoming", true);


                if (m.IsFailed)
                {
                    VisualStateManager.GoToState(this, "Failed", true);
                }
                else
                {
                    if (!m.IsOutgoing) VisualStateManager.GoToState(this, "None", true);
                    else if (m.IsPending) VisualStateManager.GoToState(this, "Pending", true);
                    else if (m.IsDelivered) VisualStateManager.GoToState(this, "Delivered", true);
                    else VisualStateManager.GoToState(this, "Sent", true);
                }

                if (m.IsKeyExchange)
                {
                    VisualStateManager.GoToState(this, "KeyExchange", true);
                }
            }
        }
Beispiel #5
0
 private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     if (DataContext == null)
         return;
     ViewModel.AnimeItemDisplayContext = DisplayContext;
     Bindings.Update();
 }
 private async void UserControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     if (args.NewValue != null)
         contentSection.Content = await ContentPreviewConverter.MakePreviewControl(args.NewValue as LinkViewModel, SnooStreamViewModel.UIContextCancellationToken, null, true);
     else
         contentSection.Content = null;
 }
 private void UserControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     if (args.NewValue != null && args.NewValue is Preview && !string.IsNullOrWhiteSpace(((Preview)args.NewValue).HQThumbnailUrl))
         imageControl.Opacity = 0;
     else
         imageControl.Opacity = 1;
     
 }
 private void WV_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     if (args.NewValue != null)
     {
         string content = args.NewValue as string;
         this.WV.NavigateToString(content);
     }
 }
Beispiel #9
0
        private void OnDataContextChanged(object sender, DataContextChangedEventArgs e)
        {

            IAmbientColor ambientColor = e.NewValue as IAmbientColor;
            if (ambientColor != null) {
                ambientColor.AmbientColorChanged += (s, ae) => OnAmbientColorChanged(ae);
            }

        }
		private async void albumSlideView_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
		{
			var loader = albumSlideView.ItemsSource as ISupportIncrementalLoading;
			if (albumSlideView.Items.Count == 0 && loader != null)
			{
				if (loader.HasMoreItems)
					await loader.LoadMoreItemsAsync(20);
			}
		}
Beispiel #11
0
        private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {

            var m = this.DataContext as MessageRecord;
            if (m != null)
            {
                this.MessageRecord = m;
                Update();

            }
        }
        private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            OnPropertyChanged(nameof(ViewModel));

            var newVm = (EntryListItemViewModel)args.NewValue;

            if (newVm != null)
            {
                newVm.View = this;
            }
        }
Beispiel #13
0
 private void OnDataContextChanged(FrameworkElement s, DataContextChangedEventArgs e) {
     if (ViewModel != null)
         ViewModel.PropertyChanged -= ViewModelOnPropertyChanged;
     ViewModel = DataContext as PostViewModel;
     if (ViewModel != null) {
         if (ViewModel.ShortenText)
             this.PostText.MaxLines = SettingsService.MaxLinesInBoard;
         ViewModel.PropertyChanged += ViewModelOnPropertyChanged;
         IsRepliesButtonVisible = ViewModel.AreRepliesVisible && ShowRepliesAsRibbon;
         AreRepliesVisible = ViewModel.AreRepliesVisible && !ShowRepliesAsRibbon;
     }
 }
        private void lpProtocolItem_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            var cbi = lpProtocol.ContainerFromItem(args.NewValue) as ComboBoxItem;
            if (cbi != null)
            {
                var val = (LocomotiveProtocolType) args.NewValue;
                var isDisabled = val == LocomotiveProtocolType.M4 || val == LocomotiveProtocolType.MULTI;

                cbi.IsHitTestVisible = !isDisabled;
                cbi.Foreground = (Brush)(isDisabled ? Resources["SystemControlDisabledBaseLowBrush"] : Resources["SystemControlForegroundChromeWhiteBrush"]);
            }
        }
 private void MonsterListView_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     try
     {
         if (this.DataContext != null)
             MonsterGridView.DataContext = new ObservableCollection<Monster>(this.DataContext as List<Monster>);
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex);
     }
 }
 private void MonsterInformationView_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     if (DataContext == null)
     {
         this.Visibility = Visibility.Collapsed;
     }
     else
     {
         this.Visibility = Visibility.Visible;
         hearderView.DataContext = this.DataContext;
     }
 }
        private void GoMissAttendanceInfo_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (this.DataContext == null)
                return;

            Attendance a = this.DataContext as Attendance;
            Percentage = (int)a.Percentage;

            GoPercentage = (int)Math.Ceiling((double)(a.AttendedClasses + a.SingleClassLength) * 100.00 / (a.TotalClasses + a.SingleClassLength));
            MissPercentage = (int)Math.Ceiling((double)a.AttendedClasses * 100.00 / (a.TotalClasses + a.SingleClassLength));

            infoGrid.DataContext = this;
        }
        void AbilityView_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (DataContext == null)
                return;

            var ability = DataContext as Ability;
            if (ability == null)
                return;

            PlaceholderTextConverter.ConvertTextWithPlaceholders(txtEffect, ability.Description);
            PlaceholderTextConverter.ConvertTextWithPlaceholders(txtEffectChange, ability.VersionChangelog);
            PlaceholderTextConverter.ConvertTextWithPlaceholders(txtShortEffect, ability.ShortDescription);
        }
Beispiel #19
0
 private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     var widget = (args.NewValue as Widget);
     if (widget != null && widget.IsChartWidget())
     {
         var setup = _database.GetSetup();
         Url1 = string.Format(urlFormat, setup.Url, widget.Label, widget.Period, _random.Next(int.MinValue, int.MaxValue));
         if (!setup.RemoteUrl.IsNullOrEmpty())
         {
             Url2 = string.Format(urlFormat, setup.RemoteUrl, widget.Label, widget.Period, _random.Next(int.MinValue, int.MaxValue));
         }
         this.theImage.Source = new BitmapImage(new Uri(Url1));
     }
 }
        private void OnDataContextChanged(FrameworkElement s, DataContextChangedEventArgs e) {
            if (ViewModel != null) {
                ViewModel.CaptchaEntryRequested -= ViewModelOnCaptchaEntryRequested;
            }

            ViewModel = DataContext as ExtendedPostingViewModel;
            if (ViewModel == null)
                return;

            this.Title.Text = Localization.GetForView("ExtendedPosting",
                ViewModel.IsNewThread
                    ? "ThreadCreationTitle.Text"
                    : "PostCreationTitle.Text");

            ViewModel.CaptchaEntryRequested += ViewModelOnCaptchaEntryRequested;
        }
 private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     if(DataContext == null)
         return;
     ViewModel.AnimeItemDisplayContext = DisplayContext;
     if (DisplayAirTillTime)
     {
         var time = ViewModel.GetTimeTillNextAir(_jstTimeZone);
         if (!string.IsNullOrEmpty(time))
         {
             TimeTillNextAirGrid.Visibility = Visibility.Visible;
             TimeTillNextAir.Text = time;
             TypeTextBlock.Text = ViewModel.PureType;
         }
     }
     Bindings.Update();
 }
        private void OnDataContextChanged(FrameworkElement s, DataContextChangedEventArgs e) {
            ViewModel = DataContext as VideoPlayerViewModel;

            if (ViewModel == null)
                return;

            ViewModel.PropertyChanged += ViewModelOnPropertyChanged;
            if (ViewModel.Uri != null) {
                this.MediaElement.Source = ViewModel.Uri;
            } else if (ViewModel.Source != null) {
                this.MediaElement.SetMediaStreamSource(ViewModel.Source);
            }

            this.DisabledPanel.Visibility = !ViewModel.CanPlay && !ViewModel.IsInProgress
                ? Visibility.Visible
                : Visibility.Collapsed;
        }
        private void TextBlock_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (!(sender is TextBlock) || !(args.NewValue is Person))
                return;
            var name = (args.NewValue as Person).Name;
            if (string.IsNullOrWhiteSpace(name))
                return;

            var split = name.Split(' ');
            if (split.Length != 2)
                return;

            var boldText = split[1];
            var textBlock = sender as TextBlock;
            var boldRun = new Run { Text = boldText, FontWeight = FontWeights.Bold };
            textBlock.Inlines.Clear();
            textBlock.Inlines.Add(new Run { Text = (split[0] + " ") });
            textBlock.Inlines.Add(boldRun);
        }
        private void ResourceDictionaryPropertyEditor_DataContextChanged(FrameworkElement sender,
            DataContextChangedEventArgs args)
        {
            var rd = ((PropertyViewModel)this.DataContext).Value as ResourceDictionary;

            if (rd == null)
            {
                this.ResourceBrowserButton.IsEnabled = false;
                this.InfoTextBlock.Text = "<null>";
            }
            else
            {
                this.InfoTextBlock.Text = $"Resources: {rd.Count}\r\nMergedDictionaries: {rd.MergedDictionaries.Count}\r\nThemeDictionaries: {rd.ThemeDictionaries.Count}";
                this.ResourceBrowserButton.IsEnabled =
                    rd.Count > 0 ||
                    rd.MergedDictionaries.Count > 0 ||
                    rd.ThemeDictionaries.Count > 0;
            }
        }
 private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     this.ViewModel = args.NewValue as IAlbumViewModel;
     Bindings.Update();
 }
 private async void PreviewPictures_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     try
     {
         var item = args.NewValue as ImageFileInfo;
         PreviewPictures.Source = await item.GetImageSourceAsync();
     }
     catch { }
 }
Beispiel #27
0
 private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     ColorPoint = args.NewValue as ColorPoint;
 }
Beispiel #28
0
 private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ConcreteDataContext)));
 }
Beispiel #29
0
 public Task childElement_DataContextChangedAsync(DataContextChangedEventArgs e)
 {
     dataContextChangedHandler(e);
     return(Task.CompletedTask);
 }
Beispiel #30
0
 public void childElement_DataContextChanged(DataContextChangedEventArgs e)
 {
     dataContextChangedHandler(e);
 }
Beispiel #31
0
        private void WeatherPluginControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (TheEqLogic == null)
            {
                return;
            }

            foreach (var cmd in TheEqLogic.Cmds)
            {
                switch (cmd.LogicalId)
                {
                case "summary":
                    _Summary = cmd.Value;
                    break;

                case "temperature":
                    Double.TryParse(cmd.Value, out _Temperature);
                    break;

                case "temperatureMax_1":
                    Double.TryParse(cmd.Value, out _TemperatureMax1);
                    break;

                case "temperatureMax_2":
                    Double.TryParse(cmd.Value, out _TemperatureMax2);
                    break;

                case "temperatureMax_3":
                    Double.TryParse(cmd.Value, out _TemperatureMax3);
                    break;

                case "temperatureMax_4":
                    Double.TryParse(cmd.Value, out _TemperatureMax4);
                    break;

                case "temperatureMax_5":
                    Double.TryParse(cmd.Value, out _TemperatureMax5);
                    break;

                case "temperatureMin_1":
                    Double.TryParse(cmd.Value, out _TemperatureMin1);
                    break;

                case "temperatureMin_2":
                    Double.TryParse(cmd.Value, out _TemperatureMin2);
                    break;

                case "temperatureMin_3":
                    Double.TryParse(cmd.Value, out _TemperatureMin3);
                    break;

                case "temperatureMin_4":
                    Double.TryParse(cmd.Value, out _TemperatureMin4);
                    break;

                case "temperatureMin_5":
                    Double.TryParse(cmd.Value, out _TemperatureMin5);
                    break;

                case "icon":
                    _Icon = cmd.Value;
                    break;

                case "icon_1":
                    _Icon1 = cmd.Value;
                    break;

                case "icon_2":
                    _Icon2 = cmd.Value;
                    break;

                case "icon_3":
                    _Icon3 = cmd.Value;
                    break;

                case "icon_4":
                    _Icon4 = cmd.Value;
                    break;

                case "icon_5":
                    _Icon5 = cmd.Value;
                    break;

                default:
                    break;
                }
            }
        }
        private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            var viewModel = this.DataContext as PageViewModel;

            viewModel?.SetPageFrame(this.AppFrame);
        }
 private void MasterDetailViewControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     //may not be needed
     //masterViewContentControl.DataContext = this.DataContext;
     //detailViewContentControl.DataContext = this.DataContext;
 }
        private void UserControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            var dc = args.NewValue as GroupDetailViewModel;

            dc.ResourcePanel = resourcePanel;
        }
Beispiel #35
0
        /// <summary>
        /// Catch data update and reasses hiding empty textboxes.
        /// </summary>
        /// <param name="sender">Sending object.</param>
        /// <param name="e">Event arguments.</param>
        private async void BestTimeTextBox_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            // If we were editing, toggle it off.
            if ((string)ButtonDetailDungeonEdit.Content == "Save")
            {
                SetEdit(false);

                // We should probably save content here too...
                DungeonDataService oService = new DungeonDataService();
                //oService.SaveDungeon( LastDungeon );
                await oService.SaveDataAsync(App.DungeonData);
            }

            // Reassess the empty textboxes
            HideEmptyTextBoxes();
        }
        private void PropertyControl_OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (args.NewValue == _currentSample)
            {
                return;
            }

            _currentSample = DataContext as Sample;

            RootPanel.Children.Clear();

            if (_currentSample != null)
            {
                var propertyDesc = _currentSample.PropertyDescriptor;

                if (propertyDesc == null)
                {
                    return;
                }

                foreach (var option in propertyDesc.Options)
                {
                    // Label
                    var label = new TextBlock
                    {
                        Text       = option.Label,
                        FontSize   = 15,
                        FontWeight = FontWeights.Bold
                    };
                    RootPanel.Children.Add(label);

                    // Control
                    Control            controlToAdd;
                    DependencyProperty dependencyProperty;
                    IValueConverter    converter = null;

                    IDictionary <string, object> propertyDict = propertyDesc.Expando;

                    switch (option.Kind)
                    {
                    case PropertyKind.Slider:
                    case PropertyKind.DoubleSlider:
                        var slider       = new Slider();
                        var sliderOption = option as SliderPropertyOptions;
                        if (sliderOption != null)
                        {
                            slider.Minimum       = sliderOption.MinValue;
                            slider.Maximum       = sliderOption.MaxValue;
                            slider.StepFrequency = sliderOption.Step;
                        }

                        if (option.Kind == PropertyKind.DoubleSlider)
                        {
                            slider.StepFrequency = 0.01;
                        }

                        if ((propertyDict[option.Name] as ValueHolder).Value is double value)
                        {
                            slider.Value = value;
                        }

                        controlToAdd       = slider;
                        dependencyProperty = RangeBase.ValueProperty;

                        break;

                    case PropertyKind.Enum:
                        var enumType = option.DefaultValue.GetType();
                        var comboBox = new ComboBox
                        {
                            ItemsSource  = Enum.GetNames(enumType),
                            SelectedItem = (propertyDict[option.Name] as ValueHolder).Value.ToString()
                        };

                        converter          = new EnumConverter(enumType);
                        controlToAdd       = comboBox;
                        dependencyProperty = Selector.SelectedItemProperty;
                        break;

                    case PropertyKind.Bool:
                        var checkBox = new ToggleSwitch();

                        if ((propertyDict[option.Name] as ValueHolder).Value is bool isOn)
                        {
                            checkBox.IsOn = isOn;
                        }

                        controlToAdd       = checkBox;
                        dependencyProperty = ToggleSwitch.IsOnProperty;
                        break;

                    case PropertyKind.Brush:
                        var colorComboBox = new ComboBox();
                        var dataSource    = typeof(Colors).GetTypeInfo().DeclaredProperties.Select(p => p.Name).ToList();
                        colorComboBox.ItemsSource = dataSource;

                        if ((propertyDict[option.Name] as ValueHolder).Value is SolidColorBrush brush &&
                            _colorNames.TryGetValue(brush.Color, out var color))
                        {
                            colorComboBox.SelectedIndex = dataSource.IndexOf(color);
                        }
                        else
                        {
                            colorComboBox.SelectedIndex = dataSource.IndexOf(option.DefaultValue.ToString());
                        }

                        converter = new SolidColorBrushConverter();

                        controlToAdd       = colorComboBox;
                        dependencyProperty = Selector.SelectedItemProperty;
                        break;
Beispiel #37
0
 private void SearchPage_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     this.maingrid.Children.Clear();
 }
 private void ComboBox_OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     ItemsSource = AttributeHelper.GetOptions(PropertyInfo);
     var propValue = PropertyInfo.GetValue(Survey);
     SelectedValue = propValue == null ? null : propValue.ToString();
 }
        private void MeasurementDataTemplate_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            if (this.DataContext != null)
            {
                SensorSeriesCollection = new SeriesCollection()
                {
                    new LineSeries
                    {
                        Values = new ChartValues <float>(
                            from obj in Measurement.Data
                            where obj.LedId == 0
                            orderby obj.LedId, obj.Freq
                            select obj.Value),
                        Fill  = new SolidColorBrush(Windows.UI.Colors.Transparent),
                        Title = "Visible LED",
                    },
                    new LineSeries
                    {
                        Values = new ChartValues <float>(
                            from obj in Measurement.Data
                            where obj.LedId == 1
                            orderby obj.LedId, obj.Freq
                            select obj.Value),
                        Fill  = new SolidColorBrush(Windows.UI.Colors.Transparent),
                        Title = "IR LED",
                    },
                };
                TrainFlag = Measurement.IsTrain ? "Train" : "Test";

                Bindings.Update();
            }
        }
 private void StatiUserView_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     ShowAnnim.Begin();
 }
Beispiel #41
0
 public void childElement_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs e)
 {
     dataContextChangedHandler(sender, e);
 }
 void frameworkElement_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     OnDataContextChange(args.NewValue);
 }
Beispiel #43
0
 public Task childElement_DataContextChangedAsync(FrameworkElement sender, DataContextChangedEventArgs e)
 {
     dataContextChangedHandler(sender, e);
     return(Task.CompletedTask);
 }
 private void OnViewModelUpdate(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     Bindings.Update();
 }
 private void VibrationDeviceTests_DataContextChanged(DependencyObject sender, DataContextChangedEventArgs args)
 {
     Model = args.NewValue as VibrationDeviceTestsViewModel;
 }
        private void MenuItemCloseTabsToTheRight_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            TabItem tabItem = args.NewValue as TabItem;

            MenuItemCloseTabsToTheRight.IsEnabled = MainPageViewModel.AppInstances.IndexOf(tabItem) < MainPageViewModel.AppInstances.Count - 1;
        }
 /// <summary>
 /// Called when the binded element data context has changed.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="DataContextChangedEventArgs"/> instance containing the event data.</param>
 protected virtual void OnElementDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     UpdateBinding();
 }
        private void MenuItemCloseOtherTabs_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
        {
            TabItem tabItem = args.NewValue as TabItem;

            MenuItemCloseOtherTabs.IsEnabled = MainPageViewModel.AppInstances.Count > 1;
        }
 private void EditUnitView_OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
 }
        private void HistoryItemUserControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs e)
        {
            if (e.NewValue == null)
            {
                return;
            }

            var hi = (GoMoveHistoryItem)e.NewValue;

            BlackEllipse.Visibility = hi.Move.Color == GoColor.Black ? Visibility.Visible : Visibility.Collapsed;
            WhiteEllipse.Visibility = hi.Move.Color == GoColor.White ? Visibility.Visible : Visibility.Collapsed;

            switch (hi.Move.MoveType)
            {
            case MoveType.Normal:
                MoveTextBlock.Text = hi.Move.Position;
                break;

            case MoveType.Pass:
                MoveTextBlock.Text = "Pass";
                break;

            case MoveType.Resign:
                MoveTextBlock.Text = "Resign";
                break;
            }
        }
 void ThemePreview_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     //DataContext = AppSettings.Themes[(int)DataContext];
     int k;
 }
 private void MainHubPage_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     vm              = DataContext as MainHubPageViewModel;
     vm.ChartLoaded += Vm_ChartLoaded;
 }
 private void DriverHubPage_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     vm = DataContext as DriverHubPageViewModel;
     vm.RatingsDataLoaded += Vm_RatingsDataLoaded;
 }
Beispiel #54
0
 private void FileListGridItem_DataContextChanged(object sender, DataContextChangedEventArgs e)
 {
     InitializeDrag(sender as UIElement);
 }
 private void OnDataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     OnPropertyChanged(nameof(ViewModel));
 }
Beispiel #56
0
 private void MyGroupHeader_DataContextChanged(DependencyObject sender, DataContextChangedEventArgs args)
 {
     _titleLabel.Text = ((IMyItem)DataContext)?.Title ?? "null";
 }
 private void PhotoNameTb_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     getImageSource();
 }
Beispiel #58
0
 public void UserControl_DataContextChanged(FrameworkElement element, DataContextChangedEventArgs e)
 {
 }
 private void MasterDetailViewControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
 {
     //may not be needed
     //masterViewContentControl.DataContext = this.DataContext;
     //detailViewContentControl.DataContext = this.DataContext;
 }
 private void NetworkInformationTests_DataContextChanged(DependencyObject sender, DataContextChangedEventArgs args)
 {
     Model = (NetworkInformationViewModel)args.NewValue;
 }