-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from atticus-lv/develop
Develop
- Loading branch information
Showing
14 changed files
with
292 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:controls="clr-namespace:VirtualStreetSnap.Controls" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="VirtualStreetSnap.Controls.SettingsCard"> | ||
<ContentControl.Styles> | ||
<Style Selector="controls|SettingsCard"> | ||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<Border Background="{TemplateBinding Background}" | ||
CornerRadius="{TemplateBinding CornerRadius}"> | ||
<Border.Effect> | ||
<DropShadowEffect Color="Black" BlurRadius="4" Opacity="1" OffsetX="0" OffsetY="0" /> | ||
</Border.Effect> | ||
<Grid ColumnDefinitions="150,*,Auto"> | ||
<TextBlock Margin="10 5 0 5" | ||
VerticalAlignment="Center" | ||
Text="{TemplateBinding SettingName}" | ||
FontSize="{TemplateBinding FontSize}"> | ||
</TextBlock> | ||
<ContentPresenter Grid.Column="2" Margin="0 5 10 5" | ||
VerticalContentAlignment="Center" VerticalAlignment="Center" | ||
Content="{TemplateBinding Content}" /> | ||
</Grid> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter> | ||
</Style> | ||
</ContentControl.Styles> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace VirtualStreetSnap.Controls; | ||
|
||
public partial class SettingsCard : ContentControl | ||
{ | ||
public static readonly StyledProperty<string> SettingNameProperty = | ||
AvaloniaProperty.Register<SettingsCard, string>(nameof(SettingName)); | ||
|
||
public string SettingName | ||
{ | ||
get { return GetValue(SettingNameProperty); } | ||
set { SetValue(SettingNameProperty, value); } | ||
} | ||
|
||
public SettingsCard() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void InitializeComponent() | ||
{ | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.