Skip to content

Commit

Permalink
Reorganizing generic.xaml
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKert committed Mar 18, 2019
1 parent c284def commit d93ece9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
7 changes: 2 additions & 5 deletions src/BuildVision.UI/Components/ControlView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:res="clr-namespace:BuildVision.UI"
xmlns:views="clr-namespace:BuildVision.UI"
xmlns:viewModels="clr-namespace:BuildVision.UI.ViewModels"
xmlns:extensions="clr-namespace:BuildVision.UI.Extensions"
xmlns:helpers="clr-namespace:BuildVision.UI.Helpers"
Expand Down Expand Up @@ -35,7 +33,6 @@
<ResourceDictionary Source="../Resources/BuildResult.Resources.xaml" />
</ResourceDictionary.MergedDictionaries>


<viewModels:BuildVisionPaneViewModel x:Key="DesignViewModel"/>
<helpers:BindingProxy x:Key="proxy" Data="{Binding}" />

Expand Down Expand Up @@ -98,8 +95,8 @@
</Style.Triggers>
</Style>
</StackPanel.Style>
<customButtons:BuildSolutionButton Command="{Binding BuildSolutionAction}" IsEnabled="True" />

<customButtons:BuildSolutionButton Command="{Binding BuildSolutionAction}" x:Name="BuildSolutionButton" IsEnabled="True" />

<customButtons:RebuildSolutionButton Command="{Binding RebuildSolutionButton}" />

Expand Down
6 changes: 3 additions & 3 deletions src/BuildVision.UI/Components/ProjectGrid.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ private void GridOnSorting(object sender, DataGridSortingEventArgs e)

private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
//Debug.Assert(DataContext != null);
Debug.Assert(DataContext != null);

_viewModel = (BuildVisionPaneViewModel) DataContext;
//_viewModel.SetGridColumnsRef(Grid.Columns);
//_viewModel.PropertyChanged += ViewModelOnPropertyChanged;
_viewModel.SetGridColumnsRef(Grid.Columns);
_viewModel.PropertyChanged += ViewModelOnPropertyChanged;
}

private void ViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e)
Expand Down
2 changes: 2 additions & 0 deletions src/BuildVision.UI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using BuildVision.UI.Settings;
using BuildVision.UI.ViewModels;
using Microsoft.VisualStudio.PlatformUI;
using Microsoft.VisualStudio.Shell;
using System;
using System.Linq;
using System.Windows;
Expand Down
14 changes: 3 additions & 11 deletions src/BuildVision.UI/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,12 @@
<ResourceDictionary Source="/BuildVision.UI;component/Resources/ValueIndicator.Resources.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style TargetType="{x:Type ui:BuildSolutionButton}">
<Style TargetType="{x:Type ui:BuildSolutionButton}" BasedOn="{StaticResource ToolBarButtonBaseStyle}">
<Setter Property="ToolTip" Value="{x:Static res:Resources.BuildSolutionButtonTooltip}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ui:BuildSolutionButton}">
<Button Name="BuildSolutionButton"
ToolTip="{x:Static res:Resources.BuildSolutionButtonTooltip}">
<StackPanel Orientation="Horizontal">
<ContentControl Template="{StaticResource BuildSolutionIcon}" />
</StackPanel>
<Button.Style>
<Style TargetType="Button"
BasedOn="{StaticResource ToolBarButtonBaseStyle}" />
</Button.Style>
</Button>
<ContentControl Template="{StaticResource BuildSolutionIcon}" />
</ControlTemplate>
</Setter.Value>
</Setter>
Expand Down

0 comments on commit d93ece9

Please sign in to comment.