Exemplo n.º 1
0
        public static void OnModified(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SpeakerSmall sender = (SpeakerSmall)d;

            if (sender.SpeakerModified != null)
            {
                sender.SpeakerModified();
            }
        }
Exemplo n.º 2
0
 private void SpeakerSmall_Drop(object sender, DragEventArgs e)
 {
     if (sender != null && e.AllowedEffects.HasFlag(DragDropEffects.Copy) && e.Data.GetData(typeof(SpeakerContainer)) != null)
     {
         SpeakerSmall ss = (sender as UIElement).VisualFindChild <SpeakerSmall>();
         e.Effects = DragDropEffects.Copy;
         SpeakerContainer cont = (SpeakerContainer)e.Data.GetData(typeof(SpeakerContainer));
         (ss.DataContext as SpeakerPair).Speaker2 = cont;
         e.Handled = true;
     }
 }
Exemplo n.º 3
0
        public static void OnSpeakerChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SpeakerSmall sender = (SpeakerSmall)d;

            BindingOperations.SetBinding(sender, LoadingProperty, new Binding("IsLoading")
            {
                Source = sender.SpeakerContainer
            });
            BindingOperations.SetBinding(sender, ModifiedProperty, new Binding("Changed")
            {
                Source = sender.SpeakerContainer, Mode = BindingMode.OneWay
            });
        }
Exemplo n.º 4
0
 public static void OnLoadingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
 {
     SpeakerSmall sender = (SpeakerSmall)d;
 }