|
@@ -1,7 +1,7 @@
|
|
|
|
|
|
-## Ñòèëè è òåìû
|
|
|
|
|
|
+## Стили и темы
|
|
|
|
|
|
-Ñòèëè
|
|
|
|
|
|
+Стили
|
|
|
|
|
|
```
|
|
```
|
|
<Window.Resources>
|
|
<Window.Resources>
|
|
@@ -36,7 +36,7 @@
|
|
```
|
|
```
|
|
<Button
|
|
<Button
|
|
x:Name="ExitButton"
|
|
x:Name="ExitButton"
|
|
- Content="Âûõîä"
|
|
|
|
|
|
+ Content="Выход"
|
|
Click="ExitButton_Click"
|
|
Click="ExitButton_Click"
|
|
Height="50"
|
|
Height="50"
|
|
Background="AliceBlue"/>
|
|
Background="AliceBlue"/>
|
|
@@ -48,14 +48,14 @@
|
|
<Button
|
|
<Button
|
|
x:Name="button1"
|
|
x:Name="button1"
|
|
Margin="10"
|
|
Margin="10"
|
|
- Content="Êíîïêà 1"
|
|
|
|
|
|
+ Content="Кнопка 1"
|
|
FontFamily="Verdana"
|
|
FontFamily="Verdana"
|
|
Foreground="Black"
|
|
Foreground="Black"
|
|
Background="White" />
|
|
Background="White" />
|
|
<Button
|
|
<Button
|
|
x:Name="button2"
|
|
x:Name="button2"
|
|
Margin="10"
|
|
Margin="10"
|
|
- Content="Êíîïêà 2"
|
|
|
|
|
|
+ Content="Кнопка 2"
|
|
FontFamily="Verdana"
|
|
FontFamily="Verdana"
|
|
Foreground="Black"
|
|
Foreground="Black"
|
|
Background="Red" Click="button2_Click"/>
|
|
Background="Red" Click="button2_Click"/>
|
|
@@ -149,7 +149,7 @@ x:Key="BlackAndWhite">
|
|
VerticalAlignment="Bottom">
|
|
VerticalAlignment="Bottom">
|
|
<Button
|
|
<Button
|
|
x:Name="ExitButton"
|
|
x:Name="ExitButton"
|
|
- Content="Âûõîä"
|
|
|
|
|
|
+ Content="Выход"
|
|
Click="ExitButton_Click"
|
|
Click="ExitButton_Click"
|
|
Height="50"
|
|
Height="50"
|
|
Background="Firebrick"/>
|
|
Background="Firebrick"/>
|
|
@@ -160,11 +160,11 @@ x:Key="BlackAndWhite">
|
|
>
|
|
>
|
|
<Button
|
|
<Button
|
|
x:Name="button1"
|
|
x:Name="button1"
|
|
- Content="Êíîïêà 1"
|
|
|
|
|
|
+ Content="Кнопка 1"
|
|
Style="{StaticResource BlackAndWhite}" />
|
|
Style="{StaticResource BlackAndWhite}" />
|
|
<Button
|
|
<Button
|
|
x:Name="button2"
|
|
x:Name="button2"
|
|
- Content="Êíîïêà 2"
|
|
|
|
|
|
+ Content="Кнопка 2"
|
|
Style="{StaticResource BlackAndWhite}"/>
|
|
Style="{StaticResource BlackAndWhite}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
```
|
|
```
|
|
@@ -207,7 +207,7 @@ Grid.RowSpan="3"
|
|
VerticalAlignment="Bottom">
|
|
VerticalAlignment="Bottom">
|
|
<Button
|
|
<Button
|
|
x:Name="ExitButton"
|
|
x:Name="ExitButton"
|
|
- Content="Âûõîä"
|
|
|
|
|
|
+ Content="Выход"
|
|
Click="ExitButton_Click"
|
|
Click="ExitButton_Click"
|
|
Height="50"
|
|
Height="50"
|
|
Background="green"/>
|
|
Background="green"/>
|
|
@@ -217,16 +217,16 @@ x:Name="buttonsStack"
|
|
Background="BlueViolet" >
|
|
Background="BlueViolet" >
|
|
<Button
|
|
<Button
|
|
x:Name="button1"
|
|
x:Name="button1"
|
|
- Content="Êíîïêà 1" />
|
|
|
|
|
|
+ Content="Кнопка 1" />
|
|
<Button
|
|
<Button
|
|
x:Name="button2"
|
|
x:Name="button2"
|
|
- Content="Êíîïêà 2" />
|
|
|
|
|
|
+ Content="Кнопка 2" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
```
|
|
```
|
|
|
|
|
|
![](./img/3.jpg)
|
|
![](./img/3.jpg)
|
|
|
|
|
|
-1 ÊÍÎÏÊÀ ÑÅÐÀß
|
|
|
|
|
|
+1 К�ОПК� СЕР�Я
|
|
|
|
|
|
```
|
|
```
|
|
<StackPanel
|
|
<StackPanel
|
|
@@ -234,17 +234,17 @@ Background="BlueViolet" >
|
|
Background="Red" >
|
|
Background="Red" >
|
|
<Button
|
|
<Button
|
|
x:Name="button1"
|
|
x:Name="button1"
|
|
- Content="Êíîïêà 1"
|
|
|
|
|
|
+ Content="Кнопка 1"
|
|
Style="{x:Null}"/>
|
|
Style="{x:Null}"/>
|
|
<Button
|
|
<Button
|
|
x:Name="button2"
|
|
x:Name="button2"
|
|
- Content="Êíîïêà 2" />
|
|
|
|
|
|
+ Content="Кнопка 2" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
```
|
|
```
|
|
|
|
|
|
![](./img/4.jpg)
|
|
![](./img/4.jpg)
|
|
|
|
|
|
-## Îïðåäåëåíèå îáðàáîò÷èêîâ ñîáûòèé ñ ïîìîùüþ ñòèëåé
|
|
|
|
|
|
+## Определение обработчиков �обытий � помощью �тилей
|
|
|
|
|
|
```
|
|
```
|
|
<Window.Resources>
|
|
<Window.Resources>
|
|
@@ -280,7 +280,7 @@ private void Button_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
![](./img/5.jpg)
|
|
![](./img/5.jpg)
|
|
|
|
|
|
-## Íàñëåäîâàíèå ñòèëåé è ñâîéñòâî BasedOn
|
|
|
|
|
|
+## �а�ледование �тилей и �вой�тво BasedOn
|
|
```
|
|
```
|
|
<Window.Resources>
|
|
<Window.Resources>
|
|
<Style x:Key="ButtonParentStyle">
|
|
<Style x:Key="ButtonParentStyle">
|
|
@@ -301,7 +301,7 @@ private void Button_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
![](./img/6.jpg)
|
|
![](./img/6.jpg)
|
|
|
|
|
|
-Ñòèëè â C#
|
|
|
|
|
|
+Стили в C#
|
|
|
|
|
|
```
|
|
```
|
|
Style buttonStyle = new Style();
|
|
Style buttonStyle = new Style();
|