2013-12-08 1 views
0

내 프로그램을 실행할 때 다음과 같은 오류를 받고 있어요 :자원 "XX"는 확인할 수 없습니다

자원 "bellRingersStyle를"경고가 해결 될 수 없습니다.

이것은 마지막 두 줄인 {StaticResource bellRingersStyle}에 해당합니다.

<Window x:Class="BellRingers.MainWindow" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     Title="Middleshire Bell Ringers Association – Members" Height="350" Width="525"> 
    <Window.Resources> 
     <Style x:Key="bellRingerStyle" TargetType="Control"> 
      <Setter Property="Button.Background" Value="Gray"/> 
      <Setter Property="Button.Foreground" Value="Gray"/> 
      <Setter Property="Button.FontFamily" Value="Comic Sans MS"/> 
      <Style.Triggers> 
       <Trigger Property="IsMouseOver" Value="True"> 
        <Setter Property="Background" Value="Blue"/> 
       </Trigger> 
      </Style.Triggers> 
     </Style> 
    </Window.Resources> 
    <Grid> 
     <Button Style="{StaticResource bellRingerStyle}" Panel.ZIndex="1" Content="Button" Height="23" HorizontalAlignment="Left" Margin="400,131,0,0" Name="button1" VerticalAlignment="Top" Width="75" > 
      </Button> 
     <Button Style="{StaticResource bellRingersStyle}" Panel.ZIndex="1" Content="Button" Height="23" Margin="0,0,0,0" Name="button2" Width="75" /> 
      <Image Panel.ZIndex="0" Margin="0,0,0,0" Name="image1" > 
      <Image.Source> 
       <BitmapImage UriSource="bell.gif" /> 
      </Image.Source> 
     </Image> 
     <TextBox Style="{StaticResource bellRingersStyle}" Height="23" HorizontalAlignment="Left" Margin="206,271,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" /> 
    </Grid> 
</Window> 
+0

그 리소스는'xx'입니까? –

+0

내가 그것을 바꿨다, 그것을 특별히 추가하는 것을 잊었다. 죄송합니다. – user2856358

답변

2

오타가 있습니다. bellRingerStyle로 정의했지만 bellRingersStyle을 참조하십시오.

+0

옙 ... 복수형 vs 단수형. – DRapp