예제 #1
0
 private void SwapTextColorToDark()
 {
     DGTextBlocks = VisualTreeSearch.SearchChildren(WorkingAdaptersDG, typeof(TextBlock));
     TitleTB.BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToBlackST"));
     for (int i = 0; i < (WorkingAdaptersDG).Columns.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToBlackST"));
     }
     for (int i = (WorkingAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToInactiveST"));
     }
     for (int i = (WorkingAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).MouseDown -= CopyMouseDown_e;
     }
 }
 private void SwapTextColorToBase()
 {
     DGTextBlocks = VisualTreeSearch.SearchChildren(DisabledAdaptersDG, typeof(TextBlock));
     TitleTB.BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToActiveST"));
     for (int i = 0; i < (DisabledAdaptersDG).Columns.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToActiveST"));
     }
     for (int i = (DisabledAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
     {
         (DGTextBlocks[i] as TextBlock).Foreground = new SolidColorBrush(((DGTextBlocks[i] as TextBlock).Foreground as SolidColorBrush).Color);
         (DGTextBlocks[i] as TextBlock).BeginStoryboard((Storyboard)TryFindResource("ForegroundColorToActiveST"));
     }
     if (DGTextBlocks != null)
     {
         for (int i = (DisabledAdaptersDG).Columns.Count; i < DGTextBlocks.Count; i++)
         {
             (DGTextBlocks[i] as TextBlock).MouseDown += CopyMouseDown_e;
         }
     }
 }
예제 #3
0
 private void Loaded_e(object sender, RoutedEventArgs e)
 {
     TextBlocks = VisualTreeSearch.SearchChildren(ContentPartGrid, typeof(TextBlock));
 }
예제 #4
0
 private void ThisIsCalledWhenPropertyIsChanged(object sender, EventArgs e)
 {
     DGTextBlocks = VisualTreeSearch.SearchChildren(WorkingAdaptersDG, typeof(TextBlock));
 }