小编Kon*_*kov的帖子

UWP TextBox VerticalContentAlignment

我遇到了以下问题:我无法垂直对齐TextBox中的内容.我旁边有用户输入的图像图标和TextBox,但TextBox中的文本具有默认的顶部对齐.我可以通过设置来改变它VerticalAlignment="Center",但是然后TextBox的高度变得比我需要的要小(它应该有43px的高度).我试过了VerticalContentAlignment="Center,但它也不起作用.我只知道一种可能的解决方案:padding在TextBox中设置,但我不喜欢这个想法.也许还有其他我不知道的解决方案?

提前致谢!

这是我的代码的一部分:

<Grid Margin="15,0,15,10">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" 
                       Source="/Assets/TextInputIcons/Money.png" 
                       Style="{StaticResource InputFieldIconsStyle}" />
                <TextBox Grid.Column="1" 
                         PlaceholderText="Sum" 
                         Style="{StaticResource NumberedTextBox}" />
            </Grid>
Run Code Online (Sandbox Code Playgroud)

和样本图片:

在此输入图像描述

xaml universal windows-phone win-universal-app

4
推荐指数
1
解决办法
2241
查看次数

Environment variable in ocelot config file

I have multiple microservices which are accessible by clients through Ocelot gateway. Inside configuration file there are properties to specify downstream host and port. This have to be done for EACH route.

The problem is that if the service's hostname or port changes, I will have to modify every single route associated with this particular service.

So, the question is, Is it possible to introduce ENV variable inside ocelot.json configuration file? In that case I will have to modify only …

.net-core asp.net-core-webapi ocelot

4
推荐指数
1
解决办法
1469
查看次数

UWP 在图像上放置文本块

我目前正在开发可以在手机和台式机上运行的通用应用程序。但我有一点麻烦。在我的应用程序中,我有一个页面可以将新信用卡添加到用户个人资料中。因此,我使用边距设置图像上的文本,但是当我的应用程序在具有不同分辨率的设备上运行时,文本将改变其位置(很明显)。我的问题是,我怎样才能让文本根据屏幕分辨率占据它的位置?

这是文本放置的正确变体(移动版) 在此处输入图片说明

windows windows-phone-8.1 win-universal-app uwp windows-10-universal

3
推荐指数
1
解决办法
633
查看次数

多个嵌套数组的 MongoD 大小

我有诗集。集合中的文档具有以下结构:

{
"_id" : "Romeo and Juliet",
"acts" : [ 
    {
        "title" : "ACT I",
        "scenes" : [ 
            {
                "title" : "SCENE I. Verona. A public place.",
                "action" : [ 
                    {
                        "character" : "SAMPSON",
                        "says" : [ 
                            "Gregory, o' my word, we'll not carry coals."
                        ]
                    }, 
                    {
                        "character" : "GREGORY",
                        "says" : [ 
                            "No, for then we should be colliers."
                        ]
                    }, 
                    // ...
                    {
                        "character" : "GREGORY",
                        "says" : [ 
                            "To move is to stir; and to be …
Run Code Online (Sandbox Code Playgroud)

arrays mongodb mongodb-query aggregation-framework

2
推荐指数
1
解决办法
935
查看次数