Browse Source

Добавлены стили

ПроваленкоЛН 1 week ago
parent
commit
2794f08a20

+ 1 - 0
AvaloniaBaseTeacher/App.axaml

@@ -11,5 +11,6 @@
   
   
     <Application.Styles>
     <Application.Styles>
         <FluentTheme />
         <FluentTheme />
+		<StyleInclude Source="/Styles1.axaml"></StyleInclude>
     </Application.Styles>
     </Application.Styles>
 </Application>
 </Application>

+ 71 - 0
AvaloniaBaseTeacher/Styles1.axaml

@@ -0,0 +1,71 @@
+<Styles xmlns="https://github.com/avaloniaui"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+  <Design.PreviewWith>
+
+  </Design.PreviewWith>
+
+	<Style Selector="TextBlock.but">
+		<Setter Property="Foreground" Value="#FFFFFF"/>
+		<Setter Property="FontSize" Value="16" />
+	</Style>
+	
+	<Style Selector="TextBlock">
+		<Setter Property="Foreground" Value="#008080"/>
+		<Setter Property="FontSize" Value="16" />
+	</Style>
+
+	<Style Selector="Button">
+		<Setter Property="Background" Value="#008080"/>
+		<Setter Property="Foreground" Value="#FFFFFF"/>
+		<Setter Property="BorderBrush" Value="#00CED1"/>
+		<Setter Property="BorderThickness" Value="2"/>
+		<Setter Property="FontSize" Value="16"/>
+		<Setter Property="CornerRadius" Value="5"/>
+	</Style>
+
+	<Style Selector="Button:hover">
+		<Setter Property="Background" Value="#00CED1"/>
+	</Style>
+
+	<Style Selector="TextBox">
+		<Setter Property="Background" Value="#E0FFFF"/>
+		<Setter Property="Foreground" Value="#008080"/>
+		<Setter Property="BorderBrush" Value="#00CED1"/>
+		<Setter Property="BorderThickness" Value="2"/>
+		<Setter Property="FontSize" Value="14"/>
+	</Style>
+
+	<Style Selector="CheckBox">
+		<Setter Property="Foreground" Value="#008080"/>
+	</Style>
+
+	<Style Selector="RadioButton">
+		<Setter Property="Foreground" Value="#008080"/>
+	</Style>
+
+	<Style Selector="ListBox">
+		<Setter Property="Background" Value="#F0FFFF"/>
+		<Setter Property="BorderBrush" Value="#00CED1"/>
+		<Setter Property="BorderThickness" Value="2"/>
+	</Style>
+
+	<Style Selector="Border">
+		<Setter Property="BorderBrush" Value="#00CED1"/>
+		<Setter Property="BorderThickness" Value="2"/>
+		<Setter Property="CornerRadius" Value="5"/>
+	</Style>
+
+	<Style Selector="RadioButton">
+	<Setter Property="Foreground" Value="#008080"/> 
+	<Setter Property="FontSize" Value="16"/>
+	<Setter Property="Margin" Value="0,5,0,5"/> 
+	</Style>
+
+	<Style Selector="RadioButton:hover">
+		<Setter Property="Foreground" Value="#00CED1"/>
+	</Style>
+
+	<Style Selector="RadioButton:checked">
+		<Setter Property="Foreground" Value="#00CED1"/>
+	</Style>
+</Styles>

+ 6 - 6
AvaloniaBaseTeacher/Views/Add.axaml

@@ -18,9 +18,9 @@
 		</Grid.RowDefinitions>
 		</Grid.RowDefinitions>
 		<TextBlock HorizontalAlignment="Center" FontWeight="Bold">Введите ФИО преподавателя</TextBlock>
 		<TextBlock HorizontalAlignment="Center" FontWeight="Bold">Введите ФИО преподавателя</TextBlock>
 		<StackPanel Margin="0 20 0 0" HorizontalAlignment="Center">
 		<StackPanel Margin="0 20 0 0" HorizontalAlignment="Center">
-		<TextBox Text="{Binding NewTeacher.Surname}" Watermark="Фамилия" Margin="0 10 0 0" Width="300" Height="15"></TextBox>
-		<TextBox Text="{Binding NewTeacher.Name}"  Watermark="Имя" Margin="0 10 0 0" Width="300" Height="15"></TextBox>
-		<TextBox Text="{Binding NewTeacher.Patronymic}" Watermark="Отчество" Margin="0 10 0 0" Width="300" Height="15"></TextBox>
+		<TextBox Text="{Binding NewTeacher.Surname}" Watermark="Фамилия" Margin="0 10 0 0" Width="300"></TextBox>
+		<TextBox Text="{Binding NewTeacher.Name}"  Watermark="Имя" Margin="0 10 0 0" Width="300"></TextBox>
+		<TextBox Text="{Binding NewTeacher.Patronymic}" Watermark="Отчество" Margin="0 10 0 0" Width="300"></TextBox>
 			<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
 			<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
 				<TextBlock Margin="10" Text="Выберите пол " FontWeight="Bold"></TextBlock>
 				<TextBlock Margin="10" Text="Выберите пол " FontWeight="Bold"></TextBlock>
 			<ComboBox Margin="5" HorizontalAlignment="Center" ItemsSource="{Binding genders}" SelectedItem="{Binding NewTeacher.GenderNavigation}">
 			<ComboBox Margin="5" HorizontalAlignment="Center" ItemsSource="{Binding genders}" SelectedItem="{Binding NewTeacher.GenderNavigation}">
@@ -37,8 +37,8 @@
 		    <TextBlock HorizontalAlignment="Center" FontWeight="Bold" Text="Введите стаж работы в месяцах"></TextBlock>
 		    <TextBlock HorizontalAlignment="Center" FontWeight="Bold" Text="Введите стаж работы в месяцах"></TextBlock>
 			<TextBox HorizontalAlignment="Center" Text="{Binding NewTeacher.Experience}"></TextBox>
 			<TextBox HorizontalAlignment="Center" Text="{Binding NewTeacher.Experience}"></TextBox>
 			<TextBlock HorizontalAlignment="Center" FontWeight="Bold" Text="Введите контактную информацию"></TextBlock>
 			<TextBlock HorizontalAlignment="Center" FontWeight="Bold" Text="Введите контактную информацию"></TextBlock>
-			<TextBox Text="{Binding NewTeacher.Email}" Watermark="Почта" Margin="0 10 0 0" Width="300" Height="15"></TextBox>
-			<TextBox Text="{Binding NewTeacher.Phone}" Watermark="Номер телефона" Margin="0 10 0 0" Width="300" Height="15"></TextBox>
+			<TextBox Text="{Binding NewTeacher.Email}" Watermark="Почта" Margin="0 10 0 0" Width="300"></TextBox>
+			<TextBox Text="{Binding NewTeacher.Phone}" Watermark="Номер телефона" Margin="0 10 0 0" Width="300"></TextBox>
 				<StackPanel Orientation="Horizontal">
 				<StackPanel Orientation="Horizontal">
 			<TextBlock FontWeight="Bold" Text="Выберите пройденные курсы или"></TextBlock>
 			<TextBlock FontWeight="Bold" Text="Выберите пройденные курсы или"></TextBlock>
 				<Button Command="{Binding AddCoursePage}">Добавьте новые курсы</Button>
 				<Button Command="{Binding AddCoursePage}">Добавьте новые курсы</Button>
@@ -81,7 +81,7 @@
 				</ListBox.ItemTemplate>
 				</ListBox.ItemTemplate>
 			</ListBox>
 			</ListBox>
 			<Button Command="{Binding AddTeacher}">
 			<Button Command="{Binding AddTeacher}">
-				<TextBlock Text="{Binding Button}"></TextBlock>
+				<TextBlock Classes="but" Text="{Binding Button}"></TextBlock>
 			</Button>
 			</Button>
 		</StackPanel>
 		</StackPanel>
 		</StackPanel>
 		</StackPanel>

+ 2 - 2
AvaloniaBaseTeacher/Views/AddCourse.axaml

@@ -10,8 +10,8 @@
 	<Grid>
 	<Grid>
 		<StackPanel Margin="0 30 0 0" HorizontalAlignment="Center" VerticalAlignment="Center">
 		<StackPanel Margin="0 30 0 0" HorizontalAlignment="Center" VerticalAlignment="Center">
 			<TextBlock HorizontalAlignment="Center" FontWeight="Bold">Введите данные курса</TextBlock>
 			<TextBlock HorizontalAlignment="Center" FontWeight="Bold">Введите данные курса</TextBlock>
-			<TextBox Text="{Binding Newcourse.Course1}" Watermark="Курс" Margin="0 10 0 0" Width="300" Height="15"></TextBox>
-			<TextBox Text="{Binding Newcourse.Hours}"  Watermark="Часы" Margin="0 10 0 0" Width="300" Height="15"></TextBox>
+			<TextBox Text="{Binding Newcourse.Course1}" Watermark="Курс" Margin="0 10 0 0" Width="300"></TextBox>
+			<TextBox Text="{Binding Newcourse.Hours}"  Watermark="Часы" Margin="0 10 0 0" Width="300" ></TextBox>
 			<Button Command="{Binding AddCourse}">Добавить курс</Button>
 			<Button Command="{Binding AddCourse}">Добавить курс</Button>
 		</StackPanel>
 		</StackPanel>
 	</Grid>
 	</Grid>

+ 2 - 2
AvaloniaBaseTeacher/Views/Show.axaml

@@ -14,7 +14,7 @@
 		</Grid.RowDefinitions>
 		</Grid.RowDefinitions>
 		<StackPanel Margin="10 0 0 0" Orientation="Horizontal" VerticalAlignment="Center">
 		<StackPanel Margin="10 0 0 0" Orientation="Horizontal" VerticalAlignment="Center">
 			<Button Command="{Binding AddTeacher}">Добавить преподавателя</Button>
 			<Button Command="{Binding AddTeacher}">Добавить преподавателя</Button>
-			<TextBox Text="{Binding SearchTeacher}" Width="250" Height="10" Watermark="Поиск по ФИО"></TextBox>
+			<TextBox Text="{Binding SearchTeacher}" Width="250"  Watermark="Поиск по ФИО" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBox>
 			<StackPanel Orientation="Vertical" Margin="10 0 0 0">
 			<StackPanel Orientation="Vertical" Margin="10 0 0 0">
 			<CheckBox IsChecked="{Binding Gender1}">Мужской пол</CheckBox>
 			<CheckBox IsChecked="{Binding Gender1}">Мужской пол</CheckBox>
 			<CheckBox IsChecked="{Binding Gender}">Женский пол</CheckBox>
 			<CheckBox IsChecked="{Binding Gender}">Женский пол</CheckBox>
@@ -48,7 +48,7 @@
 			</ListBox.ItemsPanel>
 			</ListBox.ItemsPanel>
 			<ListBox.ItemTemplate>
 			<ListBox.ItemTemplate>
 				<DataTemplate>
 				<DataTemplate>
-					<Border BorderThickness="2" BorderBrush="BlueViolet">
+					<Border BorderThickness="2" BorderBrush="#00CED1">
 						<StackPanel Width="1000" Height="250"  Orientation="Horizontal">
 						<StackPanel Width="1000" Height="250"  Orientation="Horizontal">
 							<StackPanel Margin="10 0 0 0" HorizontalAlignment="Center" Width="600">
 							<StackPanel Margin="10 0 0 0" HorizontalAlignment="Center" Width="600">
 							<TextBlock Text="Личная информация" FontWeight="Bold"></TextBlock>
 							<TextBlock Text="Личная информация" FontWeight="Bold"></TextBlock>