WPF 使用Propereties:Resources.resx里面的资源


<Window x:Class="Wpf180706.Window7"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:prop="clr-namespace:Wpf180706.Properties"
        Title="Window7" Height="300" Width="300">
    <Grid>
        <StackPanel>
            <TextBlock Text="{x:Static prop:Resources.UserName}" ></TextBlock>
        </StackPanel>
    </Grid>
</Window>

相关文章:

  • 2021-08-05
  • 2021-11-21
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-03-06
猜你喜欢
  • 2021-12-05
  • 2021-11-03
  • 2021-12-31
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案