Amélioration de la vue et des annimation en WPF

Navigator
Hugo LIVET 2 years ago
parent 59052b2f23
commit 78509490da

@ -6,7 +6,7 @@
StartupUri="MainWindow.xaml"> StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>
<!--<conv:Func2WindowPartConverter x:Key="Func2WpConv"/>--> <conv:Func2WindowPartConverter x:Key="Func2WpConv"/>
<Style x:Key="BorderRessource" TargetType="Border"> <Style x:Key="BorderRessource" TargetType="Border">
<Setter Property="BorderBrush" Value="#63A4FF"/> <Setter Property="BorderBrush" Value="#63A4FF"/>
@ -27,18 +27,18 @@
</Style> </Style>
<Style TargetType="UserControl" x:Key="ImageFondRessource"> <Style TargetType="UserControl" x:Key="ImageFondRessource">
<Setter Property="Background"> <Setter Property="Background" Value="White">
<Setter.Value> <!--<Setter.Value>
<VisualBrush> <VisualBrush>
<VisualBrush.Visual> <VisualBrush.Visual>
<Image Source="./images/fond.jpg"> <Image Source="./images/fond.jpg">
<Image.Effect> <Image.Effect>
<BlurEffect Radius="10"/> <BlurEffect Radius="0"/>
</Image.Effect> </Image.Effect>
</Image> </Image>
</VisualBrush.Visual> </VisualBrush.Visual>
</VisualBrush> </VisualBrush>
</Setter.Value> </Setter.Value>-->
</Setter> </Setter>
</Style> </Style>
@ -113,27 +113,37 @@
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
</Style> </Style>
<SolidColorBrush x:Key="CouleurPrincipale" Color="Blue"/> <SolidColorBrush x:Key="CouleurPrincipale" Color="#23395d"/>
<Style x:Key="BoutonMain" TargetType="Button"> <Style x:Key="BoutonMain" TargetType="Button">
<Setter Property="Height" Value="40"/> <Setter Property="Height" Value="40"/>
<Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderThickness" Value="0"/>
<Setter Property="Margin" Value="10,0,0,0"/> <Setter Property="Margin" Value="10,10,0,10" />
<Setter Property="Padding" Value="20"/>
<Setter Property="Background" Value="{StaticResource CouleurPrincipale}"/> <Setter Property="Background" Value="{StaticResource CouleurPrincipale}"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Foreground" Value="White"/>
<Style.Resources> <Style.Resources>
<Style TargetType="Border"> <Style TargetType="Border">
<Setter Property="CornerRadius" Value="20,0,0,20"/> <Setter Property="CornerRadius" Value="20,0,0,20"/>
</Style> </Style>
</Style.Resources> </Style.Resources>
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsPressed" Value="False"><!--True pour que ca marche-->
<Trigger Property="IsDefault" Value="True">
<Setter Property="Foreground" Value="Black"/>
<Trigger.EnterActions> <Trigger.EnterActions>
<BeginStoryboard> <BeginStoryboard>
<Storyboard> <Storyboard>
<ColorAnimation Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)" To="White"/> <ColorAnimation Duration="0:0:0.5" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)" To="White"/>
</Storyboard> </Storyboard>
</BeginStoryboard> </BeginStoryboard>
</Trigger.EnterActions> </Trigger.EnterActions>
@ -141,9 +151,15 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</Application.Resources> </Application.Resources>
</Application> </Application>

@ -6,21 +6,21 @@
xmlns:local="clr-namespace:IHM" xmlns:local="clr-namespace:IHM"
mc:Ignorable="d" mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800"> Title="MainWindow" Height="450" Width="800">
<Grid Background="{StaticResource CouleurPrincipale}"> <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.25*"/> <ColumnDefinition Width="0.30*"/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Source="images/logo.png" Margin="10" Grid.Column="0" Grid.Row="0"/>
<StackPanel Grid.Column="0" Grid.Row="1">
<Button Content="Tableau de bord" Style="{StaticResource BoutonMain}"/>
<StackPanel Grid.Column="0" Background="{StaticResource CouleurPrincipale}">
<Image Source="images/logo.png" Margin="10" Grid.Column="0" Grid.Row="0" Width="75"/>
<Button Content="Tableau de bord" Style="{StaticResource BoutonMain}" IsDefault="True"/>
<Button Content="Tableau de bord" Style="{StaticResource BoutonMain}"/> <Button Content="Tableau de bord" Style="{StaticResource BoutonMain}"/>
<Button Content="Tableau de bord" Style="{StaticResource BoutonMain}"/> <Button Content="Tableau de bord" Style="{StaticResource BoutonMain}"/>
<Button Content="Tableau de bord" Style="{StaticResource BoutonMain}"/> <Button Content="Tableau de bord" Style="{StaticResource BoutonMain}"/>

Loading…
Cancel
Save