Rotate TextBlock /!\ Resize not suported

This commit is contained in:
adri 2019-01-25 18:23:38 +01:00
parent 9a422d4760
commit 5d10cef466
3 changed files with 10 additions and 2 deletions

View File

@ -96,6 +96,7 @@
<Compile Include="ViewModel\EncodeRepas.cs" /> <Compile Include="ViewModel\EncodeRepas.cs" />
<Compile Include="ViewModel\EncodeTypeEvent.cs" /> <Compile Include="ViewModel\EncodeTypeEvent.cs" />
<Compile Include="ViewModel\EncodePlats.cs" /> <Compile Include="ViewModel\EncodePlats.cs" />
<Compile Include="ViewModel\TextDefilant.cs" />
<Compile Include="ViewModel\VM_DashBoard.cs" /> <Compile Include="ViewModel\VM_DashBoard.cs" />
<Compile Include="View\FicDetailEvent.xaml.cs"> <Compile Include="View\FicDetailEvent.xaml.cs">
<DependentUpon>FicDetailEvent.xaml</DependentUpon> <DependentUpon>FicDetailEvent.xaml</DependentUpon>

View File

@ -16,7 +16,8 @@
TextOptions.TextRenderingMode="Auto" TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}" Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}" 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">
<Window.Resources> <Window.Resources>
<local:DebugDummyConverter x:Key="DebugDummyConverter" /> <local:DebugDummyConverter x:Key="DebugDummyConverter" />
</Window.Resources> </Window.Resources>
@ -127,7 +128,7 @@
</LinearGradientBrush> </LinearGradientBrush>
</Border.Background> </Border.Background>
</Border> </Border>
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}" VerticalAlignment="Center" Height="Auto" Text="Absentéisme ou alerte" Grid.ColumnSpan="2" Margin="0,9" /> <TextBlock x:Name="Alert" Style="{StaticResource MaterialDesignTitleTextBlock}" VerticalAlignment="Center" Height="Auto" HorizontalAlignment="Stretch" Text="{Binding TextAfficher}" Grid.ColumnSpan="2" Margin="0,9" />
</Grid> </Grid>
</Grid> </Grid>

View File

@ -63,6 +63,7 @@ namespace ProjetTheAlone.View
RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1)); RepasDemain.DataContext = new RepaModel(DateTime.Now.AddDays(1));
RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2)); RepasApresDemain.DataContext = new RepaModel(DateTime.Now.AddDays(2));
var a = testQuand.DataContext; var a = testQuand.DataContext;
} }
@ -86,6 +87,11 @@ namespace ProjetTheAlone.View
{ {
this.Close(); 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 public class DebugDummyConverter : IValueConverter
{ {