1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-29 14:35:45 +00:00

Début dark mode

This commit is contained in:
Yan Maniez 2021-02-13 18:39:59 +01:00
parent 51f7b985d9
commit b26ea0f520
38 changed files with 4296 additions and 469 deletions

View file

@ -257,6 +257,12 @@
<PackageReference Include="UrhoSharp.Forms">
<Version>1.9.67</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit.Markup">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
</PackageReference>

View file

@ -15,13 +15,13 @@ namespace AideDeJeu.Droid
[IntentFilter(new[] { Android.Content.Intent.ActionAssist }, Categories = new[] { Android.Content.Intent.CategoryDefault })]
//[Activity(Label = "Aide de Jeu", Icon = "@drawable/black_book", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
#if CONFIG_JOA
[Activity(Name = "com.nioux.aidedejeu.joa.MainActivity", Label = "Arc & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(Name = "com.nioux.aidedejeu.joa.MainActivity", Label = "Arc & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode)]
#elif CONFIG_CO
[Activity(Name = "com.nioux.aidedejeu.co.MainActivity", Label = "Chro & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(Name = "com.nioux.aidedejeu.co.MainActivity", Label = "Chro & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode)]
#elif CONFIG_HD
[Activity(Name = "com.nioux.aidedejeu.MainActivity", Label = "Haches & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(Name = "com.nioux.aidedejeu.MainActivity", Label = "Haches & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode)]
#else
[Activity(Name = "com.nioux.aidedejeu.MainActivity", Label = "Haches & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(Name = "com.nioux.aidedejeu.MainActivity", Label = "Haches & Dés", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode)]
// [Activity(Name = "com.nioux.aidedejeu.hereva.MainActivity", Label = "Sorcières d Hereva", Icon = "@drawable/main", Theme = "@style/MyTheme.Splash", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
#endif
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity

File diff suppressed because it is too large Load diff

View file

@ -413,6 +413,12 @@
<PackageReference Include="UrhoSharp.Forms">
<Version>1.9.67</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit.Markup">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
</PackageReference>

View file

@ -60,6 +60,8 @@ namespace AideDeJeu.UWP
//Xamarin.Forms.SetFlags("CollectionView_Experimental");
//Xamarin.Forms.SetFlags("Shell_Experimental");
Xamarin.Forms.Forms.SetFlags("Shell_UWP_Experimental");
//Xamarin.Forms.Forms.SetFlags("AppTheme_Experimental");
//Xamarin.Essentials.ExperimentalFeatures.Enable(Xamarin.Essentials.ExperimentalFeatures.ShareFileRequest);
var assemblies = new List<System.Reflection.Assembly>();

View file

@ -262,6 +262,12 @@
<PackageReference Include="UrhoSharp.Forms">
<Version>1.9.67</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit.Markup">
<Version>1.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
</PackageReference>

View file

@ -108,6 +108,8 @@
<PackageReference Include="SkiaSharp.Views.Forms" Version="2.80.3-preview.40" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.0-beta" />
<PackageReference Include="UrhoSharp.Forms" Version="1.9.67" />
<PackageReference Include="Xamarin.CommunityToolkit" Version="1.0.2" />
<PackageReference Include="Xamarin.CommunityToolkit.Markup" Version="1.0.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.1931" />
<PackageReference Include="Xamarin.Forms.Visual.Material" Version="5.0.0.1931" />

View file

@ -19,7 +19,34 @@
<Color x:Key="HDWhite">#FFFFFF</Color>
<Color x:Key="HDBlack">#000000</Color>
<Color x:Key="LightHDRed">#9B1C47</Color>
<Color x:Key="LightHDBlue">#5B61FF</Color>
<Color x:Key="LightHDGrey">#563F5A</Color>
<Color x:Key="LightHDMidGrey">#6F5B73</Color>
<Color x:Key="LightHDLightGrey">#7C7B7B</Color>
<Color x:Key="LightHDLightBlack">#3A213C</Color>
<Color x:Key="LightHDBackMidGrey">#B5AAB9</Color>
<Color x:Key="LightHDBackLightGrey">#EDEDED</Color>
<Color x:Key="LightHDWhite">#FFFFFF</Color>
<Color x:Key="LightHDBlack">#000000</Color>
<Color x:Key="DarkHDRed">#9B1C47</Color>
<Color x:Key="DarkHDBlue">#c38dcc</Color>
<Color x:Key="DarkHDGrey">#563F5A</Color>
<Color x:Key="DarkHDMidGrey">#6F5B73</Color>
<Color x:Key="DarkHDLightGrey">#7C7B7B</Color>
<Color x:Key="DarkHDLightBlack">#3A213C</Color>
<Color x:Key="DarkHDBackMidGrey">#B5AAB9</Color>
<Color x:Key="DarkHDBackLightGrey">#EDEDED</Color>
<Color x:Key="DarkHDWhite">#333</Color>
<Color x:Key="DarkHDBlack">#ddd</Color>
<!--
background : #333
texte : #ddd
titres/gras : #eee
liens/boutons : #c38dcc
navbar : #563f5a
-->
<!-- Fonts -->
<OnPlatform x:Key="LinuxLibertineCapitals" x:TypeArguments="x:String">
@ -73,13 +100,13 @@
<!-- Xamarin Forms -->
<Style TargetType="ContentPage" ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
</Style>
<Style TargetType="StackLayout" ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
</Style>
<Style TargetType="ScrollView" ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
</Style>
<Style TargetType="Label" ApplyToDerivedTypes="True">
@ -87,64 +114,65 @@
</Style>
<Style TargetType="NavigationPage" ApplyToDerivedTypes="True">
<Setter Property="BarBackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BarTextColor" Value="{StaticResource HDRed}" />
<Setter Property="BackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
<Setter Property="BarTextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
</Style>
<Style TargetType="TabbedPage" ApplyToDerivedTypes="True">
<Setter Property="BarBackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
<Setter Property="BarTextColor" Value="{StaticResource HDMidGrey}" />
<Setter Property="BackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
</Style>
<!-- MarkdownView -->
<Style TargetType="Label" x:Key="paragraph" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="15" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="FontFamily" Value="serif" />
<Setter Property="FontSize" Value="16" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<!--<Setter Property="FontFamily" Value="serif" />-->
<Setter Property="FontFamily" Value="LinLibertine_R" />
</Style>
<Style TargetType="Label" x:Key="heading1" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="30" />
<Setter Property="TextColor" Value="{StaticResource HDRed}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}" />
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitalsBold}" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
<Style TargetType="Label" x:Key="heading2" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="25" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitals}" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
<Style TargetType="Label" x:Key="heading3" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="20" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitals}" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
<Style TargetType="Label" x:Key="heading4" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="18" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitals}" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
<Style TargetType="Label" x:Key="heading5" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="16" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitals}" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
<Style TargetType="Label" x:Key="heading6" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="15" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<Setter Property="FontFamily" Value="{DynamicResource LinuxLibertineCapitals}" />
<Setter Property="FontAttributes" Value="Bold" />
</Style>
@ -158,7 +186,7 @@
<Style TargetType="Label" x:Key="tableheader" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="1" />
<Setter Property="TextColor" Value="{StaticResource HDWhite}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
<Setter Property="BackgroundColor" Value="{StaticResource HDGrey}" />
<Setter Property="FontFamily" Value="serif" />
<Setter Property="FontAttributes" Value="Bold" />
@ -167,15 +195,15 @@
<Style TargetType="Label" x:Key="tablecell" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="1" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="BackgroundColor" Value="{StaticResource HDWhite}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" />
<Setter Property="FontFamily" Value="serif" />
</Style>
<Style TargetType="Label" x:Key="tablecellalt" ApplyToDerivedTypes="True">
<Setter Property="FontSize" Value="12" />
<Setter Property="Margin" Value="1" />
<Setter Property="TextColor" Value="{StaticResource HDBlack}" />
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}" />
<Setter Property="BackgroundColor" Value="{StaticResource HDLightGrey}" />
<Setter Property="FontFamily" Value="serif" />
</Style>

View file

@ -20,6 +20,16 @@ namespace AideDeJeu
public App (string search = null)
{
InitializeComponent();
/*
App.Current.UserAppTheme = Application.Current.RequestedTheme;
//App.Current.UserAppTheme = OSAppTheme.Dark;*/
App.Current.UserAppTheme = BaseViewModel.OSAppTheme;
Application.Current.RequestedThemeChanged += (s, a) =>
{
App.Current.UserAppTheme = Application.Current.RequestedTheme;
};
DependencyService.Register<MainViewModel>();
DependencyService.Register<PdfService>();

View file

@ -98,4 +98,124 @@ namespace AideDeJeu.Tools
public static readonly Color DefaultQuoteBorderColor = Color.FromHex("#dfe2e5");
}
public class DarkMonsterMarkdownTheme : Xam.Forms.Markdown.MarkdownTheme
{
public DarkMonsterMarkdownTheme()
{
//this.Margin = 0;
var fdParagraph = FormatedTextHelpers.FontData.FromResource("paragraph");
var fdHeading1 = FormatedTextHelpers.FontData.FromResource("heading1");
var fdHeading2 = FormatedTextHelpers.FontData.FromResource("heading2");
var fdHeading3 = FormatedTextHelpers.FontData.FromResource("heading3");
var fdHeading4 = FormatedTextHelpers.FontData.FromResource("heading4");
var fdHeading5 = FormatedTextHelpers.FontData.FromResource("heading5");
var fdHeading6 = FormatedTextHelpers.FontData.FromResource("heading6");
var fdLink = FormatedTextHelpers.FontData.FromResource("link");
var fdTableHeader = FormatedTextHelpers.FontData.FromResource("tableheader");
var fdTableCell = FormatedTextHelpers.FontData.FromResource("tablecell");
var fdTableCellAlt = FormatedTextHelpers.FontData.FromResource("tablecellalt");
this.Paragraph.FontFamily = fdParagraph.FontFamily;
this.Paragraph.FontSize = (float)fdParagraph.FontSize;
this.Paragraph.Attributes = fdParagraph.FontAttributes;
this.Paragraph.ForegroundColor = ParagraphColor; // fdParagraph.TextColor;
this.Paragraph.BackgroundColor = DefaultBackgroundColor;
this.BackgroundColor = DefaultBackgroundColor;
this.Heading1.ForegroundColor = Heading1Color; // fdHeading1.TextColor;
this.Heading1.BorderColor = DefaultSeparatorColor;
this.Heading1.FontFamily = fdHeading1.FontFamily;
this.Heading2.ForegroundColor = Heading2Color; // fdHeading2.TextColor;
this.Heading2.BorderColor = DefaultSeparatorColor;
this.Heading2.FontFamily = fdHeading2.FontFamily;
this.Heading3.ForegroundColor = Heading3Color; // fdHeading3.TextColor;
this.Heading3.BorderColor = DefaultSeparatorColor;
this.Heading3.FontFamily = fdHeading3.FontFamily;
this.Heading4.ForegroundColor = Heading4Color; // fdHeading4.TextColor;
this.Heading4.BorderColor = DefaultSeparatorColor;
this.Heading4.FontFamily = fdHeading4.FontFamily;
this.Heading5.ForegroundColor = Heading5Color; // fdHeading5.TextColor;
this.Heading5.BorderColor = DefaultSeparatorColor;
this.Heading5.FontFamily = fdHeading5.FontFamily;
this.Heading6.ForegroundColor = Heading6Color; // fdHeading6.TextColor;
this.Heading6.BorderColor = DefaultSeparatorColor;
this.Heading6.FontFamily = fdHeading6.FontFamily;
//this.Link.FontFamily = fdLink.FontFamily;
//this.Link.FontSize = (float)fdLink.FontSize;
this.Link.Attributes = fdLink.FontAttributes;
this.Link.ForegroundColor = LinkColor; // fdLink.TextColor;
this.TableHeader.FontFamily = fdTableHeader.FontFamily;
this.TableHeader.FontSize = (float)fdTableHeader.FontSize;
this.TableHeader.Attributes = fdTableHeader.FontAttributes;
this.TableHeader.ForegroundColor = TableHeaderColor; // fdTableHeader.TextColor;
this.TableCell.FontFamily = fdTableCell.FontFamily;
this.TableCell.FontSize = (float)fdTableCell.FontSize;
this.TableCell.Attributes = fdTableCell.FontAttributes;
this.TableCell.ForegroundColor = TableCellColor; // fdTableCell.TextColor;
this.TableCellAlt.FontFamily = fdTableCellAlt.FontFamily;
this.TableCellAlt.FontSize = (float)fdTableCellAlt.FontSize;
this.TableCellAlt.Attributes = fdTableCellAlt.FontAttributes;
this.TableCellAlt.ForegroundColor = TableCellAltColor; // fdTableCellAlt.TextColor;
//this.Link.ForegroundColor = DefaultAccentColor;
this.Code.ForegroundColor = DefaultTextColor;
this.Code.BackgroundColor = DefaultCodeBackground;
this.Quote.ForegroundColor = DefaultQuoteTextColor;
this.Quote.BorderColor = DefaultQuoteBorderColor;
this.Separator.BorderColor = DefaultSeparatorColor;
}
public static readonly Color DarkHDRed = Color.FromHex("#9B1C47");
public static readonly Color DarkHDBlue = Color.FromHex("#c38dcc");
public static readonly Color DarkHDGrey = Color.FromHex("#563F5A");
public static readonly Color DarkHDMidGrey = Color.FromHex("#6F5B73");
public static readonly Color DarkHDLightGrey = Color.FromHex("#7C7B7B");
public static readonly Color DarkHDLightBlack = Color.FromHex("#3A213C");
public static readonly Color DarkHDBackMidGrey = Color.FromHex("#B5AAB9");
public static readonly Color DarkHDBackLightGrey = Color.FromHex("#EDEDED");
public static readonly Color DarkHDWhite = Color.FromHex("#333");
public static readonly Color DarkHDBlack = Color.FromHex("#ddd");
public static readonly Color ParagraphColor = DarkHDBlack;
public static readonly Color Heading1Color = DarkHDRed;
public static readonly Color Heading2Color = DarkHDBlack;
public static readonly Color Heading3Color = DarkHDBlack;
public static readonly Color Heading4Color = DarkHDBlack;
public static readonly Color Heading5Color = DarkHDBlack;
public static readonly Color Heading6Color = DarkHDBlack;
public static readonly Color LinkColor = DarkHDBlue;
public static readonly Color TableHeaderColor = DarkHDWhite;
public static readonly Color TableHeaderBackgroundColor = DarkHDGrey;
public static readonly Color TableCellColor = DarkHDBlack;
public static readonly Color TableCellBackgroundColor = DarkHDWhite;
public static readonly Color TableCellAltColor = DarkHDBlack;
public static readonly Color TableCellAltBackgroundColor = DarkHDLightGrey;
public static readonly Color DefaultBackgroundColor = DarkHDWhite; // = Color.FromHex("#333");
public static readonly Color DefaultAccentColor = Color.FromHex("#0366d6");
public static readonly Color DefaultTextColor = DarkHDBlack; // Color.FromHex("#24292e");
public static readonly Color DefaultCodeBackground = Color.FromHex("#f6f8fa");
public static readonly Color DefaultSeparatorColor = DarkHDWhite; // Color.FromHex("#eaecef");
public static readonly Color DefaultQuoteTextColor = Color.FromHex("#6a737d");
public static readonly Color DefaultQuoteBorderColor = Color.FromHex("#dfe2e5");
}
}

View file

@ -15,6 +15,27 @@ namespace AideDeJeu.ViewModels
Title = "À propos de ...";
}
//private OSAppTheme _Theme = OSAppTheme; // Application.Current.Properties.ContainsKey("OSAppTheme") ? (OSAppTheme)(int)Application.Current.Properties["OSAppTheme"] : OSAppTheme.Unspecified;
public int ThemeIndex
{
get
{
return (int)OSAppTheme;
}
set
{
OSAppTheme = (OSAppTheme)value;
OnPropertyChanged();
}
}
/* public ICommand ThemeChangedCommand { get; } = new Command<int>((index) => ExecuteThemeChangedCommand(index));
public static void ExecuteThemeChangedCommand(int index)
{
Application.Current.Properties["OSAppTheme"] = index;
App.Current.UserAppTheme = (OSAppTheme)index;
}*/
public string OGL
{
get

View file

@ -26,6 +26,19 @@ namespace AideDeJeu.ViewModels
}
}
public static OSAppTheme OSAppTheme
{
get
{
return Application.Current.Properties.ContainsKey("OSAppTheme") ? (OSAppTheme)(int)Application.Current.Properties["OSAppTheme"] : OSAppTheme.Unspecified;
}
set
{
Application.Current.Properties["OSAppTheme"] = (int)value;
App.Current.UserAppTheme = BaseViewModel.OSAppTheme;
}
}
public MainViewModel Main
{
get

View file

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="AideDeJeu.Views.AboutPage"
xmlns:vm="clr-namespace:AideDeJeu.ViewModels"
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
Title="{Binding Title, Mode=OneTime}"
x:DataType="vm:AboutViewModel">
<ContentPage.BindingContext>
@ -30,7 +31,22 @@
<Label Text="{Binding Version, StringFormat=' Version {0}', Mode=OneTime}" HorizontalOptions="Center"/>
</StackLayout>
</StackLayout>
<ScrollView Grid.Row="1" Grid.ColumnSpan="2">
<StackLayout Grid.Row="1" Grid.ColumnSpan="2">
<Picker SelectedIndex="{Binding ThemeIndex, Mode=TwoWay}">
<!--<Picker.Behaviors>
<xct:EventToCommandBehavior
EventName="SelectedIndexChanged"
Command="{Binding ThemeChangedCommand}"
CommandParameter="{Binding ThemeIndex}"/>
</Picker.Behaviors>-->
<Picker.Items>
<x:String>Défaut</x:String>
<x:String>Clair</x:String>
<x:String>Sombre</x:String>
</Picker.Items>
</Picker>
</StackLayout>
<ScrollView Grid.Row="2" Grid.ColumnSpan="2">
<StackLayout Orientation="Vertical" Padding="16,20,16,20" Spacing="10">
<Label Text="Cette application est une aide de jeu pour le plus grand jeu de rôle au monde et ses dérivés" />

View file

@ -1,5 +1,17 @@
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Xamarin.CommunityToolkit.Markup;
[assembly: ExportFont("AlverataIrregularPEMedium.ttf")]
[assembly: ExportFont("Cinzel-Bold.otf")]
[assembly: ExportFont("Cinzel-Regular.otf")]
[assembly: ExportFont("LinLibertine_R.ttf")]
[assembly: ExportFont("LinLibertine_RB.ttf")]
[assembly: ExportFont("LinLibertine_RBI.ttf")]
[assembly: ExportFont("LinLibertine_RI.ttf")]
[assembly: ExportFont("MarcellusSC-Regular.ttf")]
[assembly: ExportFont("MinionPro_It.ttf")]
namespace AideDeJeu.Views
{
@ -9,6 +21,96 @@ namespace AideDeJeu.Views
public AboutPage ()
{
InitializeComponent ();
//BindingContext = new ViewModels.AboutViewModel();
//string LinuxLibertineCapitalsBold = "Cinzel-Bold";
///* switch (Device.RuntimePlatform)
// {
// case Device.iOS:
// LinuxLibertineCapitalsBold = "Linux Libertine Capitals";
// break;
// case Device.Android:
// LinuxLibertineCapitalsBold = "Cinzel-Bold.otf#Cinzel Bold";
// break;
// default:
// LinuxLibertineCapitalsBold = "Assets/Fonts/Cinzel-Bold.otf#Cinzel";
// break;
// }*/
//var DarkHDRed = Color.FromHex("#9B1C47");
//var LightHDRed = Color.FromHex("#9B1C47");
//var heading1Style = new Style<Label>(
//(Label.FontSizeProperty, 30),
//(Label.TextColorProperty, App.Current.UserAppTheme == OSAppTheme.Dark ? DarkHDRed : LightHDRed),
////(Label.TextColorProperty, "{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"),
//(Label.FontFamilyProperty, LinuxLibertineCapitalsBold),
//(Label.FontAttributesProperty, FontAttributes.Bold)
//);
//Content = new Grid
//{
// ColumnSpacing = 0,
// RowDefinitions =
// {
// new RowDefinition { Height = GridLength.Auto },
// new RowDefinition { Height = GridLength.Star }
// },
// ColumnDefinitions =
// {
// new ColumnDefinition { Width = GridLength.Auto },
// new ColumnDefinition { Width = GridLength.Star }
// },
// Children =
// {
// new StackLayout
// {
// VerticalOptions = LayoutOptions.FillAndExpand,
// HorizontalOptions = LayoutOptions.Fill,
// Children =
// {
// new StackLayout
// {
// Orientation = StackOrientation.Horizontal,
// HorizontalOptions = LayoutOptions.Center,
// VerticalOptions = LayoutOptions.Center,
// Children =
// {
// new ContentView
// {
// Padding = new Thickness(20, 20, 20, 20),
// VerticalOptions = LayoutOptions.FillAndExpand,
// Content = new Image { VerticalOptions = LayoutOptions.Center, HeightRequest = 64, Source = "main.png" }
// }
// }
// }
// }
// },
// new StackLayout
// {
// VerticalOptions = LayoutOptions.FillAndExpand,
// HorizontalOptions = LayoutOptions.Fill,
// Children =
// {
// new StackLayout
// {
// Padding= new Thickness(20, 20, 20, 20),
// Orientation = StackOrientation.Vertical,
// HorizontalOptions = LayoutOptions.Center,
// VerticalOptions = LayoutOptions.Center,
// Children =
// {
// new Label { Text="{Binding AppName}", Style = heading1Style, FontSize = 32, FontAttributes = FontAttributes.Bold, HorizontalOptions = LayoutOptions.Center }
// .Bind(Label.TextProperty, nameof(ViewModels.AboutViewModel.AppName)),
// new Label { Text="{Binding Version, StringFormat=' Version {0}', Mode=OneTime}", HorizontalOptions = LayoutOptions.Center }
// .Bind(Label.TextProperty, nameof(ViewModels.AboutViewModel.Version), convert: (string version) => string.Format(" Version {0}", version))
// }
// }
// }
// }.Column(1).Row(0)
// }
//};
}
}
}

View file

@ -24,7 +24,7 @@
<ToolbarItem Name="Configure" Text="Configurer" Order="Primary" Icon="settings_knobs.png" Command="{Binding BindingContext.ConfigureCommand, Source={x:Reference This}}" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<Grid BackgroundColor="{StaticResource HDWhite}">
<Grid BackgroundColor="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
@ -90,7 +90,7 @@
Grid.Column="0" Grid.Row="0"
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
Color="{StaticResource HDRed}"
Color="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
<ActivityIndicator.WidthRequest>

View file

@ -48,7 +48,7 @@
Grid.Column="0" Grid.Row="0"
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
Color="{StaticResource HDRed}"
Color="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
<ActivityIndicator.WidthRequest>

View file

@ -10,6 +10,7 @@
<MasterDetailPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
<tools:HeaderLevelToStyleConverter x:Key="HeaderLevelToStyleConverter" />
</ResourceDictionary>
@ -69,7 +70,7 @@
<ActivityIndicator
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
Color="{StaticResource HDRed}"
Color="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
<ActivityIndicator.WidthRequest>

View file

@ -10,6 +10,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>
@ -19,9 +20,9 @@
<ToolbarItem Name="Speak" Text="Écouter / Arrêter" Order="Secondary" Command="{Binding Main.Speech.SpeakItemCommand}" CommandParameter="{Binding Item}" />
</ContentPage.ToolbarItems>
<Grid>
<ScrollView Orientation="Vertical" BackgroundColor="{StaticResource HDWhite}">
<ScrollView Orientation="Vertical" BackgroundColor="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}">
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding Item.Markdown}"
NavigateToLinkCommand="{Binding BindingContext.Main.Navigator.NavigateToLinkCommand, Source={x:Reference This}}"
/>
@ -29,7 +30,7 @@
<ActivityIndicator
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
Color="{StaticResource HDRed}"
Color="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
<ActivityIndicator.WidthRequest>

View file

@ -16,6 +16,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
<tools:HeaderLevelToStyleConverter x:Key="HeaderLevelToStyleConverter" />
</ResourceDictionary>
@ -40,7 +41,7 @@
<ListView Grid.Column="0" Grid.Row="1" x:Name="ItemsListView" ItemsSource="{Binding Children}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
<ListView.Header>
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding Item.Markdown}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}"
/>
@ -60,7 +61,7 @@
Grid.RowSpan="2"
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
Color="{StaticResource HDRed}"
Color="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
IsRunning="{Binding Main.IsLoading}"
IsVisible="{Binding Main.IsLoading}">
<ActivityIndicator.WidthRequest>

View file

@ -11,6 +11,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
<tools:NullOrEmptyToFalseConverter x:Key="NullOrEmptyToFalseConverter" />
<tools:HeaderLevelToStyleConverter x:Key="HeaderLevelToStyleConverter" />
@ -24,15 +25,15 @@
<Grid>
<ScrollView Orientation="Vertical">
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding BindingContext.Items.Markdown, Source={x:Reference This}}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand, Source={x:Reference This}}"
/>
</ScrollView>
<!--<ListView BackgroundColor="{StaticResource HDWhite}" x:Name="ItemsListView" ItemsSource="{Binding Children}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
<!--<ListView BackgroundColor="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}" x:Name="ItemsListView" ItemsSource="{Binding Children}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
<ListView.Header>
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding BindingContext.Items.Markdown, Source={x:Reference This}}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand, Source={x:Reference This}}"
/>
@ -51,7 +52,7 @@
<ActivityIndicator
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
Color="{StaticResource HDRed}"
Color="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
IsRunning="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}"
IsVisible="{Binding BindingContext.Main.IsLoading, Source={x:Reference This}}">
<ActivityIndicator.WidthRequest>

View file

@ -75,7 +75,7 @@
<!--<ActivityIndicator
VerticalOptions="StartAndExpand"
HorizontalOptions="End"
Color="{StaticResource HDRed}"
Color="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
IsVisible="{Binding Main.Navigator.TestNotify.IsNotCompleted, FallbackValue=False}" IsRunning="{Binding Main.Navigator.TestNotify.IsNotCompleted, FallbackValue=False}" >
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double">

View file

@ -9,10 +9,10 @@
xmlns:libvm="clr-namespace:AideDeJeu.ViewModels.Library"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
x:Class="AideDeJeu.Views.MainShell"
BackgroundColor="{DynamicResource HDWhite}"
FlyoutBackgroundColor="{DynamicResource HDWhite}"
Shell.ForegroundColor="{DynamicResource HDRed}"
Shell.TitleColor="{DynamicResource HDBlack}"
BackgroundColor="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}"
FlyoutBackgroundColor="{AppThemeBinding Dark={StaticResource DarkHDWhite}, Light={StaticResource LightHDWhite}}"
Shell.ForegroundColor="{AppThemeBinding Dark={StaticResource DarkHDRed}, Light={StaticResource LightHDRed}}"
Shell.TitleColor="{AppThemeBinding Dark={StaticResource DarkHDBlack}, Light={StaticResource LightHDBlack}}"
Shell.UnselectedColor="{DynamicResource HDLightGrey}"
FlyoutHeaderBehavior="Scroll"
FlyoutIsPresented="{Binding Main.FilterIsPresented, Mode=TwoWay}"
@ -23,6 +23,7 @@
<Shell.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
<tools:HeaderLevelToStyleConverter x:Key="HeaderLevelToStyleConverter" />
</ResourceDictionary>

View file

@ -7,6 +7,7 @@
<ContentView.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
<tools:IntComparerToBooleanConverter
x:Key="GreaterToTrueConverter"

View file

@ -10,6 +10,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>
@ -17,14 +18,14 @@
<ListView ItemsSource="{Binding Items}" HasUnevenRows="True" SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
<ListView.Header>
<StackLayout>
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding Title, StringFormat='# {0}'}" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding Description}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="{Binding Title, StringFormat='# {0}'}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="{Binding Description}" />
</StackLayout>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding Name}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="{Binding Name}" />
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>

View file

@ -8,6 +8,7 @@
<ContentView.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
@ -31,13 +32,13 @@
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<mdview:MarkdownView Grid.Column="0" Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding Title, Source={x:Reference this}, StringFormat='# {0}'}" IsEnabled="False" />
<mdview:MarkdownView Grid.Column="0" Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding Title, Source={x:Reference this}, StringFormat='# {0}'}" IsEnabled="False" />
<Image IsVisible="{Binding Source={x:Reference this}, Path=IsEnabled}" Grid.Column="1" WidthRequest="32" HeightRequest="32" Source="click.png" />
<mdview:MarkdownView Grid.Row="1" Grid.ColumnSpan="3" Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedItem.Name, Source={x:Reference this}, StringFormat='## {0}'}" />
<mdview:MarkdownView Grid.Row="2" Grid.ColumnSpan="3" Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedItem.Description, Source={x:Reference this}}" />
<mdview:MarkdownView Grid.Row="1" Grid.ColumnSpan="3" Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding SelectedItem.Name, Source={x:Reference this}, StringFormat='## {0}'}" />
<mdview:MarkdownView Grid.Row="2" Grid.ColumnSpan="3" Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding SelectedItem.Description, Source={x:Reference this}}" />
</Grid>
</Frame>
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedItem, Source={x:Reference this}}" />-->
<!--<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding SelectedItem, Source={x:Reference this}}" />-->
<!--<StackLayout BindableLayout.ItemsSource="{Binding ItemsSource, Source={x:Reference this}}">
<BindableLayout.ItemTemplate>
<DataTemplate>

View file

@ -11,12 +11,13 @@
<StackLayout.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</StackLayout.Resources>
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding Name, Source={x:Reference this}}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding Name, Source={x:Reference this}}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding Description, Source={x:Reference this}}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
</StackLayout>

View file

@ -11,6 +11,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>
@ -18,9 +19,9 @@
<ListView ItemsSource="{Binding Items}" HasUnevenRows="True" SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
<ListView.Header>
<StackLayout>
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding Title, StringFormat='# {0}'}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="{Binding Title, StringFormat='# {0}'}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
HorizontalOptions="FillAndExpand"
Markdown="{Binding Description}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
@ -30,7 +31,7 @@
<DataTemplate>
<ViewCell>
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
HorizontalOptions="FillAndExpand"
Markdown="{Binding}"
NavigateToLinkCommand="{Binding BindingContext.Main.Navigator.NavigateToLinkCommand, Source={x:Reference This}}" />

View file

@ -8,6 +8,7 @@
<StackLayout.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</StackLayout.Resources>
@ -30,12 +31,12 @@
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<mdview:MarkdownView Grid.Column="0" Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding Title, Source={x:Reference this}, StringFormat='# {0}'}" IsEnabled="False" />
<mdview:MarkdownView Grid.Column="0" Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding Title, Source={x:Reference this}, StringFormat='# {0}'}" IsEnabled="False" />
<Image IsVisible="{Binding Source={x:Reference this}, Path=IsEnabled}" Grid.Column="1" WidthRequest="32" HeightRequest="32" Source="click.png" />
<mdview:MarkdownView Grid.Row="1" Grid.ColumnSpan="3" Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedItem, Source={x:Reference this}}" />
<mdview:MarkdownView Grid.Row="1" Grid.ColumnSpan="3" Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding SelectedItem, Source={x:Reference this}}" />
</Grid>
</Frame>
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedItem, Source={x:Reference this}}" />-->
<!--<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding SelectedItem, Source={x:Reference this}}" />-->
<!--<StackLayout BindableLayout.ItemsSource="{Binding ItemsSource, Source={x:Reference this}}">
<BindableLayout.ItemTemplate>
<DataTemplate>

View file

@ -12,6 +12,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>

View file

@ -7,6 +7,7 @@
<ContentView.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
<tools:NullToTrueConverter x:Key="NullToTrueConverter" />
</ResourceDictionary>

View file

@ -12,6 +12,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>
@ -48,9 +49,9 @@
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Compétences" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="# Compétences" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
HorizontalOptions="FillAndExpand"
Markdown="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground.SkillProficiencies}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
@ -58,9 +59,9 @@
</Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Outils maîtrisés" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="# Outils maîtrisés" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
HorizontalOptions="FillAndExpand"
Markdown="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground.MasteredTools}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
@ -68,9 +69,9 @@
</Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Langues maîtrisées" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="# Langues maîtrisées" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
HorizontalOptions="FillAndExpand"
Markdown="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground.MasteredLanguages}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
@ -78,9 +79,9 @@
</Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Équipement" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="# Équipement" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
HorizontalOptions="FillAndExpand"
Markdown="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackground.Equipment}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
@ -88,9 +89,9 @@
</Frame>
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackgroundSkill, Converter={StaticResource NullToFalseConverter}}">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackgroundSkill.Name, StringFormat='# {0}'}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackgroundSkill.Name, StringFormat='# {0}'}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
HorizontalOptions="FillAndExpand"
Markdown="{Binding SelectedPlayerCharacter.Background.BackgroundOrSubBackgroundSkill.Description}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />

View file

@ -12,6 +12,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>
@ -52,7 +53,7 @@
</StackLayout>
</Frame>
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedPlayerCharacter.Class.Markdown}" />-->
<!--<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding SelectedPlayerCharacter.Class.Markdown}" />-->
</StackLayout>
</ScrollView>
</ContentPage.Content>

View file

@ -8,6 +8,7 @@
<ContentView.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
@ -16,8 +17,8 @@
<StackLayout>
<Frame BorderColor="Black" Padding="2" Margin="10">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="# Équipement" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="### TODO" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="# Équipement" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="### TODO" />
</StackLayout>
</Frame>
</StackLayout>

View file

@ -11,6 +11,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>
@ -22,13 +23,13 @@
<StackLayout>
<Frame BorderColor="Black" Padding="2" Margin="10">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Nom" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="# Nom" />
<Entry Margin="10" Placeholder="Nom" Text="{Binding SelectedPlayerCharacter.Name, Mode=TwoWay}" Keyboard="Text" />
</StackLayout>
</Frame>
<Frame BorderColor="Black" Padding="2" Margin="10">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" HorizontalOptions="FillAndExpand" Markdown="# Niveau" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" HorizontalOptions="FillAndExpand" Markdown="# Niveau" />
<Picker Margin="10" Title="Niveau" HorizontalOptions="FillAndExpand">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:Int32}">

View file

@ -49,6 +49,7 @@
</Style>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</CarouselPage.Resources>

View file

@ -12,6 +12,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentPage.Resources>
@ -27,44 +28,44 @@
<Frame BorderColor="Black" Padding="2" Margin="10" IsVisible="{Binding SelectedPlayerCharacter.Race, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" >
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="#### Augmentation de caractéristiques" IsVisible="{Binding SelectedPlayerCharacter.Race.AbilityScoreIncrease, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="#### Augmentation de caractéristiques" IsVisible="{Binding SelectedPlayerCharacter.Race.AbilityScoreIncrease, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding SelectedPlayerCharacter.Race.AbilityScoreIncrease}"
IsVisible="{Binding SelectedPlayerCharacter.Race.AbilityScoreIncrease, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="#### Âge" IsVisible="{Binding SelectedPlayerCharacter.Race.Age, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="#### Âge" IsVisible="{Binding SelectedPlayerCharacter.Race.Age, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding SelectedPlayerCharacter.Race.Age}"
IsVisible="{Binding SelectedPlayerCharacter.Race.Age, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="#### Alignement" IsVisible="{Binding SelectedPlayerCharacter.Race.Alignment, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="#### Alignement" IsVisible="{Binding SelectedPlayerCharacter.Race.Alignment, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding SelectedPlayerCharacter.Race.Alignment}"
IsVisible="{Binding SelectedPlayerCharacter.Race.Alignment, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="#### Taille" IsVisible="{Binding SelectedPlayerCharacter.Race.Size, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="#### Taille" IsVisible="{Binding SelectedPlayerCharacter.Race.Size, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding SelectedPlayerCharacter.Race.Size}"
IsVisible="{Binding SelectedPlayerCharacter.Race.Size, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="#### Vitesse" IsVisible="{Binding SelectedPlayerCharacter.Race.Speed, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="#### Vitesse" IsVisible="{Binding SelectedPlayerCharacter.Race.Speed, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding SelectedPlayerCharacter.Race.Speed}"
IsVisible="{Binding SelectedPlayerCharacter.Race.Speed, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="#### Vision dans le noir" IsVisible="{Binding SelectedPlayerCharacter.Race.Darkvision, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="#### Vision dans le noir" IsVisible="{Binding SelectedPlayerCharacter.Race.Darkvision, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding SelectedPlayerCharacter.Race.Darkvision}"
IsVisible="{Binding SelectedPlayerCharacter.Race.Darkvision, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
@ -74,10 +75,10 @@
<DataTemplate x:DataType="lib:ItemAttribute">
<StackLayout>
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding Key, StringFormat='#### {0}'}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding Value}"
NavigateToLinkCommand="{Binding BindingContext.Main.Navigator.NavigateToLinkCommand, Source={x:Reference This}}" />
</StackLayout>
@ -85,16 +86,16 @@
</BindableLayout.ItemTemplate>
</StackLayout>
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="#### Langues" IsVisible="{Binding SelectedPlayerCharacter.Race.Languages, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="#### Langues" IsVisible="{Binding SelectedPlayerCharacter.Race.Languages, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}" />
<mdview:MarkdownView
Theme="{StaticResource MonsterMarkdownTheme}"
Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}"
Markdown="{Binding SelectedPlayerCharacter.Race.Languages}"
IsVisible="{Binding SelectedPlayerCharacter.Race.Languages, Converter={StaticResource NullToFalseConverter}, FallbackValue=False}"
NavigateToLinkCommand="{Binding Main.Navigator.NavigateToLinkCommand}" />
</StackLayout>
</Frame>
<!--<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="{Binding SelectedRace.Markdown}" />-->
<!--<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="{Binding SelectedRace.Markdown}" />-->
</StackLayout>
</ScrollView>
</ContentPage.Content>

View file

@ -8,6 +8,7 @@
<ContentView.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:DarkMonsterMarkdownTheme x:Key="DarkMonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</ContentView.Resources>
@ -16,8 +17,8 @@
<StackLayout>
<Frame BorderColor="Black" Padding="2" Margin="10">
<StackLayout Padding="0">
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="# Résumé" />
<mdview:MarkdownView Theme="{StaticResource MonsterMarkdownTheme}" Markdown="### TODO" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="# Résumé" />
<mdview:MarkdownView Theme="{AppThemeBinding Light={StaticResource MonsterMarkdownTheme}, Dark={StaticResource DarkMonsterMarkdownTheme}}" Markdown="### TODO" />
</StackLayout>
</Frame>
</StackLayout>

View file

@ -25,6 +25,8 @@
<PackageReference Include="SQLitePCLRaw.lib.e_sqlite3.linux" Version="1.1.14" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
<PackageReference Include="UrhoSharp.Forms" Version="1.9.67" />
<PackageReference Include="Xamarin.CommunityToolkit" Version="1.0.2" />
<PackageReference Include="Xamarin.CommunityToolkit.Markup" Version="1.0.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.1931" />
<PackageReference Include="XamiTextSharpLGPLv2" Version="1.0.0" />