Skip to content

Commit

Permalink
Fix all compile-time errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamparter committed Jan 5, 2025
1 parent 6eab84a commit 8a2043b
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 34 deletions.
30 changes: 0 additions & 30 deletions src/Riverside.Toolkit/Controls/Toolkit/DropShadowPanel.xaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Riverside.Toolkit.Controls.Toolkit
{
/// <summary>
/// Any user control can implement this interface to provide a custom alpha mask to it's parent DropShadowPanel
/// Any user control can implement this interface to provide a custom alpha mask to it's parent <see cref="UserControls.DropShadowPanel"/>
/// </summary>
public interface IAlphaMaskProvider
{
Expand Down
32 changes: 31 additions & 1 deletion src/Riverside.Toolkit/Riverside.Toolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,36 @@
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>
<Import Project="..\..\eng\alloy\src\Riverside.Alloy\Riverside.Alloy.props" />

<!-- Themes and XBF compilation issue temporary fixes -->
<ItemGroup Condition=" '$(Alloy)' == 'UWP' ">
<!-- Removes the Generic.xaml during UWP build as the TitleBarEx control is not available on that platform -->
<Page Remove="Themes\Generic.xaml" />
<Resource Remove="Themes\Generic.xaml" />

<!-- Removes the UserControls folder during UWP build as the removal of Generic.xaml causes issues with these -->
<Compile Remove="UserControls\**" />
<EmbeddedResource Remove="UserControls\**" />
<None Remove="UserControls\**" />
<Page Remove="UserControls\**" />
<PRIResource Remove="UserControls\**" />
<Resource Remove="UserControls\GroupBox.xaml" />
<Resource Remove="UserControls\ImageFrame.xaml" />
<Resource Remove="UserControls\Buttons\TileButton.xaml" />
<Resource Remove="UserControls\DropShadowPanel.xaml" />
</ItemGroup>
<ItemGroup Condition=" '$(Alloy)' == 'WinUI' ">
<Folder Include="Themes\" />
<Resource Include="Themes\Generic.xaml" />

<EmbeddedResource Include="UserControls\**" />
<None Include="UserControls\**" />
<PRIResource Include="UserControls\**" />
<Resource Include="UserControls\GroupBox.xaml" />
<Resource Include="UserControls\ImageFrame.xaml" />
<Resource Include="UserControls\Buttons\TileButton.xaml" />
<Resource Include="UserControls\DropShadowPanel.xaml" />
</ItemGroup>

<!-- Dependencies -->
<ItemGroup>
Expand All @@ -30,7 +60,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Alloy)' == 'UWP' ">
<!-- Explicitly specify the UWP property since it can *sometimes* cause errors saying it is not even though it is-->
<!-- Explicitly specify the UWP property since it can *sometimes* cause errors saying it is not even though it is -->
<UseUwp>True</UseUwp>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Windows.UI;
using Riverside.Toolkit.Controls.Toolkit;

namespace Riverside.Toolkit.Controls.Toolkit
namespace Riverside.Toolkit.UserControls
{
/// <summary>
/// The <see cref="DropShadowPanel"/> control allows the creation of a DropShadow for any Xaml FrameworkElement in markup
Expand Down
31 changes: 31 additions & 0 deletions src/Riverside.Toolkit/UserControls/DropShadowPanel.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Riverside.Toolkit.UserControls">

<Style TargetType="controls:DropShadowPanel">
<Setter Property="IsTabStop" Value="False" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:DropShadowPanel">
<Grid
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<Border
x:Name="ShadowElement"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System.Numerics;
using Windows.UI;
using Riverside.Toolkit.Controls.Toolkit;

// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236

namespace Riverside.Toolkit.Controls.Toolkit;
namespace Riverside.Toolkit.UserControls;

/// <summary>
/// The <see cref="DropShadowPanel"/> control allows the creation of a DropShadow for any Xaml FrameworkElement in markup
Expand Down

0 comments on commit 8a2043b

Please sign in to comment.