2012-10-04 50 views

回答

2

试试这个:

<Window x:Class="WpfApplication1.MainWindow" 
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      xmlns:Properties="clr-namespace:WpfApplication1.Properties" Title="MainWindow" Height="350" Width="525"> 
    <Grid> 
     <Grid.RowDefinitions> 
      <RowDefinition/> 
     </Grid.RowDefinitions> 

     <Label Content="{Binding Source={x:Static Properties:Settings.Default}, Path=BrandOfBeerOfChoice}"/> 

    </Grid> 
</Window> 

在小型应用程序,我创建了一个名为BrandOfBeerOfChoice一个设置项。

相关问题