Skip to content

Commit

Permalink
Merge pull request #33 from AndreasReitberger/32-split-up-defaulttheme
Browse files Browse the repository at this point in the history
Split up `DefaultTheme`
  • Loading branch information
AndreasReitberger authored Jan 10, 2023
2 parents 56f3a10 + 736bf21 commit 4514275
Show file tree
Hide file tree
Showing 18 changed files with 466 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,30 +138,13 @@ static void OnFilterChanged(BindableObject bindable, object oldValue, object new
}
}


static void OnSearchTextChanged(BindableObject bindable, object oldValue, object newValue)
{
//var listView = bindable as EnhancedListView;
return;

}

/// <summary>
/// Filtering the list view items based on the search text.
/// </summary>
/// <param name="obj">The list view item</param>
/// <returns>Returns the filtered item</returns>
/*
public virtual bool FilterListView(object obj)
{
if (Filter == null)
{
return false;
}
return true;
}
*/

static void OnDefaultSortDescriptorChanged(BindableObject bindable, object oldValue, object newValue)
{
try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,25 @@


<ItemGroup>
<PackageReference Include="SharedMauiCoreLibrary" Version="1.0.9-preview" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.Core" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.DataGrid" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.Gauges" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.Inputs" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.Scheduler" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.Sliders" Version="20.4.41" />
<PackageReference Include="Syncfusion.Maui.TabView" Version="20.4.41" />
<PackageReference Include="SharedMauiCoreLibrary" Version="1.0.10-preview" />
<PackageReference Include="Syncfusion.Maui.Charts" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Core" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.DataGrid" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Gauges" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Inputs" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Scheduler" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.Sliders" Version="20.4.43" />
<PackageReference Include="Syncfusion.Maui.TabView" Version="20.4.43" />
</ItemGroup>

<ItemGroup>
<Compile Update="Themes\SharedTemplates.xaml.cs">
<DependentUpon>SharedTemplates.xaml</DependentUpon>
</Compile>
<Compile Update="Themes\SharedStyles.xaml.cs">
<DependentUpon>SharedStyles.xaml</DependentUpon>
</Compile>
<Compile Update="Themes\ItemTemplates\ShellItemTemplates.xaml.cs">
<DependentUpon>ShellItemTemplates.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -228,6 +234,12 @@
<MauiXaml Update="Themes\Controls\Syncfusion\SfTabView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\SharedTemplates.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\SharedStyles.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ShellItemTemplates.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@
<MauiXaml Update="Themes\Controls\Syncfusion\SfTabView.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\SharedTemplates.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\SharedStyles.xaml">
<SubType>Designer</SubType>
</MauiXaml>
<MauiXaml Update="Themes\ItemTemplates\ShellItemTemplates.xaml">
<SubType>Designer</SubType>
</MauiXaml>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,23 @@
</Style>

<Style x:Key="PanelCardViewBorderStyle" TargetType="Border" BasedOn="{StaticResource CardViewBorderStyle}">
<Setter Property="Margin" Value="4,8"/>
<Setter Property="Margin" Value="8"/>
<Setter Property="StrokeShape">
<Setter.Value>
<RoundRectangle CornerRadius="15" />
</Setter.Value>
</Setter>
</Style>

<Style x:Key="MinimalPanelCardViewBorderStyle" TargetType="Border" BasedOn="{StaticResource PanelCardViewBorderStyle}">
<Setter Property="Margin" Value="4"/>
<Setter Property="StrokeShape">
<Setter.Value>
<RoundRectangle CornerRadius="2" />
</Setter.Value>
</Setter>
</Style>

<Style x:Key="CircleBorderStyle" TargetType="Border" BasedOn="{StaticResource ProfileBorderStyle}">
<Setter Property="WidthRequest" Value="{OnIdiom Phone=64, Default=72}" />
<Setter Property="HeightRequest" Value="{OnIdiom Phone=64, Default=72}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource DarkGray}, Dark={StaticResource LightGray}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />
<Setter Property="BackgroundColor" Value="{StaticResource Transparent}" />
<!---<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />-->
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand All @@ -116,7 +117,7 @@
<Style x:Key="LinkButton" TargetType="Button" BasedOn="{StaticResource DefaultButtonStyle}">
<Setter Property="Margin" Value="4,6" />
<Setter Property="TextColor" Value="{StaticResource Blue}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="BackgroundColor" Value="{StaticResource Transparent}" />
<Setter Property="FontSize" Value="Caption" />
</Style>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,28 @@
</Style.Triggers>
</Style>

<Style x:Key="ListViewDeleteSwipeableStyle" TargetType="controls:EnhancedListView">
<Style x:Key="ListViewDeleteGestureSwipeableStyle" TargetType="controls:EnhancedListView" >
<Setter Property="AllowSwiping" Value="True" />
<Setter Property="SwipeThreshold" Value="70" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource DeleteSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource DeleteGestureSwipeTemplate}" />
</Style>

<Style x:Key="ListViewDeleteEditSwipeableStyle" TargetType="controls:EnhancedListView" BasedOn="{StaticResource ListViewDeleteSwipeableStyle}">
<Setter Property="StartSwipeTemplate" Value="{StaticResource DeleteSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource EditSwipeTemplate}" />
<Style x:Key="ListViewDeleteEditGestureSwipeableStyle" TargetType="controls:EnhancedListView" BasedOn="{StaticResource ListViewDeleteGestureSwipeableStyle}">
<Setter Property="StartSwipeTemplate" Value="{StaticResource DeleteGestureSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource EditDeleteGestureSwipeTemplate}" />
</Style>

<Style x:Key="ListViewDeleteGestureSwipeableStyle" TargetType="controls:EnhancedListView" BasedOn="{StaticResource ListViewDeleteSwipeableStyle}">
<Setter Property="EndSwipeTemplate" Value="{StaticResource DeleteGestureSwipeTemplate}" />
<Style x:Key="ListViewPrintDeleteViewGestureSwipeableStyle" TargetType="controls:EnhancedListView" BasedOn="{StaticResource ListViewDeleteGestureSwipeableStyle}">
<Setter Property="StartSwipeTemplate" Value="{StaticResource PrintGestureSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource ViewDeleteGestureSwipeTemplate}" />
</Style>

<Style x:Key="ListViewDeleteEditGestureSwipeableStyle" TargetType="controls:EnhancedListView" BasedOn="{StaticResource ListViewDeleteEditSwipeableStyle}">
<Style x:Key="ListViewDeleteViewPrintGestureSwipeableStyle" TargetType="controls:EnhancedListView" BasedOn="{StaticResource ListViewDeleteGestureSwipeableStyle}">
<Setter Property="StartSwipeTemplate" Value="{StaticResource DeleteGestureSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource EditDeleteGestureSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource PrintViewGestureSwipeTemplate}" />
</Style>
<Style x:Key="ListViewDeleteEditExecuteGestureSwipeableStyle" TargetType="controls:EnhancedListView" BasedOn="{StaticResource ListViewDeleteGestureSwipeableStyle}">
<Setter Property="StartSwipeTemplate" Value="{StaticResource DeleteGestureSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource ExecuteEditGestureSwipeTemplate}" />
</Style>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<Style x:Key="ModalPageStyle" TargetType="ContentPage" BasedOn="{StaticResource DefaultPageStyle}">
<Setter Property="Shell.PresentationMode" Value="ModalAnimated" />
<Setter Property="ios:Page.ModalPresentationStyle" Value="{OnIdiom Tablet=Automatic, Default=FormSheet}" />
<!--<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray100}, Dark={StaticResource Gray900}}" />-->
</Style>

<Style x:Key="SettingsPageStyle" TargetType="ContentPage" BasedOn="{StaticResource DefaultPageStyle}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,32 @@
<ResourceDictionary Source="/Themes/SharedFonts.xaml" />
<ResourceDictionary Source="/Themes/SharedColors.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Docs: https://help.syncfusion.com/maui/cartesian-charts -->

<Style x:Key="NumericOnlySfCartesianChartStyle" TargetType="chart:SfCartesianChart">

</Style>

<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>

<Style x:Key="DefaultMajorGridChartLineStyle" TargetType="chart:ChartLineStyle">
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray400}}" />
</Style>

<Style x:Key="DefaultAxisChartLineStyle" TargetType="chart:ChartLineStyle">
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray400}}" />
</Style>

<Style x:Key="DefaultMinorGridChartLineStyle" TargetType="chart:ChartLineStyle">
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray400}}" />
</Style>

<Style x:Key="DefaultMajorChartAxisTickStyle" TargetType="chart:ChartAxisTickStyle">
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray100}}" />
<Setter Property="TickSize" Value="10" />
</Style>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
</Style.Triggers>
</Style>

<Style x:Key="ListViewDeleteEditSwipeableStyle" TargetType="listView:SfListView">
<Style x:Key="ListViewDeleteEditGestureSwipeableStyle" TargetType="listView:SfListView">
<Setter Property="AllowSwiping" Value="True" />
<Setter Property="SwipeThreshold" Value="70" />
<Setter Property="StartSwipeTemplate" Value="{StaticResource DeleteSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource EditSwipeTemplate}" />
<Setter Property="StartSwipeTemplate" Value="{StaticResource DeleteGestureSwipeTemplate}" />
<Setter Property="EndSwipeTemplate" Value="{StaticResource EditGestureSwipeTemplate}" />
</Style>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,24 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Themes/SharedColors.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Docs: https://help.syncfusion.com/maui/radial-gauge/overview-->
<Style TargetType="gauge:SfRadialGauge">
<Setter Property="WidthRequest" Value="250" />
<Setter Property="HeightRequest" Value="250" />
</Style>

<Style x:Key="DefaultRadialLineStyle" TargetType="gauge:RadialLineStyle">
<Setter Property="Fill" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray700}}" />
<Setter Property="Thickness" Value="4" />
<Setter Property="ThicknessUnit" Value="Pixel" />
</Style>

<!--
<Style x:Key="DefaultMajorTickStyle" TargetType="gauge:MajorTickStyle">
<Setter Property="Fill" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray700}}" />
<Setter Property="Length" Value="0.087" />
<Setter Property="LengthUnit" Value="Factor" />
<Setter Property="StrokeThickness" Value="1.0" />
</Style>
-->
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@
<Style TargetType="sliders:SfSlider">
<Setter Property="Visual" Value="Default" />
<Setter Property="HeightRequest" Value="70" />
<Setter Property="Margin" Value="8,4" />
<!-- -->
<Setter Property="ThumbStyle">
<Setter.Value>
<sliders:SliderThumbStyle
Radius="8"
/>
</Setter.Value>
</Setter>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Default">
<VisualState.Setters>
<Setter Property="TrackStyle">
Expand Down Expand Up @@ -93,7 +101,6 @@
<Style x:Key="PrimraySliderStyle" TargetType="sliders:SfSlider">
<Setter Property="ShowLabels" Value="False" />
<Setter Property="WidthRequest" Value="290" />
<Setter Property="HeightRequest" Value="36" />
</Style>

<Style x:Key="PercentageSliderStyle" TargetType="sliders:SfSlider">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,26 @@
<ResourceDictionary Source="/Themes/SharedColors.xaml" />
</ResourceDictionary.MergedDictionaries>

<!-- Docs: https://help.syncfusion.com/maui/textinputlayout/states-and-colors -->
<Style x:Key="DefaultTextInputLayoutStyle" TargetType="inputLayout:SfTextInputLayout">
<Setter Property="ContainerType" Value="Outlined"/>
<Setter Property="LeadingViewPosition" Value="Inside"/>
<Setter Property="ContainerBackground" Value="{AppThemeBinding Light={StaticResource Gray100},Dark={StaticResource Gray900}}"/>
<Setter Property="ContainerBackground" Value="{AppThemeBinding Light={StaticResource Gray100},Dark={StaticResource Gray950}}"/>
<Setter Property="HintLabelStyle">
<Setter.Value>
<inputLayout:LabelStyle
FontSize="12"
FontFamily="{StaticResource MontserratRegular}"
TextColor="{AppThemeBinding Light={StaticResource Black},Dark={StaticResource White}}"
/>
</Setter.Value>
</Setter>
<Setter Property="HelperLabelStyle">
<Setter.Value>
<inputLayout:LabelStyle
FontSize="12"
FontFamily="{StaticResource MontserratRegular}"
TextColor="{AppThemeBinding Light={StaticResource Black},Dark={StaticResource White}}"
/>
</Setter.Value>
</Setter>
Expand All @@ -37,7 +48,7 @@
<VisualStateGroup x:Name="CommonStates">
<VisualState Name="Normal">
<VisualState.Setters>
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray900},Dark={StaticResource Gray100}}"/>
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Black},Dark={StaticResource White}}"/>
</VisualState.Setters>
</VisualState>
<VisualState Name="Focused">
Expand Down
Loading

0 comments on commit 4514275

Please sign in to comment.