Skip to content

Commit

Permalink
Add "Topmost" context menu option
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalmers committed Jan 4, 2017
1 parent 67f33ac commit 13ee898
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Network Monitor/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
<setting name="Interval" serializeAs="String">
<value>00:00:01</value>
</setting>
<setting name="Topmost" serializeAs="String">
<value>True</value>
</setting>
</Network_Monitor.Properties.Settings>
</userSettings>
</configuration>
6 changes: 5 additions & 1 deletion Network Monitor/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
SizeToContent="WidthAndHeight"
ResizeMode="NoResize"
WindowStyle="None"
Topmost="True"
Topmost="{Binding Topmost, Source={x:Static properties:Settings.Default}, Mode=TwoWay}"
AllowsTransparency="True"
Background="Transparent"
Closing="MainWindow_OnClosing"
Expand All @@ -22,6 +22,10 @@
</Window.DataContext>
<Window.ContextMenu>
<ContextMenu>
<MenuItem Header="_Topmost"
IsCheckable="True"
IsChecked="{Binding Topmost, Source={x:Static properties:Settings.Default}, Mode=TwoWay}" />
<Separator />
<MenuItem Header="E_xit" Click="MenuItemExit_OnClick" />
</ContextMenu>
</Window.ContextMenu>
Expand Down
12 changes: 12 additions & 0 deletions Network Monitor/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Network Monitor/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
<Setting Name="Interval" Type="System.TimeSpan" Scope="User">
<Value Profile="(Default)">00:00:01</Value>
</Setting>
<Setting Name="Topmost" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

0 comments on commit 13ee898

Please sign in to comment.