Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Citrix导致WPF尺寸问题?_Wpf_Wpfdatagrid_Citrix - Fatal编程技术网

Citrix导致WPF尺寸问题?

Citrix导致WPF尺寸问题?,wpf,wpfdatagrid,citrix,Wpf,Wpfdatagrid,Citrix,我刚刚在办公室的Citrix环境中部署了我的第一个Windows应用程序(使用WPF/.NET 4)。但是,当它运行时,windows中的数据网格比我的windows 7 dev env(或我测试过的任何windows桌面env)中的数据网格宽得多,因此数据网格的右侧被隐藏,需要在以前没有的地方显示一个滚动条。这是Citrix的“问题”吗?我是否错误地布置了窗户来解释这种差异?缺少哪些Windows.NET更新?谢谢你的建议 (Citrix环境:在服务器2008 R2上运行XenApp 6.5)

我刚刚在办公室的Citrix环境中部署了我的第一个Windows应用程序(使用WPF/.NET 4)。但是,当它运行时,windows中的数据网格比我的windows 7 dev env(或我测试过的任何windows桌面env)中的数据网格宽得多,因此数据网格的右侧被隐藏,需要在以前没有的地方显示一个滚动条。这是Citrix的“问题”吗?我是否错误地布置了窗户来解释这种差异?缺少哪些Windows.NET更新?谢谢你的建议

(Citrix环境:在服务器2008 R2上运行XenApp 6.5)

这是我的窗口XAML:

<Window x:Class="TableMaint.ItemClassExtrasEdit"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:TableMaint"
        Title="Edit Item Class Extra Fields" Height="600" Width="331" MinWidth="100" MinHeight="300"  WindowStartupLocation="CenterOwner">
    <DockPanel LastChildFill="True">
        <Grid Height="59" DockPanel.Dock="Bottom">
            <Button Content="Save" Height="23" Name="OKButton" Width="75" Margin="0,0,6,18" VerticalAlignment="Bottom" HorizontalAlignment="Right" 
                    IsDefault="True" Click="OKButton_Click" />
            <Button Content="Cancel" Height="23" HorizontalAlignment="Right" Margin="0,0,101,18" Name="CancelButton" VerticalAlignment="Bottom" Width="75" 
                    IsCancel="True" />
        </Grid>
        <DataGrid Name="ExtrasGrid" ItemsSource="{Binding}" CanUserReorderColumns="False"  CanUserDeleteRows="False" CanUserAddRows="False"
                  AutoGenerateColumns="False" RowHeaderWidth="20" CanUserResizeRows="False" CanUserSortColumns="False">
            <DataGrid.Resources>
                <local:NullCheckBoxConverter x:Key="nullCheckBoxConverter"/>
            </DataGrid.Resources>
            <DataGrid.Columns>
                <DataGridTextColumn Header="    Item Class ID    " Binding="{Binding ItemClassID}" >
                    <DataGridTextColumn.CellStyle>
                        <Style TargetType="{x:Type DataGridCell}">
                            <Setter Property="ToolTipService.ToolTip" Value="{Binding ItemClassName}" />
                        </Style>
                    </DataGridTextColumn.CellStyle>
                </DataGridTextColumn>
                <DataGridCheckBoxColumn Header="Foo1" Binding="{Binding Foo1, Converter={StaticResource nullCheckBoxConverter}}" />
                <DataGridCheckBoxColumn Header="Foo2" Binding="{Binding Foo2, Converter={StaticResource nullCheckBoxConverter}}" />
                <DataGridCheckBoxColumn Header="Foo3" Binding="{Binding Foo3, Converter={StaticResource nullCheckBoxConverter}}" />
                <DataGridCheckBoxColumn Header="Foo4" Binding="{Binding Foo4, Converter={StaticResource nullCheckBoxConverter}}" />
            </DataGrid.Columns>
        </DataGrid>
    </DockPanel>
</Window>

我做了一点测试,在Citrix下运行时得到了稍微宽一些的列。与在同一台机器上通过RDP运行时相比,在Citrix会话中运行时甚至要宽一点。在Citrix下运行时,由于某种原因,数据网格标题中使用的字体看起来更大

这是您通常作为用户通过以下方式配置的内容:个性化-Windows颜色和外观。我不知道为什么在Citrix会话中会有所不同,我以前从未真正注意到这一点。我会自己努力解决这个小小的差异。您可以在Citrix论坛上四处询问,XenApp 6.5论坛位于:


通过GPO锁定窗口设置,可以覆盖XenApp服务器正在执行的任何操作。

我是否因为这个差异而错误地布局了我的窗口?
-如果没有看到相关的XAML,就不可能知道。@HighCore-我为该窗口添加了XAML。我将在该论坛中进行检查-谢谢。也很高兴听到不仅仅是我!