有没有办法在64位Windows环境中运行而不重新编译为x86时,在AnyCPU下编译的.NET应用程序作为32位应用程序?
我想在WPF GridView中设置列的背景.许多Google搜索结果都指向设置GridViewColumn.CellTemplate以更改列的外观.但是,在设置背景颜色时我遇到了一个问题; 它没有拉伸来填充细胞:
这是我正在使用的xaml:
<Window x:Class="ScratchPadWpf.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Width="300" Height="300">
<Grid>
<ListView ItemsSource="{Binding}">
<ListView.View>
<GridView>
<GridViewColumn>
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid Background="Red">
<TextBlock Text="{Binding FirstName}"/>
</Grid>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn>
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid Background="Yellow">
<TextBlock Text="{Binding LastName}"/>
</Grid>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)
和xaml.cs一样好的措施:
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
DataContext = new[]
{
new {FirstName = "Jim", LastName = "Bob"},
new {FirstName = "Frank", LastName = "Smith"},
new {FirstName = "Tooth", LastName …
Run Code Online (Sandbox Code Playgroud) 它可以使用 c# 和 windows api 删除窗口控制台标题栏,如果是的话如何?请。
我有一个单独的服务模块,我需要一个服务注入到依赖模块的配置功能.
angular.module('app', ['app.services'], function(myservice) {/*use myservice*/})
.controller('mycontroller', function($scope, myservice) {
$scope.message = myservice.sayHello();
});
angular.module('app.services', [], function($provide) {
$provide.service('myservice', function() {
return {sayHello: function() { return 'hello'; }};
});
});
Run Code Online (Sandbox Code Playgroud)
我也创造了一个小提琴:http://jsfiddle.net/FzGmL/
代码将与应用程序中的未知提供程序:myservice爆炸
如果myservice
从app
模块配置函数中删除参数,mycontroller
构造函数能够myservice
注入就好了.
如何myservice
注入app
模块的配置功能?
.net ×1
64-bit ×1
angularjs ×1
c# ×1
compilation ×1
executable ×1
gridview ×1
javascript ×1
listview ×1
styles ×1
winapi ×1
windows ×1
wpf ×1
xaml ×1