Skip to content

Commit

Permalink
Update to 1.0.5
Browse files Browse the repository at this point in the history
- Added SwipeTemplates
- Added a class to the template ResourceDictionary
  • Loading branch information
AndreasReitberger committed Oct 5, 2022
1 parent 94f8a62 commit 80ecb6f
Show file tree
Hide file tree
Showing 17 changed files with 219 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.0.4</Version>
<Version>1.0.5</Version>
<Title>MAUI Shared Styles Library</Title>
<Copyright>Andreas Reitberger</Copyright>
<PackageProjectUrl>https://github.com/AndreasReitberger/SharedMauiXamlStyles</PackageProjectUrl>
Expand Down Expand Up @@ -82,6 +82,18 @@


<ItemGroup>
<Compile Update="Themes\ItemTemplates\ListViewGroupHeaderTemplates.xaml.cs">
<DependentUpon>ListViewGroupHeaderTemplates.xaml</DependentUpon>
</Compile>
<Compile Update="Themes\ItemTemplates\ListViewHeaderTemplates.xaml.cs">
<DependentUpon>ListViewHeaderTemplates.xaml</DependentUpon>
</Compile>
<Compile Update="Themes\ItemTemplates\ListViewSwipeTemplates.xaml.cs">
<DependentUpon>ListViewSwipeTemplates.xaml</DependentUpon>
</Compile>
<Compile Update="Themes\ItemTemplates\ListViewItemTemplates.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<Compile Update="Themes\SharedColors.xaml.cs">
<DependentUpon>SharedColors.xaml</DependentUpon>
</Compile>
Expand All @@ -98,6 +110,9 @@
<MauiXaml Update="Themes\Controls\Border.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\Controls\Core\EnhancedListView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\Controls\DatePicker.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand Down Expand Up @@ -165,6 +180,9 @@
<MauiXaml Update="Themes\Controls\Syncfusion\SfBusyIndicator.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\Controls\Syncfusion\SfCartesianChart.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\Controls\TimePicker.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand Down Expand Up @@ -207,9 +225,18 @@
<MauiXaml Update="Themes\Controls\Syncfusion\SfTabView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewGroupHeaderTemplates.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewHeaderTemplates.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewSwipeTemplates.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewItemTemplates.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\SharedColors.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand All @@ -223,9 +250,6 @@
<MauiXaml Update="Themes\DefaultTheme.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewItemTemplates.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<MauiXaml Update="Themes\Controls\Border.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\Controls\Core\EnhancedListView.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\Controls\DatePicker.xaml">
<SubType>Designer</SubType>
</MauiXaml>
Expand Down Expand Up @@ -75,6 +78,9 @@
<MauiXaml Update="Themes\Controls\Syncfusion\SfBusyIndicator.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\Controls\Syncfusion\SfCartesianChart.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\Controls\TimePicker.xaml">
<SubType>Designer</SubType>
</MauiXaml>
Expand Down Expand Up @@ -114,9 +120,18 @@
<MauiXaml Update="Themes\Controls\Syncfusion\SfTabView.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewGroupHeaderTemplates.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewHeaderTemplates.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewSwipeTemplates.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewItemTemplates.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\SharedColors.xaml">
<SubType>Designer</SubType>
</MauiXaml>
Expand All @@ -129,8 +144,5 @@
<MauiXaml Update="Themes\DefaultTheme.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ListViewItemTemplates.xaml">
<SubType>Designer</SubType>
</MauiXaml>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

xmlns:controls="clr-namespace:AndreasReitberger.Shared.Controls"
xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Themes/SharedColors.xaml" />
<ResourceDictionary Source="/Themes/ItemTemplates/ListViewSwipeTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="controls:EnhancedListView">
<Setter Property="SelectionBackground" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray800}}" />
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False" TargetType="controls:EnhancedListView">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray600}, Dark={StaticResource Gray400}}" />
</Trigger>
</Style.Triggers>
</Style>

<Style x:Key="ListViewDeleteEditSwipeableStyle" TargetType="controls:EnhancedListView">
<Setter Property="AllowSwiping" Value="True" />
<Setter Property="SwipeThreshold" Value="70" />
<Setter Property="StartSwipeTemplate" Value="{StaticResource DeleteSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource EditSwipeTemplate}" />
</Style>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@

<Style x:Key="GroupingHeaderLabelStyle" TargetType="Label">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray600}, Dark={StaticResource Gray400}}" />
<Setter Property="FontSize" Value="18" />
<Setter Property="FontSize" Value="Header" />
<Setter Property="VerticalTextAlignment" Value="Center" />
<Setter Property="HorizontalTextAlignment" Value="Center" />
<Setter Property="FontFamily" Value="{StaticResource MontserratMedium}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</ResourceDictionary.MergedDictionaries>
<Style TargetType="RefreshView">
<Setter Property="RefreshColor" Value="{AppThemeBinding Light={StaticResource DarkGray}, Dark={StaticResource LightGray}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray100}, Dark={StaticResource Gray900}}" />
<Setter Property="Padding" Value="4,4,4,4" />
</Style>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,33 @@
<ResourceDictionary Source="/Themes/SharedColors.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Switch">
<Setter Property="OnColor" Value="{AppThemeBinding Light={DynamicResource PrimaryColor}, Dark={StaticResource White}}" />
<Setter Property="ThumbColor" Value="{DynamicResource PrimaryColor}" />
<Setter Property="VerticalOptions" Value="Center" />
<!--<Setter Property="HeightRequest" Value="28" />-->
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="OnColor" Value="{AppThemeBinding Light={DynamicResource PrimaryColor}, Dark={StaticResource White}}" />
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray100}, Dark={StaticResource Gray900}}" />
<Setter Property="ThumbColor" Value="{DynamicResource PrimaryColor}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray500}, Dark={StaticResource Gray500}}" />
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray500}, Dark={StaticResource Gray500}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="On">
<VisualState.Setters>
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Light}, Dark={StaticResource LightGray}}" />
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={DynamicResource PrimaryColor}, Dark={StaticResource White}}" />
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray100}, Dark={StaticResource Gray900}}" />
<Setter Property="ThumbColor" Value="{DynamicResource PrimaryColor}" />
<!--<Setter Property="ThumbColor" Value="{AppThemeBinding Light={DynamicResource PrimaryColor}, Dark={StaticResource White}}" />-->
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Off">
<VisualState.Setters>
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray800}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

xmlns:chart="clr-namespace:Syncfusion.Maui.Charts;assembly=Syncfusion.Maui.Charts"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Themes/SharedIcons.xaml" />
<ResourceDictionary Source="/Themes/SharedFonts.xaml" />
<ResourceDictionary Source="/Themes/SharedColors.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style x:Key="DefaultChartAxisLabelStyle" TargetType="chart:ChartAxisLabelStyle">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray100}}" />
<Setter Property="FontFamily" Value="{StaticResource MontserratRegular}" />
</Style>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ResourceDictionary Source="/Themes/ItemTemplates/ListViewSwipeTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="listView:SfListView">
<!--<Setter Property="SelectionBackgroundColor" Value="{AppThemeBinding Light={DynamicResource PrimaryColor}, Dark={DynamicResource LightGray}}" />-->
<Setter Property="SelectionBackground" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray800}}" />
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False" TargetType="listView:SfListView">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray600}, Dark={StaticResource Gray400}}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<ResourceDictionary Source="/Themes/SharedIcons.xaml" />
<ResourceDictionary Source="/Themes/SharedFonts.xaml" />

<ResourceDictionary Source="/Themes/Controls/Core/EnhancedListView.xaml" />

<ResourceDictionary Source="/Themes/Controls/ActivityIndicator.xaml" />
<ResourceDictionary Source="/Themes/Controls/Border.xaml" />
<ResourceDictionary Source="/Themes/Controls/BoxView.xaml" />
Expand Down Expand Up @@ -38,14 +40,15 @@
<ResourceDictionary Source="/Themes/Controls/TimePicker.xaml" />

<!-- Item Templates -->
<ResourceDictionary Source="/Themes/ItemTemplates/ListViewGroupHeaderTemplates.xaml" />
<ResourceDictionary Source="/Themes/ItemTemplates/ListViewHeaderTemplates.xaml" />
<ResourceDictionary Source="/Themes/ItemTemplates/ListViewItemTemplates.xaml" />
<ResourceDictionary Source="/Themes/ItemTemplates/ListViewSwipeTemplates.xaml" />

<!--
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfBorder.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfButtons.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfCardView.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfCharts.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfCircularProgressBar.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfCircularGauge.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfGradientView.xaml" />
Expand All @@ -60,6 +63,7 @@
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfAutoComplete.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfBadgeView.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfBusyIndicator.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfCartesianChart.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfComboBox.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfListView.xaml" />
<ResourceDictionary Source="/Themes/Controls/Syncfusion/SfRadialGauge.xaml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="AndreasReitberger.Shared.Themes.ItemTemplates.ListViewGroupHeaderTemplates"

xmlns:eventLogger="clr-namespace:AndreasReitberger.Shared.Core.EventLogger;assembly=SharedMauiCoreLibrary"
xmlns:documentation="clr-namespace:AndreasReitberger.Shared.Core.Documentation;assembly=SharedMauiCoreLibrary"
xmlns:language="clr-namespace:AndreasReitberger.Shared.Core.Localization;assembly=SharedMauiCoreLibrary"

xmlns:converters="clr-namespace:AndreasReitberger.Shared.Core.Converters;assembly=SharedMauiCoreLibrary"

xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView"
>
<converters:UriToStringConverter x:Key="UriToStringConverter" />

<DataTemplate x:Key="GroupHeaderTemplate">
<ViewCell>
<StackLayout
Style="{StaticResource StackLayoutHeaderStyle}"
Orientation="Horizontal"
>
<!-- Icon -->
<Label Margin="10,4">
<Label.Style>
<Style TargetType="Label" BasedOn="{StaticResource IconLabelStyle}">
<Setter Property="Text" Value="{StaticResource DropDownButtonIcon}"/>
<Style.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding IsExpand}" Value="True">
<Setter Property="Text" Value="{StaticResource UpArrow}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Label.Style>
</Label>

<Label
Text="{Binding Key}"
Style="{StaticResource GroupingHeaderLabelStyle}"
FontAttributes="Bold"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Start"
Margin="0,4"
/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace AndreasReitberger.Shared.Themes.ItemTemplates;

public partial class ListViewGroupHeaderTemplates : ResourceDictionary
{
public ListViewGroupHeaderTemplates()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="AndreasReitberger.Shared.Themes.ItemTemplates.ListViewHeaderTemplates"

xmlns:eventLogger="clr-namespace:AndreasReitberger.Shared.Core.EventLogger;assembly=SharedMauiCoreLibrary"
xmlns:documentation="clr-namespace:AndreasReitberger.Shared.Core.Documentation;assembly=SharedMauiCoreLibrary"
xmlns:language="clr-namespace:AndreasReitberger.Shared.Core.Localization;assembly=SharedMauiCoreLibrary"

xmlns:converters="clr-namespace:AndreasReitberger.Shared.Core.Converters;assembly=SharedMauiCoreLibrary"

xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView"
>
<converters:UriToStringConverter x:Key="UriToStringConverter" />

</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace AndreasReitberger.Shared.Themes.ItemTemplates;

public partial class ListViewHeaderTemplates : ResourceDictionary
{
public ListViewHeaderTemplates()
{
InitializeComponent();
}
}
Loading

0 comments on commit 80ecb6f

Please sign in to comment.