From 5d10cef466551fff87845309229183f123159cb4 Mon Sep 17 00:00:00 2001 From: adri Date: Fri, 25 Jan 2019 18:23:38 +0100 Subject: [PATCH] Rotate TextBlock /!\ Resize not suported --- ProjetTheAlone/ProjetTheAlone.csproj | 1 + ProjetTheAlone/View/DashBoard.xaml | 5 +++-- ProjetTheAlone/View/DashBoard.xaml.cs | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ProjetTheAlone/ProjetTheAlone.csproj b/ProjetTheAlone/ProjetTheAlone.csproj index f1283ff..c26bab2 100644 --- a/ProjetTheAlone/ProjetTheAlone.csproj +++ b/ProjetTheAlone/ProjetTheAlone.csproj @@ -96,6 +96,7 @@ + FicDetailEvent.xaml diff --git a/ProjetTheAlone/View/DashBoard.xaml b/ProjetTheAlone/View/DashBoard.xaml index 9b56e5a..dc94053 100644 --- a/ProjetTheAlone/View/DashBoard.xaml +++ b/ProjetTheAlone/View/DashBoard.xaml @@ -16,7 +16,8 @@ TextOptions.TextRenderingMode="Auto" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}" - Name="wnd" Closing="wnd_Closing" WindowStyle="None" MouseDown="wnd_MouseDown"> + Name="wnd" Closing="wnd_Closing" WindowStyle="None" MouseDown="wnd_MouseDown" + Loaded="wnd_Loaded"> @@ -127,7 +128,7 @@ - + diff --git a/ProjetTheAlone/View/DashBoard.xaml.cs b/ProjetTheAlone/View/DashBoard.xaml.cs index 4b2ec0d..b27011c 100644 --- a/ProjetTheAlone/View/DashBoard.xaml.cs +++ b/ProjetTheAlone/View/DashBoard.xaml.cs @@ -63,6 +63,7 @@ namespace ProjetTheAlone.View RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1)); RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2)); var a = testQuand.DataContext; + } @@ -86,6 +87,11 @@ namespace ProjetTheAlone.View { this.Close(); } + + private void wnd_Loaded(object sender, RoutedEventArgs e) + { + this.Alert.DataContext = new ViewModel.TextDefilant(this.Alert, "UNE ALERTE QUELQUONQUE", 100); + } } public class DebugDummyConverter : IValueConverter {