Skip to content

Commit

Permalink
Merge pull request #690 from unoplatform/dev/agzi/MoveUnderUnoCupertino
Browse files Browse the repository at this point in the history
refactor!: Move everything under the Uno.Cupertino namespace
  • Loading branch information
agneszitte authored Dec 2, 2021
2 parents 6a2515e + ac6f16b commit 149fca4
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Windows.UI.Xaml.Data;
#endif

namespace Uno.Cupertino.Converters
namespace Uno.Cupertino
{
public class FromEmptyStringToValueConverter : IValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Windows.UI.Xaml.Data;
#endif

namespace Uno.Cupertino.Converters
namespace Uno.Cupertino
{
public class FromNullToValueConverter : IValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Windows.UI.Xaml.Data;
#endif

namespace Uno.Cupertino.Converters
namespace Uno.Cupertino
{
public class StringFormatConverter : IValueConverter
{
Expand Down
25 changes: 13 additions & 12 deletions src/library/Uno.Cupertino/Styles/Application/Converters.xaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:Uno.Cupertino.Converters">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:uc="using:Uno.Cupertino">

<converters:FromEmptyStringToValueConverter x:Key="CupertinoEmptyToFalse"
NotNullOrEmptyValue="True"
NullOrEmptyValue="False" />
<uc:FromEmptyStringToValueConverter x:Key="CupertinoEmptyToFalse"
NotNullOrEmptyValue="True"
NullOrEmptyValue="False" />

<converters:FromEmptyStringToValueConverter x:Key="CupertinoEmptyToTrue"
NotNullOrEmptyValue="False"
NullOrEmptyValue="True" />
<uc:FromEmptyStringToValueConverter x:Key="CupertinoEmptyToTrue"
NotNullOrEmptyValue="False"
NullOrEmptyValue="True" />

<converters:FromNullToValueConverter x:Key="CupertinoNullToCollapsedConverter"
NotNullValue="Visible"
NullValue="Collapsed" />
<uc:FromNullToValueConverter x:Key="CupertinoNullToCollapsedConverter"
NotNullValue="Visible"
NullValue="Collapsed" />

<converters:StringFormatConverter x:Key="StringFormatConverter" />
<uc:StringFormatConverter x:Key="StringFormatConverter" />

</ResourceDictionary>
14 changes: 6 additions & 8 deletions src/library/Uno.Cupertino/Styles/Controls/ComboBox.xaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:converters="using:Uno.Cupertino.Converters"
xmlns:toolkit="using:Uno.UI.Toolkit"
xmlns:uc="using:Uno.Cupertino"
xmlns:uno="using:Uno.UI.Xaml.Controls"
xmlns:win="using:Uno.UI.Toolkit"
xmlns:xamarin="http://nventive.com/xamarin"
mc:Ignorable="xamarin">

<ResourceDictionary.MergedDictionaries>
<CupertinoColors xmlns="using:Uno.Cupertino"/>
<CupertinoFonts xmlns="using:Uno.Cupertino"/>
<CupertinoColors xmlns="using:Uno.Cupertino" />
<CupertinoFonts xmlns="using:Uno.Cupertino" />
<ResourceDictionary Source="../Application/StateConstants.xaml" />
</ResourceDictionary.MergedDictionaries>

<!-- Converters -->
<converters:FromNullToValueConverter x:Name="NullToVisible"
NotNullValue="Collapsed"
NullValue="Visible" />
<uc:FromNullToValueConverter x:Name="NullToVisible"
NotNullValue="Collapsed"
NullValue="Visible" />

<!-- Brushes -->
<StaticResource x:Key="ComboBoxBackgroundColorBrush"
Expand Down
6 changes: 2 additions & 4 deletions src/library/Uno.Cupertino/Styles/Controls/Slider.xaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:converters="using:Uno.Cupertino.Converters"
xmlns:controls="using:Uno.Cupertino.Controls"
xmlns:toolkit="using:Uno.UI.Toolkit"
xmlns:not_win="http://uno.ui/not_win"
mc:Ignorable="not_win">

<ResourceDictionary.MergedDictionaries>
<CupertinoColors xmlns="using:Uno.Cupertino"/>
<CupertinoFonts xmlns="using:Uno.Cupertino"/>
<CupertinoColors xmlns="using:Uno.Cupertino" />
<CupertinoFonts xmlns="using:Uno.Cupertino" />
</ResourceDictionary.MergedDictionaries>

<SolidColorBrush x:Key="CupertinoSliderTrackBrush"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Application x:Class="Uno.Themes.Samples.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:material="using:Uno.Material"
xmlns:toolkit="using:Uno.UI.Toolkit">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<Application.Resources>
<ResourceDictionary>
Expand All @@ -18,7 +16,7 @@

<CupertinoColors xmlns="using:Uno.Cupertino" />
<CupertinoFonts xmlns="using:Uno.Cupertino"
OverrideSource="ms-appx:///CupertinoFontsOverride.xaml"/>
OverrideSource="ms-appx:///CupertinoFontsOverride.xaml" />
<CupertinoResources xmlns="using:Uno.Cupertino" />

<ResourceDictionary Source="Converters.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="using:Uno.Gallery"
xmlns:not_wasm="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:wasm="http://uno.ui/wasm"
xmlns:xamarin="http://uno.ui/xamarin"
mc:Ignorable="wasm xamarin">
mc:Ignorable="xamarin">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

Expand Down

0 comments on commit 149fca4

Please sign in to comment.