Skip to content

Commit

Permalink
alligned the deneral info values (right panel) using a grid.
Browse files Browse the repository at this point in the history
  • Loading branch information
lastunicorn committed May 14, 2024
1 parent f7d8e7a commit 77ad7b2
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,93 +55,163 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</Style>
</customControls:PanelWithTitle.Resources>

<StackPanel
HorizontalAlignment="Stretch"
Orientation="Vertical">
<Grid
HorizontalAlignment="Stretch">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="15" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<!-- Start Time -->

<TextBlock
Grid.Row="0"
Grid.Column="0"
Text="Start Time" />

<TextBlock
Grid.Row="0"
Grid.Column="2"
Text="{Binding StartTime, Mode=OneWay, StringFormat=d}" />

<!-- End Time -->

<TextBlock
Grid.Row="1"
Grid.Column="0"
Text="End Time"
Margin="0 10 0 0" />

<TextBlock
Grid.Row="1"
Grid.Column="2"
Margin="0 10 0 0"
Text="{Binding EndTime, Mode=OneWay, StringFormat=d}" />

<!-- State -->

<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="0 10 0 0"
Text="State" />

<customControls:SprintStateControl
Grid.Row="2"
Grid.Column="2"
Margin="0 10 0 0"
Value="{Binding SprintState, Mode=OneWay}" />

<!-- Work Days -->

<StackPanel
Grid.Row="3"
Grid.Column="0"
Margin="0 10 0 0"
Orientation="Horizontal">

<TextBlock
Text="Work Days" />

<customControls:InfoPoint
Margin="5 0 0 0">

<customControls:InfoPoint.InfoContent>
<customControls:ParagraphsBlock>

<DockPanel>

<customControls:GenericIcon
DockPanel.Dock="Left"
Style="{StaticResource InfoIconStyle}"
Width="12"
Height="12"
Margin="0 0 10 0" />

<TextBlock
Text="Work Days"
FontSize="15" />

</DockPanel>

<customControls:LabeledContent
Label="Start Time"
Content="{Binding StartTime}" />

<customControls:LabeledContent
Label="End Time"
Content="{Binding EndTime}" />

<customControls:LabeledContent
Label="State"
Margin="0 8 0 0">

<customControls:SprintStateControl Value="{Binding SprintState, Mode=OneWay}" />

</customControls:LabeledContent>

<customControls:LabeledContent
Label="Work Days"
Margin="0 8 0 0">

<customControls:LabeledContent.InfoContent>
<customControls:ParagraphsBlock>
<TextBlock
Text="All sprint days that are not week-ends or official holidays."
FontSize="13" />

<DockPanel>
</customControls:ParagraphsBlock>
</customControls:InfoPoint.InfoContent>

<customControls:GenericIcon
DockPanel.Dock="Left"
Style="{StaticResource InfoIconStyle}"
Width="12"
Height="12"
Margin="0 0 10 0" />
</customControls:InfoPoint>

<TextBlock
Text="Work Days"
FontSize="15" />
</StackPanel>

</DockPanel>
<TextBlock
Grid.Row="3"
Grid.Column="2"
Margin="0 10 0 0"
Text="{Binding WorkDays, StringFormat={}{0} days}" />

<TextBlock
Text="All sprint days that are not week-ends or official holidays."
FontSize="13" />
<!-- Total Work Hours -->

</customControls:ParagraphsBlock>
</customControls:LabeledContent.InfoContent>
<StackPanel
Grid.Row="4"
Grid.Column="0"
Margin="0 10 0 0"
Orientation="Horizontal">

<TextBlock Text="{Binding WorkDays, StringFormat={}{0} days}" />
<TextBlock
Text="Total Work Hours" />

</customControls:LabeledContent>
<customControls:InfoPoint
Margin="5 0 0 0">

<customControls:LabeledContent
Label="Total Work Hours"
Margin="0 8 0 0"
Content="{Binding TotalWorkHours}">
<customControls:InfoPoint.InfoContent>
<customControls:ParagraphsBlock>

<customControls:LabeledContent.InfoContent>
<customControls:ParagraphsBlock>
<DockPanel>

<DockPanel>
<customControls:GenericIcon
DockPanel.Dock="Left"
Style="{StaticResource InfoIconStyle}"
Width="12"
Height="12"
Margin="0 0 10 0" />

<customControls:GenericIcon
DockPanel.Dock="Left"
Style="{StaticResource InfoIconStyle}"
Width="12"
Height="12"
Margin="0 0 10 0" />
<TextBlock
Text="Total Work Hours"
FontSize="15" />

<TextBlock
Text="Total Work Hours"
FontSize="15" />
</DockPanel>

</DockPanel>
<customControls:ParagraphsBlock FontSize="13">
<TextBlock Text="The total number of working hours from all the team members." />
<TextBlock Text="The vacations and official holidays are excluded." />
</customControls:ParagraphsBlock>

<customControls:ParagraphsBlock FontSize="13">
<TextBlock Text="The total number of working hours from all the team members." />
<TextBlock Text="The vacations and official holidays are excluded." />
</customControls:ParagraphsBlock>
</customControls:InfoPoint.InfoContent>

</customControls:InfoPoint>

</customControls:ParagraphsBlock>
</customControls:LabeledContent.InfoContent>
</StackPanel>

</customControls:LabeledContent>
<TextBlock
Grid.Row="4"
Grid.Column="2"
Margin="0 10 0 0"
Text="{Binding TotalWorkHours}" />

</StackPanel>
</Grid>

</customControls:PanelWithTitle>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class GeneralInfoViewModel : ViewModelBase
public DateTime? StartTime
{
get => startTime;
set
private set
{
if (value.Equals(startTime)) return;
startTime = value;
Expand All @@ -50,7 +50,7 @@ public DateTime? StartTime
public DateTime? EndTime
{
get => endTime;
set
private set
{
if (value.Equals(endTime)) return;
endTime = value;
Expand Down

0 comments on commit 77ad7b2

Please sign in to comment.