Skip to content

Commit

Permalink
Add "Learn more" links under the format settings
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalmers committed Jul 17, 2024
1 parent 1375652 commit 39038cf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DesktopClock/Properties/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private Settings()
public string Format { get; set; } = "{ddd}, {MMM dd}, {h:mm:ss tt}";

/// <summary>
/// Format string for the countdown mode. If left blank, it will be dynamic.
/// .NET format string for the countdown mode. If left blank, it will be dynamic.
/// </summary>
/// <remarks>
/// See: <see href="https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-timespan-format-strings">Custom TimeSpan format strings</see>.
Expand Down
30 changes: 19 additions & 11 deletions DesktopClock/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
WindowStartupLocation="CenterScreen">
<Window.Resources>
<Style TargetType="Button">
<Setter Property="Padding" Value="4,0"/>
<Setter Property="Padding" Value="4,0" />
</Style>

<Style TargetType="TextBox">
<Setter Property="MinHeight" Value="23"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="MinHeight" Value="23" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
</Window.Resources>

<TabControl Padding="12,12,12,0" SelectedIndex="{Binding Settings.SettingsTabIndex, Mode=TwoWay}">
<TabItem Header="Format">
<StackPanel>
Expand All @@ -39,17 +39,25 @@
ItemsSource="{x:Static local:DateFormatExample.DefaultExamples}"
SelectionChanged="SelectFormat" />
</Grid>
<TextBlock Text=".NET format string for the time shown on the clock. Format specific parts inside { and }."
FontStyle="Italic"
<TextBlock FontStyle="Italic"
FontSize="10"
Margin="0,0,0,12" />
Margin="0,0,0,12">
<Run Text=".NET format string for the time shown on the clock. Format specific parts inside { and }." />
<Hyperlink NavigateUri="https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings" RequestNavigate="Hyperlink_RequestNavigate">
Learn more
</Hyperlink>
</TextBlock>

<TextBlock Text="Countdown Format:" />
<TextBox Text="{Binding Settings.CountdownFormat, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBlock Text="Format string for the countdown mode. If left blank, it will be dynamic."
FontStyle="Italic"
<TextBlock FontStyle="Italic"
FontSize="10"
Margin="0,0,0,12" />
Margin="0,0,0,12">
<Run Text=".NET format string for the countdown mode. If left blank, it will be dynamic." />
<Hyperlink NavigateUri="https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-timespan-format-strings" RequestNavigate="Hyperlink_RequestNavigate">
Learn more
</Hyperlink>
</TextBlock>

<TextBlock Text="Countdown To:" />
<Grid>
Expand Down

0 comments on commit 39038cf

Please sign in to comment.