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