Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
Use groupboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
j2ghz committed Jul 26, 2018
1 parent 6dc0e59 commit 265aeae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
25 changes: 8 additions & 17 deletions src/ModSink.WPF/View/DownloadView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,13 @@
xmlns:viewModel="clr-namespace:ModSink.WPF.ViewModel"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
Width="150"
Width="500"
Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<TextBlock x:Name="TbName" />
<TextBlock x:Name="TbState" Grid.Row="1" />
<TextBlock x:Name="TbStatus" Grid.Row="2" />
<mah:MetroProgressBar x:Name="ProgressBar" Grid.Row="3" />
</Grid>
<GroupBox Name="GroupBox">
<StackPanel>
<TextBlock x:Name="TbState" />
<TextBlock x:Name="TbStatus" />
<mah:MetroProgressBar x:Name="ProgressBar" />
</StackPanel>
</GroupBox>
</rx:ReactiveUserControl>
2 changes: 1 addition & 1 deletion src/ModSink.WPF/View/DownloadView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public DownloadView()

this.WhenActivated(d =>
{
this.OneWayBind(ViewModel, vm => vm.Name, v => v.TbName.Text).DisposeWith(d);
this.OneWayBind(ViewModel, vm => vm.Name, v => v.GroupBox.Header).DisposeWith(d);
this.OneWayBind(ViewModel, vm => vm.State, v => v.TbState.Text, ts=>ts.Humanize(LetterCasing.Sentence)).DisposeWith(d);
this.OneWayBind(ViewModel, vm => vm.Status, v => v.TbStatus.Text).DisposeWith(d);
this.OneWayBind(ViewModel, vm => vm.Progress, v => v.ProgressBar.Value).DisposeWith(d);
Expand Down

0 comments on commit 265aeae

Please sign in to comment.