Я новичок в приложениях WPF. Я создал приложение WPF и хочу использовать главную страницу в своем приложении. Внутри области Window я хочу объявить Window.Resources, но он дает две ошибки: 1- член 'Resources' не распознан или недоступен.
2- присоединяемое свойство 'Resources' не найдено в типе ' Окно'. Где проблема?
Вот мой код XAML:
<Window x:Class="ArmsPosition.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ArmsPosition"
mc:Ignorable="d"
Loaded="Window_Loaded"
Closing="Window_Closing"
WindowState="Normal"
Title="Arms Positions" Height="560" Width="800" MinHeight="560" MinWidth="800" MaxHeight="560" MaxWidth="800">
<Grid>
<Window.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Foreground" Value="#FF999999"/>
</Style>
</Window.Resources>
</Grid>
</Window>