-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Had to "hide" the title in the main application, so as to not ruin the aesthetic there - This was done by changing the foreground text colour to match the background colour - Not a "nice" hack, but couldn't see a way to do it any other way
- Loading branch information
Showing
1 changed file
with
61 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,61 @@ | ||
<metro:MetroWindow x:Class="ChocolateyGui.Views.Windows.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:ChocolateyGui.ViewModels.Windows" | ||
xmlns:metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:services="clr-namespace:ChocolateyGui.Services" | ||
xmlns:converters="clr-namespace:ChocolateyGui.Utilities.Converters" | ||
xmlns:commands="clr-namespace:ChocolateyGui.Commands" | ||
mc:Ignorable="d" Height="768" Width="1366" GlowBrush="{StaticResource HighlightBrush}" | ||
d:DataContext="{d:DesignInstance Type=local:MainWindowViewModel}"> | ||
|
||
<Window.Resources> | ||
<converters:NullToVisibility x:Key="NullToVisibility"/> | ||
</Window.Resources> | ||
|
||
<metro:MetroWindow.WindowCommands> | ||
<metro:WindowCommands> | ||
<Button x:Name="SettingsButton" Content="settings" Click="SettingsButton_OnClick" ClickMode="Release"/> | ||
</metro:WindowCommands> | ||
</metro:MetroWindow.WindowCommands> | ||
|
||
<metro:MetroWindow.Flyouts> | ||
<metro:FlyoutsControl> | ||
<metro:Flyout x:Name="SettingsFlyout" Header="Settings" Position="Right" Width="500" Theme="Accent"> | ||
<StackPanel> | ||
<Button x:Name="SourcesButton" HorizontalAlignment="Stretch" Style="{StaticResource SetttingsButtonStyle}" Click="SourcesButton_OnClick"> | ||
Sources | ||
</Button> | ||
</StackPanel> | ||
</metro:Flyout> | ||
<metro:Flyout x:Name="SourcesFlyout" Header="Settings" Position="Right" Width="500" Theme="Accent"> | ||
<StackPanel Margin="10,0"> | ||
<DataGrid x:Name="SourcesDataGrid" AutoGenerateColumns="False" | ||
ItemsSource="{Binding Sources}" IsReadOnly="True" | ||
SelectedItem="{Binding SelectedSource}"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="1*"/> | ||
<DataGridTextColumn Header="Url" Binding="{Binding Url}" Width="1*"/> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
<Button Command="{commands:DataContextCommandAdapter RemoveSource, CanRemoveSource}">Remove Source</Button> | ||
<TextBlock Margin="0,10,0,0">Name:</TextBlock> | ||
<TextBox Text="{Binding NewSourceName, UpdateSourceTrigger=PropertyChanged}"></TextBox> | ||
<TextBlock>Url:</TextBlock> | ||
<TextBox Text="{Binding NewSourceUrl, UpdateSourceTrigger=PropertyChanged}"></TextBox> | ||
<Button Command="{commands:DataContextCommandAdapter AddSource, CanAddSource}">Add Source</Button> | ||
</StackPanel> | ||
</metro:Flyout> | ||
</metro:FlyoutsControl> | ||
</metro:MetroWindow.Flyouts> | ||
|
||
<Border Background="{StaticResource LightBackgroundColorBrush}"> | ||
<Grid> | ||
<ContentControl x:Name="GlobalFrame"></ContentControl> | ||
</Grid> | ||
</Border> | ||
</metro:MetroWindow> | ||
<metro:MetroWindow x:Class="ChocolateyGui.Views.Windows.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:ChocolateyGui.ViewModels.Windows" | ||
xmlns:metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:services="clr-namespace:ChocolateyGui.Services" | ||
xmlns:converters="clr-namespace:ChocolateyGui.Utilities.Converters" | ||
xmlns:commands="clr-namespace:ChocolateyGui.Commands" | ||
mc:Ignorable="d" Height="768" Width="1366" GlowBrush="{StaticResource HighlightBrush}" | ||
d:DataContext="{d:DesignInstance Type=local:MainWindowViewModel}" | ||
TitleForeground="{StaticResource Brown1Brush}" | ||
Title="ChocolateyGUI"> | ||
|
||
<Window.Resources> | ||
<converters:NullToVisibility x:Key="NullToVisibility"/> | ||
</Window.Resources> | ||
|
||
<metro:MetroWindow.WindowCommands> | ||
<metro:WindowCommands> | ||
<Button x:Name="SettingsButton" Content="settings" Click="SettingsButton_OnClick" ClickMode="Release"/> | ||
</metro:WindowCommands> | ||
</metro:MetroWindow.WindowCommands> | ||
|
||
<metro:MetroWindow.Flyouts> | ||
<metro:FlyoutsControl> | ||
<metro:Flyout x:Name="SettingsFlyout" Header="Settings" Position="Right" Width="500" Theme="Accent"> | ||
<StackPanel> | ||
<Button x:Name="SourcesButton" HorizontalAlignment="Stretch" Style="{StaticResource SetttingsButtonStyle}" Click="SourcesButton_OnClick"> | ||
Sources | ||
</Button> | ||
</StackPanel> | ||
</metro:Flyout> | ||
<metro:Flyout x:Name="SourcesFlyout" Header="Settings" Position="Right" Width="500" Theme="Accent"> | ||
<StackPanel Margin="10,0"> | ||
<DataGrid x:Name="SourcesDataGrid" AutoGenerateColumns="False" | ||
ItemsSource="{Binding Sources}" IsReadOnly="True" | ||
SelectedItem="{Binding SelectedSource}"> | ||
<DataGrid.Columns> | ||
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="1*"/> | ||
<DataGridTextColumn Header="Url" Binding="{Binding Url}" Width="1*"/> | ||
</DataGrid.Columns> | ||
</DataGrid> | ||
<Button Command="{commands:DataContextCommandAdapter RemoveSource, CanRemoveSource}">Remove Source</Button> | ||
<TextBlock Margin="0,10,0,0">Name:</TextBlock> | ||
<TextBox Text="{Binding NewSourceName, UpdateSourceTrigger=PropertyChanged}"></TextBox> | ||
<TextBlock>Url:</TextBlock> | ||
<TextBox Text="{Binding NewSourceUrl, UpdateSourceTrigger=PropertyChanged}"></TextBox> | ||
<Button Command="{commands:DataContextCommandAdapter AddSource, CanAddSource}">Add Source</Button> | ||
</StackPanel> | ||
</metro:Flyout> | ||
</metro:FlyoutsControl> | ||
</metro:MetroWindow.Flyouts> | ||
|
||
<Border Background="{StaticResource LightBackgroundColorBrush}"> | ||
<Grid> | ||
<ContentControl x:Name="GlobalFrame"></ContentControl> | ||
</Grid> | ||
</Border> | ||
</metro:MetroWindow> |
60f58cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RichiCoder1 argh! Looks like a recent change that I have made to git settings to accommodate another repository has screwed up my line ending settings for this repository. I think I need to add a gitattributes file to this repository to match what should be done. As a result, the changes that I have made here are not showing up. It was lines 13 and 14 that have changed.