Change appearance window title bar

This commit is contained in:
2018-02-21 13:36:05 -05:00
parent 77124f96da
commit 37d7db3f14
5 changed files with 28 additions and 46 deletions

View File

@@ -1,17 +1,17 @@
<Window x:Class="FloatingStatusWindowLibrary.AppearanceWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{x:Static properties:Resources.ChangeAppearanceWindow}" Height="290" Width="450" Binding.SourceUpdated="HandleWindowSourceUpdated"
xmlns:properties="clr-namespace:FloatingStatusWindowLibrary.Properties"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" SizeToContent="Height"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FloatingStatusWindowLibrary"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:Windows="clr-namespace:Common.Wpf.Windows;assembly=Common.Wpf" x:Class="FloatingStatusWindowLibrary.AppearanceWindow"
Title="{x:Static properties:Resources.ChangeAppearanceWindow}" Height="290" Width="450" Binding.SourceUpdated="HandleWindowSourceUpdated"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" SizeToContent="Height"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance local:WindowSettings}"
Closing="HandleWindowClosing" x:ClassModifier="internal" Icon="pack://siteoforigin:,,,/Resources/gear.ico">
d:DataContext="{d:DesignInstance {x:Type local:WindowSettings}}"
Closing="HandleWindowClosing" x:ClassModifier="internal" Windows:ControlBox.HasMaximizeButton="False" Windows:ControlBox.HasMinimizeButton="False" Windows:ControlBox.HasSystemMenu="False" WindowStyle="ToolWindow">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -28,12 +28,12 @@
</Grid.RowDefinitions>
<Label
Content="{x:Static properties:Resources.FontName}"
Name="FontNameLabel"
x:Name="FontNameLabel"
Target="{Binding ElementName=FontNameCombo}"
Margin="6" />
<ComboBox x:Name="FontNameCombo" Grid.Row="0" Grid.Column="1"
SelectedValuePath="Source"
SelectedValue="{Binding Path=FontName,UpdateSourceTrigger=PropertyChanged,NotifyOnSourceUpdated=True}"
SelectedValue="{Binding FontName, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
@@ -54,12 +54,12 @@
</ComboBox>
<Label
Content="{x:Static properties:Resources.FontSize}"
Name="FontSizeLabel" Grid.Row="1" Grid.Column="0"
x:Name="FontSizeLabel" Grid.Row="1" Grid.Column="0"
Target="{Binding ElementName=FontSizeCombo}"
Margin="6" />
<ComboBox Grid.Column="1" Grid.Row="1"
Name="FontSizeCombo"
Text="{Binding Path=FontSize,UpdateSourceTrigger=PropertyChanged,NotifyOnSourceUpdated=True}"
x:Name="FontSizeCombo"
Text="{Binding FontSize, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
IsEditable="True" Margin="6">
<ComboBoxItem Content="8" />
<ComboBoxItem Content="9" />
@@ -80,31 +80,31 @@
</ComboBox>
<Label
Content="{x:Static properties:Resources.ForegroundColor}"
Grid.Row="2" Grid.Column="0" Name="ForegroundColorLabel"
Grid.Row="2" Grid.Column="0" x:Name="ForegroundColorLabel"
Target="{Binding ElementName=ForegroundColorPicker}"
Margin="6" />
<xctk:ColorPicker Grid.Column="1" Grid.Row="2"
Name="ForegroundColorPicker"
x:Name="ForegroundColorPicker"
DisplayColorAndName="True"
SelectedColor="{Binding Path=FontColor,UpdateSourceTrigger=PropertyChanged,NotifyOnSourceUpdated=True}"
SelectedColor="{Binding FontColor, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6" />
<Label
Content="{x:Static properties:Resources.Padding}"
Grid.Row="3" Grid.Column="0" Name="PaddingLabel" Target="{Binding ElementName=PaddingUpDown}" Margin="6" />
Grid.Row="3" Grid.Column="0" x:Name="PaddingLabel" Target="{Binding ElementName=PaddingUpDown}" Margin="6" />
<xctk:IntegerUpDown Grid.Column="1"
Grid.Row="3" Name="PaddingUpDown"
Grid.Row="3" x:Name="PaddingUpDown"
Minimum="0" Maximum="20"
Value="{Binding Path=Padding,UpdateSourceTrigger=PropertyChanged,NotifyOnSourceUpdated=True}"
Value="{Binding Padding, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
TextAlignment="Left" Margin="6" />
<Label
Content="{x:Static properties:Resources.HorizontalAlignment}"
Grid.Row="4" Grid.Column="0" Name="HorizontalAlignmentLabel"
Grid.Row="4" Grid.Column="0" x:Name="HorizontalAlignmentLabel"
Target="{Binding ElementName=HorizontalAlignmentCombo}"
Margin="6" />
<ComboBox Grid.Column="1" Grid.Row="4"
Name="HorizontalAlignmentCombo"
x:Name="HorizontalAlignmentCombo"
SelectedValuePath="Tag"
SelectedValue="{Binding Path=HorizontalAlignment,UpdateSourceTrigger=PropertyChanged,NotifyOnSourceUpdated=True}"
SelectedValue="{Binding HorizontalAlignment, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBoxItem
Content="{x:Static properties:Resources.Left}"
@@ -118,13 +118,13 @@
</ComboBox>
<Label
Content="{x:Static properties:Resources.VerticalAlignment}"
Grid.Row="5" Grid.Column="0" Name="VerticalAlignmentLabel"
Grid.Row="5" Grid.Column="0" x:Name="VerticalAlignmentLabel"
Target="{Binding ElementName=VerticalAlignmentCombo}"
Margin="6" />
<ComboBox Grid.Column="1" Grid.Row="5"
Name="VerticalAlignmentCombo"
x:Name="VerticalAlignmentCombo"
SelectedValuePath="Tag"
SelectedValue="{Binding Path=VerticalAlignment,UpdateSourceTrigger=PropertyChanged,NotifyOnSourceUpdated=True}"
SelectedValue="{Binding VerticalAlignment, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}"
Margin="6">
<ComboBoxItem
Content="{x:Static properties:Resources.Top}"
@@ -137,7 +137,7 @@
Tag="{x:Static VerticalAlignment.Center}" />
</ComboBox>
<Grid Grid.Column="1" Grid.Row="6"
HorizontalAlignment="Right" Name="GridButtons" Width="Auto" Grid.IsSharedSizeScope="True"
HorizontalAlignment="Right" x:Name="GridButtons" Width="Auto" Grid.IsSharedSizeScope="True"
Height="38" VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"
@@ -149,7 +149,7 @@
Content="{x:Static properties:Resources.OK}"
Height="23"
HorizontalAlignment="Stretch" Margin="6"
Name="OkayButton"
x:Name="OkayButton"
VerticalAlignment="Stretch" Width="75"
Padding="7,3" IsDefault="True"
Click="HandleOkayButtonClick" />
@@ -157,7 +157,7 @@
Content="{x:Static properties:Resources.Cancel}"
Grid.Column="1" Height="23"
HorizontalAlignment="Stretch" Margin="6"
Name="CancelButton"
x:Name="CancelButton"
VerticalAlignment="Stretch" Width="75"
Padding="7,3" IsCancel="True" />
</Grid>

View File

@@ -71,6 +71,7 @@
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<AppDesigner Include="Properties\" />
</ItemGroup>
@@ -87,11 +88,6 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Resources\gear.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="Common.Wpf\Common.Native\Common.Native.csproj">
<Project>{ed1c07a1-54f5-4796-8b06-2a0bb1960d84}</Project>

View File

@@ -222,16 +222,6 @@ namespace FloatingStatusWindowLibrary.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
public static System.Drawing.Icon gear {
get {
object obj = ResourceManager.GetObject("gear", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized string similar to _Horizontal alignment:.
/// </summary>

View File

@@ -171,10 +171,6 @@
<data name="ForegroundColor" xml:space="preserve">
<value>_Foreground color:</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="gear" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\gear.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="HorizontalAlignment" xml:space="preserve">
<value>_Horizontal alignment:</value>
</data>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB