c# – 如何从资源中获取字符串以在xaml中的WPF资源部分中分配
发布时间:2020-12-15 03:58:38 所属栏目:百科 来源:网络整理
导读:我有一个XBAP应用程序与以下用户控制: UserControl x:Class="XXX.UsersGrid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="Auto" Width="Auto" UserControl.Resour
我有一个XBAP应用程序与以下用户控制:
<UserControl x:Class="XXX.UsersGrid" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="Auto" Width="Auto"> <UserControl.Resources> <DataTemplate x:Key="UpArrowUsers"> <DockPanel> <TextBlock Text="xxUser" x:Name="upArrowUsersHeader" HorizontalAlignment="Center"></TextBlock> <Path x:Name="arrow" StrokeThickness = "1" Fill= "gray" Data= "M 5,10 L 15,10 L 10,5 L 5,10"/> </DockPanel> </DataTemplate> </UserControl> ... 现在我想从作为资源嵌入应用程序的resx文件中获取字符串“xxUser” 解决方法
没有一个答案是接近你想要的.我将首先阅读WPF中的本地化.你会发现,如果你正在使用WPF进行本地化,你将需要在应用程序的每个节点上定义x:Uid.
http://msdn.microsoft.com/en-us/library/ms788718.aspx (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- clojure – 在哪里可以找到Leiningen中的依赖关系的有效版本
- macos – Swift – 从NSViewController捕获keydown
- 庆祝Dojo中文博客获得CSDN 2012年度博客之星称号!
- 用Keil-MDK开发TQ2440裸机程序入门教程(把裸机程序下载到N
- ruby – 在rcov中,有没有办法找到哪个测试方法遍历了正在测
- logback logback.xml常用配置详解(三) <filter>
- ios – Xcode 10“无法构建模块Darwin / Foundation / Core
- c# – 如何在ADO.Net实体模型中将具有外键的表更新到另一个
- XML && TinyXml
- iphone – xcode:如何在编译/构建阶段保存“documents”文