小编Sha*_*awn的帖子

在一个WPF网格单元中具有多个控件

WPF的新手,并通过在线教程学习并提出几个问题:

(1)我试图在一个WPF网格单元格中并排出现多个不同宽度的按钮.但是,它们似乎总是叠加在一起.我错过了什么?

(2)是否可以控制网格单元内每个按钮的绝对起始左侧位置?

谢谢.

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<ScrollViewer>
    <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          ShowGridLines ="True" >
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="60*" />
        </Grid.ColumnDefinitions>

        <Button Content="Button No. 1" Grid.Row="0" Grid.Column="0" />

        <GridSplitter HorizontalAlignment="Center" Width="6"
                      Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" />

        <Button Content="Button No. 4-2" Grid.Row="0" Grid.Column="2" Width="100" />
        <Button Content="Button No. 4-1" Grid.Row="0" Grid.Column="2" Width="50" />

    </Grid>
</ScrollViewer>
</Page>
Run Code Online (Sandbox Code Playgroud)

基于萨尔瓦多的答案,这有效:

        <Button VerticalAlignment="Top" HorizontalAlignment="Left" Content="Button No. 1" Grid.Row="0" Grid.Column="0" Height="100"/>

        <GridSplitter HorizontalAlignment="Center" Width="6"
                      Grid.Row="0" Grid.Column="1" …
Run Code Online (Sandbox Code Playgroud)

wpf grid cell

8
推荐指数
2
解决办法
2万
查看次数

亚马逊AWS简单工作流服务SWF C#示例

我想知道是否有可用于AWS .NET SDK的SWF工作流程C#示例代码?

AWS论坛帖子:https://forums.aws.amazon.com/thread.jspa? threadID = 122216 & tstart = 0

.net c# flash workflow amazon-web-services

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

解析Node.js中没有ID或CSS选择器的HTML表

此数据来自旧系统,输出按原样输出.我们无法添加CSS选择器或ID.大多数用于node.js解析的在线示例涉及使用某些ID或CSS类解析表,行,数据,但到目前为止,我还没有遇到任何可以帮助解析下面页面的内容.这包括JSDOM(AFAIK)的示例.

我想要的是将每个行提取到[fileName,link,size,dateTime]元组中,然后我可以运行一些查询,例如组中的最新时间戳等,然后提取文件名和链接 - 是考虑使用YQL.交替的表行属性也使它有点挑战.node.js的新功能,所以一些术语可能是错误的.任何帮助将不胜感激.

谢谢.

<html>
<body>
    <table width="100%" cellspacing="0" cellpadding="5" align="center">
        <tr> 
        <td align="left"><font size="+1"><strong>Filename</strong></font></td>
        <td align="center"><font size="+1"><strong>Size</strong></font></td>
        <td align="right"><font size="+1"><strong>Last Modified</strong></font></td>
        </tr>
        <tr>
        <td align="left">&nbsp;&nbsp;
        <a href="/path_to_file.csv"><tt>file1.csv</tt></a></td>
        <td align="right"><tt>86.6 kb</tt></td>
        <td align="right"><tt>Fri, 21 Mar 2014 21:00:19 GMT</tt></td>
        </tr>
        <tr bgcolor="#eeeeee">
        <td align="left">&nbsp;&nbsp;
        <a href="/path_to_file.csv"><tt>file2.csv</tt></a></td>
        <td align="right"><tt>20.7 kb</tt></td>
        <td align="right"><tt>Fri, 21 Mar 2014 21:00:19 GMT</tt></td>
        </tr>
        <tr>
        <td align="left">&nbsp;&nbsp;
        <a href="/path_to_file.xml"><tt>file1.xml</tt></a></td>
        <td align="right"><tt>266.5 kb</tt></td>
        <td align="right"><tt>Fri, 21 Mar 2014 21:00:19 GMT</tt></td>
        </tr>
        <tr bgcolor="#eeeeee">
        <td align="left">&nbsp;&nbsp;
        <a href="/path_to_file.xml"><tt>file2.xml</tt></a></td>
        <td …
Run Code Online (Sandbox Code Playgroud)

html javascript jquery parsing node.js

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

Riak的erlang pb客户端和地图获取

我试图在Riak中存储寄存器和集合的映射,并使用Riak的pb客户端处理它们.我的目标是保存地图,然后从返回的对象中提取持久化的地图并对其进行处理(在这种情况下,从集合中提取寄存器,值并转换为JSON).好像试图使用riakc_map:fetch从返回的对象中提取值是不是正确的方法?

这是我创建它的方法(关键是uuid,QP是整数列表):

M = riak:new_map(),
M1 = riak:map_update({<<"post_id">>, register},
    fun(R) -> riakc_register:set(Key, R) end, M),
M2 = riak:map_update({<<"userids">>, set},
    fun(S) ->
        [riakc_set:add_element(helpers:int_to_bin(Q), S) || Q <- QP]
    end, M2),
[...]
Run Code Online (Sandbox Code Playgroud)

然后我将它包装在一个对象中,并保存该对象.

Obj = riakc_obj:new(<<?POST_BUCKET>>, Key, Map) %% Map created via new_map()
{ok, Obj2} = riakc_pb_socket:put(Pid, <<?POST_BUCKET>>, Obj, [return_body])
Run Code Online (Sandbox Code Playgroud)

现在这是我遇到麻烦的地方:

Post = binary_to_term(riakc_obj:get_value(Obj2)));
Keys = riakc_map:fetch_keys(Post),  %% returns []
OrigMap = riakc_map:value(Post),    %% returns []
IsKey1 = riakc_map:is_key({<<"post_id">>, register}, Post), %% false
IsKey2 = riakc_map:is_key({<<"post_id">>}, Post),   %% false
Run Code Online (Sandbox Code Playgroud)

最重要的是

PostId = …
Run Code Online (Sandbox Code Playgroud)

erlang riak

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

标签 统计

.net ×1

amazon-web-services ×1

c# ×1

cell ×1

erlang ×1

flash ×1

grid ×1

html ×1

javascript ×1

jquery ×1

node.js ×1

parsing ×1

riak ×1

workflow ×1

wpf ×1